Remove outdated how to guides
@ -163,7 +163,7 @@ export const AvailableIntegrations: VFC<IAvailableIntegrationsProps> = ({
|
|||||||
need a client SDK (software developer kit) for your
|
need a client SDK (software developer kit) for your
|
||||||
programming language and an{' '}
|
programming language and an{' '}
|
||||||
<a
|
<a
|
||||||
href='https://docs.getunleash.io/how-to/how-to-create-api-tokens'
|
href='https://docs.getunleash.io/reference/api-tokens-and-client-keys'
|
||||||
target='_blank'
|
target='_blank'
|
||||||
rel='noopener noreferrer'
|
rel='noopener noreferrer'
|
||||||
>
|
>
|
||||||
|
@ -91,7 +91,7 @@ export class ProjectApiTokenController extends Controller {
|
|||||||
operationId: 'getProjectApiTokens',
|
operationId: 'getProjectApiTokens',
|
||||||
summary: 'Get api tokens for project.',
|
summary: 'Get api tokens for project.',
|
||||||
description:
|
description:
|
||||||
'Returns the [project API tokens](https://docs.getunleash.io/how-to/how-to-create-project-api-tokens) that have been created for this project.',
|
'Returns the project-specific [API tokens](https://docs.getunleash.io/reference/api-tokens) that have been created for this project.',
|
||||||
responses: {
|
responses: {
|
||||||
200: createResponseSchema('apiTokensSchema'),
|
200: createResponseSchema('apiTokensSchema'),
|
||||||
...getStandardResponses(401, 403, 404),
|
...getStandardResponses(401, 403, 404),
|
||||||
|
@ -31,7 +31,7 @@ You should only initialize the Unleash SDK once during the lifespan of a serverl
|
|||||||
|
|
||||||
Why? AWS Lambda is designed to reuse the same instance for multiple invocations, enabling the expensive initialization process to occur only during the Lambda's "cold start." Subsequent "warm" invocations can then leverage the SDK, which has been pre-initialized, with all feature flag configurations cached in memory. This ensures efficient operation by minimizing initialization overhead and enhancing performance.
|
Why? AWS Lambda is designed to reuse the same instance for multiple invocations, enabling the expensive initialization process to occur only during the Lambda's "cold start." Subsequent "warm" invocations can then leverage the SDK, which has been pre-initialized, with all feature flag configurations cached in memory. This ensures efficient operation by minimizing initialization overhead and enhancing performance.
|
||||||
|
|
||||||
You’ll also need to provide an [Unleash Server side API Token](/how-to/how-to-create-api-tokens) as an environment variable for the AWS Lambda. This authorizes the SDK to connect to the Unleash API.
|
You’ll also need to provide an [Unleash Server side API Token](/reference/api-tokens-and-client-keys) as an environment variable for the AWS Lambda. This authorizes the SDK to connect to the Unleash API.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import {
|
import {
|
||||||
|
@ -2,36 +2,9 @@
|
|||||||
title: How to create API Tokens
|
title: How to create API Tokens
|
||||||
---
|
---
|
||||||
|
|
||||||
import newTokenImage from '/img/admin_create_token_form.png';
|
Depending on your [permissions](#api-token-permissions), you can create API tokens in the Unleash Admin UI in three ways:
|
||||||
|
- **Admin > API access**: for client or frontend tokens; requires the Admin root role, or a custom root role with API token permissions.
|
||||||
|
- **Settings > API access** inside a project: for a project-specific client or frontend tokens; permitted for project Members or users with a [corresponding root role](#api-token-permissions).
|
||||||
|
- **Profile > View profile settings > Personal API tokens**: for personal access token.
|
||||||
|
|
||||||
:::info Permissions
|
|
||||||
|
|
||||||
Creating API tokens requires you to have the `CREATE_API_TOKEN` permission. This means that, as of now, **only instance admins can create API tokens.**
|
|
||||||
|
|
||||||
All users can see tokens with `CLIENT` level access, but only instance admins can see tokens with `ADMIN` level access.
|
|
||||||
|
|
||||||
:::
|
|
||||||
|
|
||||||
Unleash SDKs use API tokens to authenticate to the Unleash API. Unleash supports different types of API tokens, each with different levels of access and privileges. Refer to the [API tokens and client keys documentation](../reference/api-tokens-and-client-keys.mdx) for a complete overview of the different token types.
|
|
||||||
|
|
||||||
## Step 1: Navigate to the API token creation form {#step-1}
|
|
||||||
|
|
||||||
Navigate to the _API access_ page in the admin UI (available at the URL `/admin/api`). Use the navigation menu item "Configure" and select "API access".
|
|
||||||
|
|
||||||
![The admin UI navigation "Configure" submenu with the API access item highlighted.](/img/admin_configure_api.png)
|
|
||||||
|
|
||||||
On the API access page, use the "New API token" button to navigate to the token creation form.
|
|
||||||
|
|
||||||
![The API access page with the "New API token" button highlighted.](/img/admin_new_api_key_button.png)
|
|
||||||
|
|
||||||
## Step 2: Fill in the API token form {#step-2}
|
|
||||||
|
|
||||||
![API token creation form. ](/img/admin_create_token_form.png)
|
|
||||||
|
|
||||||
Fill in the form with the desired values for the token you want to create. Refer to the [API tokens and client keys](../reference/api-tokens-and-client-keys.mdx#token-data) article for a detailed explanation of what all the fields mean.
|
|
||||||
|
|
||||||
## Using API tokens
|
|
||||||
|
|
||||||
When you have created the API token, it will be listed on the API access page. If you have the required permissions to see the token, you can copy it for easy use in your applications.
|
|
||||||
|
|
||||||
![API access token table with a "copy token" button highlighted.](/img/admin_copy_token.png)
|
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
---
|
|
||||||
title: How to create Personal Access Tokens
|
|
||||||
---
|
|
||||||
|
|
||||||
:::note Availability
|
|
||||||
|
|
||||||
**Version**: `4.17+`
|
|
||||||
|
|
||||||
:::
|
|
||||||
|
|
||||||
Personal access tokens are a tool to enable a user to use the Admin API as themselves with their own set of permissions. See [_how to use the Admin API_](how-to-use-the-admin-api.md) for more information.
|
|
||||||
|
|
||||||
## Step 1: Navigate to the personal access tokens page {#step-1}
|
|
||||||
|
|
||||||
Open the user profile pane in the admin UI and select the _view user profile_ menu item (available at the URL `/profile`).
|
|
||||||
|
|
||||||
![The admin UI navigation "user profile" menu with the view user profile menu item selected.](/img/create-pat-1.png)
|
|
||||||
|
|
||||||
Select the "Personal Access Tokens" menu item.
|
|
||||||
|
|
||||||
![The user profile page with the "Personal Access Tokens" menu item highlighted.](/img/create-pat-2.png)
|
|
||||||
|
|
||||||
## Step 2: Navigate to New Token {#step-2}
|
|
||||||
|
|
||||||
Navigate to "New Token".
|
|
||||||
|
|
||||||
![The New Token element highlighted. ](/img/create-pat-3.png)
|
|
||||||
|
|
||||||
## Step 3: Fill in the create personal API token form and create it {#step-3}
|
|
||||||
|
|
||||||
Give your token a description and optionally set an expiry date. By default the expiry date is set to 30 days.
|
|
||||||
|
|
||||||
![The New Token form with the description text box and create element highlighted. ](/img/create-pat-4.png)
|
|
||||||
|
|
||||||
## Step 4: Save your token {#step-4}
|
|
||||||
|
|
||||||
Once your new token is created, the popup will display the new token details. You must save your token somewhere outside of Unleash, you won't be able to access it again.
|
|
||||||
|
|
||||||
![The token created popup with the "Copy Token" element highlighted. ](/img/create-pat-5.png)
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
---
|
|
||||||
title: How to create Project API Tokens
|
|
||||||
---
|
|
||||||
|
|
||||||
:::info Permissions
|
|
||||||
|
|
||||||
Creating Project API tokens requires you to have the `CREATE_PROJECT_API_TOKEN` permission.
|
|
||||||
|
|
||||||
:::
|
|
||||||
|
|
||||||
Unleash SDKs use API tokens to authenticate to the Unleash API. Unleash supports different types of API tokens, each with different levels of access and privileges. Refer to the [API tokens and client keys documentation](../reference/api-tokens-and-client-keys.mdx) for a complete overview of the different token types.
|
|
||||||
|
|
||||||
## Step 1: Navigate to the API token creation form {#step-1}
|
|
||||||
|
|
||||||
Navigate to the Project _API access_ page in the admin UI (available at the URL `/admin/projects/<project-name>/api-access`). Use the navigation tab "Project Settings" and select "API access".
|
|
||||||
|
|
||||||
![The Project overview "Project settings" submenu with the API access item highlighted.](/img/configure_project_api.png)
|
|
||||||
|
|
||||||
On the API access page, use the "New API token" button to navigate to the token creation form.
|
|
||||||
|
|
||||||
![The Project API access page with the "New API token" button highlighted.](/img/admin_new_project_api_key_button.png)
|
|
||||||
|
|
||||||
## Step 2: Fill in the API token form {#step-2}
|
|
||||||
|
|
||||||
![Project API token creation form. ](/img/admin_create_project_token_form.png)
|
|
||||||
|
|
||||||
Fill in the form with the desired values for the token you want to create. Refer to the [API tokens and client keys](../reference/api-tokens-and-client-keys.mdx#api-tokens) article for a detailed explanation of what all the fields mean.
|
|
||||||
|
|
||||||
## Using Project API tokens
|
|
||||||
|
|
||||||
When you have created the Project API token, it will be listed on the Project API access page. If you have the required permissions to see the token (`READ_PROJECT_API_TOKEN`), you can copy it for easy use in your applications.
|
|
||||||
|
|
||||||
![API access token table with a "copy token" button highlighted.](/img/copy_project_token.png)
|
|
@ -3,12 +3,13 @@ title: API Tokens and Client Keys
|
|||||||
pagination_next: reference/front-end-api
|
pagination_next: reference/front-end-api
|
||||||
---
|
---
|
||||||
|
|
||||||
Unleash uses API keys to facilitate communication between consuming clients such as [SDKs](../reference/sdks), [Edge](../reference/edge) or other tools and automation.
|
Unleash uses API keys to facilitate communication between consuming clients such as [SDKs](../reference/sdks), [Edge](../reference/edge), or other tools and automation.
|
||||||
|
|
||||||
Unleash supports the following types of API tokens:
|
Unleash supports the following types of API tokens:
|
||||||
- [Client tokens](#client-tokens) for connecting server-side client SDKs, Unleash Edge, and Unleash Proxy to the Unleash server.
|
- [Client tokens](#client-tokens) for connecting server-side client SDKs, Unleash Edge, and Unleash Proxy to Unleash.
|
||||||
- [Frontend tokens](#frontend-tokens) for connecting client-side SDKs to Unleash using the Frontend API.
|
- [Frontend tokens](#frontend-tokens) for connecting client-side SDKs to Unleash using the Frontend API.
|
||||||
- [Personal access tokens](#personal-access-tokens) for testing and debugging or providing temporary access to an automation tool.
|
- [Personal access tokens](#personal-access-tokens) for testing and debugging or providing temporary access to an automation tool.
|
||||||
|
- [Service account tokens](/reference/service-accounts) for providing API access to integrations or automation tools.
|
||||||
|
|
||||||
## API token types
|
## API token types
|
||||||
|
|
||||||
@ -21,7 +22,7 @@ Client tokens are intended for use in [server-side client SDKs](../reference/sdk
|
|||||||
|
|
||||||
Client tokens are scoped to one or more projects and a single environment. When creating a client token, you can give it access to a specific list of projects or to all current or future projects. Client tokens are secrets and must not be exposed to end users.
|
Client tokens are scoped to one or more projects and a single environment. When creating a client token, you can give it access to a specific list of projects or to all current or future projects. Client tokens are secrets and must not be exposed to end users.
|
||||||
|
|
||||||
Client tokens cannot be used in Frontend SDKs, use [Frontend tokens](#frontend-tokens) instead.
|
Client tokens cannot be used in frontend SDKs, use [Frontend tokens](#frontend-tokens) instead.
|
||||||
|
|
||||||
### Frontend tokens
|
### Frontend tokens
|
||||||
|
|
||||||
@ -45,11 +46,15 @@ Personal access tokens with a lifetime expire and stop working after their expir
|
|||||||
|
|
||||||
Personal access tokens are not suitable for Client SDKs, as they cannot read flag data from multiple environments, they may expire, or their permissions may change. Use [Client tokens](#client-tokens) instead.
|
Personal access tokens are not suitable for Client SDKs, as they cannot read flag data from multiple environments, they may expire, or their permissions may change. Use [Client tokens](#client-tokens) instead.
|
||||||
|
|
||||||
|
### Service account tokens
|
||||||
|
|
||||||
|
Service account tokens provide API access to integration and automation tools. To learn more, go to [Service Accounts](/reference/service-accounts).
|
||||||
|
|
||||||
### Admin tokens
|
### Admin tokens
|
||||||
|
|
||||||
:::warning
|
:::warning
|
||||||
|
|
||||||
Admin tokens are deprecated. Use other tokens types:
|
Admin tokens are deprecated. Use other token types:
|
||||||
- With [Open Source](https://www.getunleash.io/pricing) and [Pro](../availability#plans), use [personal access tokens](#personal-access-tokens).
|
- With [Open Source](https://www.getunleash.io/pricing) and [Pro](../availability#plans), use [personal access tokens](#personal-access-tokens).
|
||||||
- With [Enterprise](https://www.getunleash.io/pricing), use [service accounts](./service-accounts).
|
- With [Enterprise](https://www.getunleash.io/pricing), use [service accounts](./service-accounts).
|
||||||
|
|
||||||
@ -68,20 +73,20 @@ Admin tokens grant full read and write access to all resources in the Unleash se
|
|||||||
|
|
||||||
The following table provides a summary of what ...:
|
The following table provides a summary of what ...:
|
||||||
|
|
||||||
| Role/Permission | Details |
|
| Role/Permission | Details |
|
||||||
|---------------------------------------------------|-------------------------------------------------------------------------|
|
|-----------------------------------------------|-------------------------------------------------------------------------|
|
||||||
| **Admin Root Role** | Can view, create, update, or delete tokens for any project. |
|
| Admin root role | Can view, create, update, or delete tokens for any project. |
|
||||||
| **Custom Root Role with API Token Permission** | Can view, create, update, or delete tokens for any project with the corresponding permission. |
|
| Custom root role with API token permission | Can view, create, update, or delete tokens for any project with the corresponding permission. |
|
||||||
| **Member Project Role** | Can view, create, update, or delete tokens within the project. |
|
| Member project role | Can view, create, update, or delete tokens within the project. |
|
||||||
| **Custom Project Role with API Token Permission** | Can view, create, update, or delete tokens within the project with the corresponding permission. |
|
| Custom project role with API token permission | Can view, create, update, or delete tokens within the project with the corresponding permission. |
|
||||||
| **Viewer Root Role** | Cannot view, create, update, or delete tokens. |
|
| Viewer root role | Cannot view, create, update, or delete tokens. |
|
||||||
| **Any Role** | Can create pesonal access tokens. |
|
| Any role | Can create personal access tokens. |
|
||||||
|
|
||||||
## API token format
|
## API token format
|
||||||
|
|
||||||
API tokens consist of three parts:
|
API tokens consist of three parts:
|
||||||
|
|
||||||
1. Project(s)
|
1. Project information
|
||||||
2. Environment
|
2. Environment
|
||||||
3. Hash
|
3. Hash
|
||||||
|
|
||||||
@ -92,11 +97,11 @@ The parts are separated by two different separators: A colon (`:`) between the p
|
|||||||
```
|
```
|
||||||
|
|
||||||
The project value of the token can be one of:
|
The project value of the token can be one of:
|
||||||
- A single project ID, for example `default`: when the token can only access a single project.
|
- A single project ID, for example, `default`: when the token can only access a single project.
|
||||||
- `[]`: when the token is valid for a specific set of projects*. The list of projects is not shown in the token.
|
- `[]`: when the token is valid for a specific set of projects*. The list of projects is not shown in the token.
|
||||||
- `*`: when the token is **valid for all projects (current and future)**.
|
- `*`: when the token is **valid for all projects (current and future)**.
|
||||||
|
|
||||||
The environment is the name of an environment on your Unleash instance, such as `development`. The hash is 64 character long hexadecimal string.
|
The environment is the name of an environment on your Unleash instance, such as `development`. The hash is 64-character long hexadecimal string.
|
||||||
|
|
||||||
Personal access tokens start with the string `user`, and do not contain additional project or environment information.
|
Personal access tokens start with the string `user`, and do not contain additional project or environment information.
|
||||||
|
|
||||||
@ -128,7 +133,10 @@ be44368985f7fb3237c584ef86f3d6bdada42ddbd63a019d26955178
|
|||||||
|
|
||||||
## Create an API token
|
## Create an API token
|
||||||
|
|
||||||
### Create an API token
|
Depending on your [permissions](#api-token-permissions), you can create API tokens in the Unleash Admin UI in three ways:
|
||||||
|
- **Admin > API access**: for client or frontend tokens; requires the Admin root role, or a custom root role with API token permissions.
|
||||||
|
- **Settings > API access** inside a project: for a project-specific client or frontend tokens; permitted for project Members or users with a [corresponding root role](#api-token-permissions).
|
||||||
|
- **Profile > View profile settings > Personal API tokens**: for personal access token.
|
||||||
|
|
||||||
### Create a personal access token
|
### Create a personal access token
|
||||||
|
|
||||||
@ -136,7 +144,7 @@ be44368985f7fb3237c584ef86f3d6bdada42ddbd63a019d26955178
|
|||||||
|
|
||||||
:::warning
|
:::warning
|
||||||
|
|
||||||
Unleash Proxy is in maintanance mode. Use [Unleash Edge](../reference/edge) instead.
|
Unleash Proxy is in maintenance mode. Use [Unleash Edge](../reference/edge) instead.
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@ -150,4 +158,4 @@ To designate a string as a proxy client key, add it to the `clientKeys` list whe
|
|||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
Proxy clients keys cannot be used to connect to the Unleash API, use [API tokens](#api-tokens) instead.
|
Proxy client keys cannot be used to connect to the Unleash API, use [API tokens](#api-tokens) instead.
|
||||||
|
@ -13,7 +13,7 @@ The docs in this category are legacy documentation. You should prefer to use the
|
|||||||
|
|
||||||
This describes the API provided to unleash-clients.
|
This describes the API provided to unleash-clients.
|
||||||
|
|
||||||
Since v4.0.0 all operations require an [API token](/how-to/how-to-create-api-tokens.mdx) with `Client` level access.
|
Since v4.0.0 all operations require an [API token](/reference/api-tokens-and-client-keys) with `Client` level access.
|
||||||
|
|
||||||
With versions earlier than v4.0.0 and `insecure` authentication no authentication is required.
|
With versions earlier than v4.0.0 and `insecure` authentication no authentication is required.
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ With versions earlier than v4.0.0 and `insecure` authentication no authenticatio
|
|||||||
|
|
||||||
## Admin API (internal) {#admin-api-internal}
|
## Admin API (internal) {#admin-api-internal}
|
||||||
|
|
||||||
The internal API used by the Admin UI (unleash-frontend). Since v4.0.0 all operations require an [API token](/how-to/how-to-create-api-tokens) with `Admin` level access:
|
The internal API used by the Admin UI (unleash-frontend). Since v4.0.0 all operations require an [API token](/reference/api-tokens-and-client-keys) with `Admin` level access:
|
||||||
|
|
||||||
With versions earlier than v4.0.0 and `insecure` authentication Basic Auth (with curl `-u myemail@test.com:`) is enough.
|
With versions earlier than v4.0.0 and `insecure` authentication Basic Auth (with curl `-u myemail@test.com:`) is enough.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Front-end API Access
|
title: Frontend API
|
||||||
---
|
---
|
||||||
|
|
||||||
:::note Availability
|
:::note Availability
|
||||||
@ -8,41 +8,36 @@ title: Front-end API Access
|
|||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
The **Unleash front-end API** offers a simplified workflow for connecting a client-side (front-end) applications to Unleash. It provides the exact same API as [Unleash edge](https://docs.getunleash.io/reference/unleash-edge) and the [Unleash proxy - deprecated](../generated/unleash-proxy.md). The front-end API is a quick and easy way to add Unleash to single-page applications and mobile apps.
|
The Unleash Frontend API offers a simplified workflow for connecting a client-side applications to Unleash. It provides the exact same API as [Unleash edge](https://docs.getunleash.io/reference/unleash-edge) and [Unleash proxy - deprecated](../generated/unleash-proxy.md). The frontend API is a quick and easy way to add Unleash to single-page applications and mobile apps.
|
||||||
|
|
||||||
|
Compared to using Unleash Edge, using the Frontend API has both benefits and drawbacks. The benefits are:
|
||||||
|
|
||||||
Compared to using Unleash Edge, using the Unleash front-end API has both benefits and drawbacks. The benefits are:
|
- **You don't need to configure and run Unleash Edge.** The Frontend API is part of Unleash itself and not an external process. All clients will work exactly the same as they would with Unleash Edge.
|
||||||
|
|
||||||
- **You don't need to configure and run Unleash Edge.** The front-end API is part of Unleash itself and not an external process. All clients will work exactly the same as they would with Unleash Edge.
|
On the other hand, using the Frontend API has the following drawbacks compared to using Unleash Edge:
|
||||||
|
|
||||||
On the other hand, using the front-end API has the following drawbacks compared to using Unleash Edge:
|
- **It can't handle a large number of requests per second.** Because the Frontend API is part of Unleash, you can't scale it horizontally the way you can scale Unleash Edge.
|
||||||
|
|
||||||
- **It can't handle a large number of requests per second.** Because the front-end API is part of Unleash, you can't scale it horizontally the way you can scale Unleash Edge.
|
|
||||||
- **It sends client details to your Unleash instance.** Unleash only stores these details in its short-term runtime cache, but this can be a privacy issue for some use cases.
|
- **It sends client details to your Unleash instance.** Unleash only stores these details in its short-term runtime cache, but this can be a privacy issue for some use cases.
|
||||||
|
|
||||||
These points make the Unleash front-end API best suited for development purposes and applications that don’t receive a lot of traffic, such as internal dashboards. However, because the API is identical to the Unleash Edge API, you can go from one to the other at any time. As such, you can start out by using the front-end API and switch to using Unleash Edge when you need it.
|
These points make the Unleash Frontend API best suited for development purposes and applications that don’t receive a lot of traffic, such as internal dashboards. However, because the API is identical to the Unleash Edge API, you can go from one to the other at any time. As such, you can start out by using the Frontend API and switch to using Unleash Edge when you need it.
|
||||||
|
|
||||||
## Using the Unleash front-end API
|
## Using the Unleash Frontend API
|
||||||
|
|
||||||
When using the front-end API in an SDK, there's three things you need to configure.
|
When using the Frontend API in an SDK, there's three things you need to configure.
|
||||||
|
|
||||||
### Front-end API tokens
|
|
||||||
|
|
||||||
As a client-side API, you should use a [front-end API token](../reference/api-tokens-and-client-keys.mdx#front-end-tokens) to interact with it. Refer to the [how to create API tokens](../how-to/how-to-create-api-tokens.mdx) guide for steps on how to create API tokens.
|
|
||||||
|
|
||||||
### Cross-origin resource sharing (CORS) configuration {#cors}
|
### Cross-origin resource sharing (CORS) configuration {#cors}
|
||||||
|
|
||||||
You need to allow traffic from your application domains to use the Unleash front-end API with web and hybrid mobile applications. You can update the front-end API CORS settings from the Unleash UI under _admin \> CORS_ or by using the API.
|
You need to allow traffic from your application domains to use the Unleash Frontend API with web and hybrid mobile applications. You can update the Frontend API CORS settings from the Unleash UI under _admin \> CORS_ or by using the API.
|
||||||
|
|
||||||
### API URL
|
### API URL
|
||||||
|
|
||||||
The client needs to point to the correct API endpoint. The front-end API is available at `<your-unleash-instance>/api/frontend`.
|
The client needs to point to the correct API endpoint. The Frontend API is available at `<your-unleash-instance>/api/frontend`.
|
||||||
|
|
||||||
<!-- Point to the API docs when they're published -->
|
<!-- Point to the API docs when they're published -->
|
||||||
|
|
||||||
### API token
|
### API token
|
||||||
|
|
||||||
You can create appropriate token, with type `FRONTEND` on `<YOUR_UNLEASH_URL>/api/admin/create-token` page or with a request to `/api/admin/api-tokens`. See our guide on [how to create API tokens](../how-to/how-to-create-api-tokens.mdx) for more details.
|
The client needs a frontend [token](../reference/api-tokens-and-client-keys.mdx#front-end-tokens) to interacti witht he Frontend API.
|
||||||
|
|
||||||
### Refresh interval for tokens
|
### Refresh interval for tokens
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ title: SDK overview
|
|||||||
|
|
||||||
import VideoContent from '@site/src/components/VideoContent.jsx'
|
import VideoContent from '@site/src/components/VideoContent.jsx'
|
||||||
|
|
||||||
To connect your application to Unleash you need a [client SDK](#official-sdks) for your programming language and an [API token](../how-to/how-to-create-api-tokens). The SDK handles connecting to the Unleash server instance and retrieving feature flags based on your configuration. All versions of Unleash (OSS, Pro, and Enterprise) use the same client SDKs.
|
To connect your application to Unleash you need a [client SDK](#official-sdks) for your programming language and an [API token](./api-tokens-and-client-keys). The SDK handles connecting to the Unleash server instance and retrieving feature flags based on your configuration. All versions of Unleash (OSS, Pro, and Enterprise) use the same client SDKs.
|
||||||
|
|
||||||
Unleash provides official client SDKs for a number of programming languages. Additionally, our community has developed and contributed SDKs for other languages. So if you can't find your favorite language in the list of official SDKs, check out the [list of clients written by our fantastic community](#community-sdks).
|
Unleash provides official client SDKs for a number of programming languages. Additionally, our community has developed and contributed SDKs for other languages. So if you can't find your favorite language in the list of official SDKs, check out the [list of clients written by our fantastic community](#community-sdks).
|
||||||
|
|
||||||
|
@ -8,26 +8,16 @@ title: Service Accounts
|
|||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
Service accounts are accounts that act as normal Unleash users and that respect the same set of permissions, but that don't represent real users. These accounts do not have a password and cannot log in to the Unleash UI. Instead, they are intended to be used to access the Unleash API programmatically, providing integrations an identity.
|
Service accounts provide an identity for integration and automation tools to access the Unleash API. You can assign tokens to service accounts which gives them a granular set of permissions. Service accounts do not have a password and, as such, cannot access the Unleash Admin UI.
|
||||||
|
|
||||||
![Service account table](/img/service-account-table.png)
|
## Create a service account
|
||||||
|
|
||||||
Use service accounts to:
|
To create service accounts in the Unleash Admin UI:
|
||||||
|
1. Go to **Admin > Service accounts.**
|
||||||
|
2. Enter a name and username for the service account and select a root role.
|
||||||
|
3. Optionally create and assign a service account token. You can also generate one later.
|
||||||
|
4. Click **Save service account**.
|
||||||
|
|
||||||
- Provide a user-like identity to an integration or automation and manage it within Unleash
|
When a service account creates or modifies resources, Unleash uses the username of the account as the value for the _Created by_ or _Changed_ by properties of events.
|
||||||
- Give access to the Unleash API without giving access to the Unleash UI
|
|
||||||
- Provide more fine-grained permissions than an admin token provides
|
|
||||||
|
|
||||||
In order to create a service account, you can follow the [how to create service accounts](../how-to/how-to-create-service-accounts.mdx) guide.
|
|
||||||
|
|
||||||
## Service account tokens
|
|
||||||
|
|
||||||
Service account tokens allow service accounts to use the Admin API as themselves with their own set of permissions, rather than using an admin token. See [_how to use the Admin API_](../how-to/how-to-use-the-admin-api.md) for more information.
|
|
||||||
|
|
||||||
These tokens act just like [personal access tokens](./api-tokens-and-client-keys.mdx#personal-access-tokens) for the service accounts, except that they are managed by Unleash admins.
|
|
||||||
|
|
||||||
When you use a service account token to modify resources, the events record the service account name for that operation.
|
|
||||||
|
|
||||||
Service account tokens can be managed by editing the respective service account:
|
|
||||||
|
|
||||||
![Service account tokens](/img/service-account-tokens.png)
|
![Service account tokens](/img/service-account-tokens.png)
|
||||||
|
@ -81,7 +81,7 @@ You'll need to configure Edge and the SDKs.
|
|||||||
|
|
||||||
### On Unleash
|
### On Unleash
|
||||||
|
|
||||||
- Create one or more [client API tokens](https://docs.getunleash.io/reference/api-tokens-and-client-keys#client-tokens) scoped to the projects/environments you wish to use the Edge instance for. Refer to [how to create API tokens](https://docs.getunleash.io/how-to/how-to-create-api-tokens) for the steps to create one.
|
- Create one or more [client API tokens](https://docs.getunleash.io/reference/api-tokens-and-client-keys#client-tokens) scoped to the projects/environments you wish to use the Edge instance for.
|
||||||
- Create frontend tokens for the frontend apps that will retrieve feature flags from Edge.
|
- Create frontend tokens for the frontend apps that will retrieve feature flags from Edge.
|
||||||
|
|
||||||
### On Edge
|
### On Edge
|
||||||
@ -169,7 +169,7 @@ You'll need to configure the proxy and the proxy client SDKs.
|
|||||||
For the proxy, configure:
|
For the proxy, configure:
|
||||||
|
|
||||||
- The Unleash API url. This is your Unleash instance URL followed by `/api`.
|
- The Unleash API url. This is your Unleash instance URL followed by `/api`.
|
||||||
- A [client API token](../reference/api-tokens-and-client-keys.mdx#client-tokens). Refer to [how to create API tokens](../how-to/how-to-create-api-tokens.mdx) for the steps to create one.
|
- A [client API token](../reference/api-tokens-and-client-keys.mdx#client-tokens).
|
||||||
- One or more [proxy client keys](../reference/api-tokens-and-client-keys.mdx#proxy-client-keys). Refer to the [configuration section of the proxy document](../reference/unleash-proxy#configuration) for more details.
|
- One or more [proxy client keys](../reference/api-tokens-and-client-keys.mdx#proxy-client-keys). Refer to the [configuration section of the proxy document](../reference/unleash-proxy#configuration) for more details.
|
||||||
|
|
||||||
For the proxy client SDK, configure:
|
For the proxy client SDK, configure:
|
||||||
|
@ -23,7 +23,7 @@ Before you can connect your application to Unleash you need a Unleash server. Yo
|
|||||||
![A visual overview of an Unleash system as described in the following paragraph.](/img/unleash-architecture-edge.png 'System Overview')
|
![A visual overview of an Unleash system as described in the following paragraph.](/img/unleash-architecture-edge.png 'System Overview')
|
||||||
|
|
||||||
- [**Unleash API**](/reference/api/unleash) - The Unleash instance. This is where you create feature flags, configure activation strategies, and parameters, etc. The service that contains all feature flags and their configurations. Configurations declare which activation strategies to use and which parameters they should get.
|
- [**Unleash API**](/reference/api/unleash) - The Unleash instance. This is where you create feature flags, configure activation strategies, and parameters, etc. The service that contains all feature flags and their configurations. Configurations declare which activation strategies to use and which parameters they should get.
|
||||||
- **Unleash Admin UI** - The bundled web interface for interacting with the Unleash instance. Manage flags, define strategies, look at metrics, and much more. Use the UI to [create feature flags](/how-to-create-feature-flag), [manage project access roles](../how-to/how-to-create-and-assign-custom-project-roles), [create API tokens](../how-to/how-to-create-api-tokens), and more.
|
- **Unleash Admin UI** - The bundled web interface for interacting with the Unleash instance. Manage flags, define strategies, look at metrics, and much more. Use the UI to [create feature flags](/how-to-create-feature-flag), [manage project access roles](../how-to/how-to-create-and-assign-custom-project-roles), [create API tokens](/reference/api-tokens-and-client-keys), and more.
|
||||||
- [**Unleash SDKs**](../reference/sdks) - Unleash SDKs integrate into your applications and get feature configurations from the Unleash API. Use them to check whether features are enabled or disabled and to send metrics to the Unleash API. [See all our SDKs](../reference/sdks)
|
- [**Unleash SDKs**](../reference/sdks) - Unleash SDKs integrate into your applications and get feature configurations from the Unleash API. Use them to check whether features are enabled or disabled and to send metrics to the Unleash API. [See all our SDKs](../reference/sdks)
|
||||||
- [**Unleash Edge**](../reference/unleash-edge) - The Unleash Edge sits between front-end and native applications on one side and the Unleash API on the other. It can also sit between server-side SDKs and the Unleash API as well. You can scale it independently of the Unleash API to handle large request rates without causing issues for the Unleash API. Edge has all endpoints for the client API, frontend API, and proxy API.
|
- [**Unleash Edge**](../reference/unleash-edge) - The Unleash Edge sits between front-end and native applications on one side and the Unleash API on the other. It can also sit between server-side SDKs and the Unleash API as well. You can scale it independently of the Unleash API to handle large request rates without causing issues for the Unleash API. Edge has all endpoints for the client API, frontend API, and proxy API.
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ docker run -p 4242:4242 \
|
|||||||
|
|
||||||
## Create an api token for your client {#create-an-api-token-for-your-client}
|
## Create an api token for your client {#create-an-api-token-for-your-client}
|
||||||
|
|
||||||
- [API Token creation](../../how-to/how-to-create-api-tokens.mdx)
|
- [Create an API token](/reference/api-tokens-and-client-keys.mdx).
|
||||||
|
|
||||||
## Test your server and create a sample API call {#test-your-server-and-create-a-sample-api-call}
|
## Test your server and create a sample API call {#test-your-server-and-create-a-sample-api-call}
|
||||||
|
|
||||||
|
@ -332,13 +332,6 @@ const config: Config = {
|
|||||||
{
|
{
|
||||||
fromExtensions: ['html', 'htm'],
|
fromExtensions: ['html', 'htm'],
|
||||||
redirects: [
|
redirects: [
|
||||||
{
|
|
||||||
to: '/how-to/how-to-create-api-tokens',
|
|
||||||
from: [
|
|
||||||
'/user_guide/api-token',
|
|
||||||
'/deploy/user_guide/api-token',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
from: '/advanced/audit_log',
|
from: '/advanced/audit_log',
|
||||||
to: '/reference/events',
|
to: '/reference/events',
|
||||||
|
@ -704,10 +704,6 @@ const sidebars: SidebarsConfig = {
|
|||||||
slug: '/how-to/api',
|
slug: '/how-to/api',
|
||||||
},
|
},
|
||||||
items: [
|
items: [
|
||||||
'how-to/how-to-create-api-tokens',
|
|
||||||
'how-to/how-to-create-personal-access-tokens',
|
|
||||||
'how-to/how-to-create-project-api-tokens',
|
|
||||||
'how-to/how-to-create-service-accounts',
|
|
||||||
'how-to/how-to-download-login-history',
|
'how-to/how-to-download-login-history',
|
||||||
'how-to/how-to-use-the-admin-api',
|
'how-to/how-to-use-the-admin-api',
|
||||||
'how-to/how-to-enable-openapi',
|
'how-to/how-to-enable-openapi',
|
||||||
|
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 300 KiB |
Before Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 298 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 286 KiB |
@ -33,12 +33,27 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/user_guide/api-token",
|
"source": "/user_guide/api-token",
|
||||||
"destination": "/how-to/how-to-create-api-tokens",
|
"destination": "/reference/api-tokens-and-client-keys",
|
||||||
"permanent": true
|
"permanent": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "/deploy/user_guide/api-token",
|
"source": "/deploy/user_guide/api-token",
|
||||||
"destination": "/how-to/how-to-create-api-tokens",
|
"destination": "/reference/api-tokens-and-client-keys",
|
||||||
|
"permanent": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "/how-to/how-to-create-api-tokens",
|
||||||
|
"destination": "/reference/api-tokens-and-client-keys",
|
||||||
|
"permanent": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "/how-to/how-to-project-api-tokens",
|
||||||
|
"destination": "/reference/api-tokens-and-client-keys",
|
||||||
|
"permanent": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "/how-to/how-to-personal-access-tokens",
|
||||||
|
"destination": "/reference/api-tokens-and-client-keys",
|
||||||
"permanent": true
|
"permanent": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|