From c05ebdb3d64432c55ce6f34af7ff470af26fce87 Mon Sep 17 00:00:00 2001 From: melindafekete Date: Mon, 3 Feb 2025 12:10:22 +0100 Subject: [PATCH] Fix typos and update links --- src/lib/openapi/spec/create-pat-schema.ts | 2 +- src/lib/openapi/spec/pat-schema.ts | 2 +- src/lib/openapi/spec/pats-schema.ts | 2 +- src/lib/routes/admin-api/user/pat.ts | 6 +++--- website/docs/how-to/how-to-create-api-tokens.mdx | 6 +++--- website/docs/how-to/how-to-use-the-admin-api.md | 2 +- .../docs/reference/api-tokens-and-client-keys.mdx | 4 ++-- website/docs/reference/front-end-api.md | 6 +++--- website/docs/reference/service-accounts.md | 8 ++++---- .../docs/understanding-unleash/proxy-hosting.mdx | 6 +++--- .../understanding-unleash/unleash-overview.md | 2 +- .../docs/using-unleash/deploy/getting-started.md | 2 +- website/vercel.json | 15 ++++++++++----- 13 files changed, 34 insertions(+), 29 deletions(-) diff --git a/src/lib/openapi/spec/create-pat-schema.ts b/src/lib/openapi/spec/create-pat-schema.ts index b99075acc7..3bcb998f97 100644 --- a/src/lib/openapi/spec/create-pat-schema.ts +++ b/src/lib/openapi/spec/create-pat-schema.ts @@ -3,7 +3,7 @@ import type { FromSchema } from 'json-schema-to-ts'; export const createPatSchema = { $id: '#/components/schemas/createPatSchema', description: - 'Describes the properties required to create a [personal access token](https://docs.getunleash.io/how-to/how-to-create-personal-access-tokens), or PAT. PATs are automatically scoped to the authenticated user.', + 'Describes the properties required to create a [personal access token](https://docs.getunleash.io/reference/api-tokens-and-client-keys#personal-access-tokens), or PAT. PATs are automatically scoped to the authenticated user.', type: 'object', required: ['description', 'expiresAt'], properties: { diff --git a/src/lib/openapi/spec/pat-schema.ts b/src/lib/openapi/spec/pat-schema.ts index 0428206d23..8f2194e158 100644 --- a/src/lib/openapi/spec/pat-schema.ts +++ b/src/lib/openapi/spec/pat-schema.ts @@ -5,7 +5,7 @@ export const patSchema = { $id: '#/components/schemas/patSchema', type: 'object', description: - 'Describes a [personal access token](https://docs.getunleash.io/how-to/how-to-create-personal-access-tokens), or PAT. PATs are automatically scoped to the authenticated user.', + 'Describes a [personal access token](https://docs.getunleash.io/reference/api-tokens-and-client-keys#personal-access-tokens), or PAT. PATs are automatically scoped to the authenticated user.', required: ['id', 'createdAt', ...createPatSchema.required], properties: { id: { diff --git a/src/lib/openapi/spec/pats-schema.ts b/src/lib/openapi/spec/pats-schema.ts index d9255fe890..a209daf2ff 100644 --- a/src/lib/openapi/spec/pats-schema.ts +++ b/src/lib/openapi/spec/pats-schema.ts @@ -5,7 +5,7 @@ export const patsSchema = { $id: '#/components/schemas/patsSchema', type: 'object', description: - 'Contains a collection of [personal access tokens](https://docs.getunleash.io/how-to/how-to-create-personal-access-tokens), or PATs. PATs are automatically scoped to the authenticated user.', + 'Contains a collection of [personal access tokens](https://docs.getunleash.io/reference/api-tokens-and-client-keys#personal-access-tokens), or PATs. PATs are automatically scoped to the authenticated user.', properties: { pats: { type: 'array', diff --git a/src/lib/routes/admin-api/user/pat.ts b/src/lib/routes/admin-api/user/pat.ts index edec5f013b..7a4837557a 100644 --- a/src/lib/routes/admin-api/user/pat.ts +++ b/src/lib/routes/admin-api/user/pat.ts @@ -62,7 +62,7 @@ export default class PatController extends Controller { summary: 'Get all personal access tokens (PATs) for the current user.', description: - 'Returns all of the [personal access tokens](https://docs.getunleash.io/how-to/how-to-create-personal-access-tokens) (PATs) belonging to the current user.', + 'Returns all of the [personal access tokens](https://docs.getunleash.io/reference/api-tokens-and-client-keys#personal-access-tokens) (PATs) belonging to the current user.', responses: { 200: createResponseSchema(patsSchema.$id), ...getStandardResponses(401, 403, 404), @@ -82,7 +82,7 @@ export default class PatController extends Controller { summary: 'Create a new personal access token (PAT) for the current user.', description: - 'Creates a new [personal access token](https://docs.getunleash.io/how-to/how-to-create-personal-access-tokens) (PAT) belonging to the current user.', + 'Creates a new [personal access token](https://docs.getunleash.io/reference/api-tokens-and-client-keys#personal-access-tokens (PAT) belonging to the current user.', requestBody: createRequestSchema(createPatSchema.$id), responses: { 201: resourceCreatedResponseSchema(patSchema.$id), @@ -105,7 +105,7 @@ export default class PatController extends Controller { summary: 'Delete a personal access token (PAT) for the current user.', description: - 'Deletes a [personal access token](https://docs.getunleash.io/how-to/how-to-create-personal-access-tokens) (PAT) belonging to the current user.', + 'Deletes a [personal access token](https://docs.getunleash.io/reference/api-tokens-and-client-keys#personal-access-tokens) (PAT) belonging to the current user.', parameters: [ { name: 'id', diff --git a/website/docs/how-to/how-to-create-api-tokens.mdx b/website/docs/how-to/how-to-create-api-tokens.mdx index 83609f1a7e..ee5e051ef6 100644 --- a/website/docs/how-to/how-to-create-api-tokens.mdx +++ b/website/docs/how-to/how-to-create-api-tokens.mdx @@ -2,9 +2,9 @@ title: How to create API Tokens --- -Depending on your [permissions](#api-token-permissions), you can create API tokens in the Unleash Admin UI in three ways: +Depending on your [permissions](../reference/api-tokens-and-client-tokens#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. +- **Settings > API access** inside a project: for project-specific client or frontend tokens; permitted for project Members or users with a [corresponding root role](../reference/api-tokens-and-client-tokens#api-token-permissions). +- **Profile > View profile settings > Personal API tokens**: for personal access tokens. diff --git a/website/docs/how-to/how-to-use-the-admin-api.md b/website/docs/how-to/how-to-use-the-admin-api.md index 4e7a8cf7d8..f993e5ea32 100644 --- a/website/docs/how-to/how-to-use-the-admin-api.md +++ b/website/docs/how-to/how-to-use-the-admin-api.md @@ -6,7 +6,7 @@ This guide explains the steps required to using the Admin API. ## Create API token -First you'll need to create a [personal access token](/reference/api-tokens-and-client-keys.mdx#personal-access-tokens). +First, you'll need to create a [personal access token](/reference/api-tokens-and-client-keys.mdx#personal-access-tokens). Please note that it may take up to 60 seconds for the new key to propagate to all Unleash instances due to eager caching. diff --git a/website/docs/reference/api-tokens-and-client-keys.mdx b/website/docs/reference/api-tokens-and-client-keys.mdx index 272ad31034..ca24f37a30 100644 --- a/website/docs/reference/api-tokens-and-client-keys.mdx +++ b/website/docs/reference/api-tokens-and-client-keys.mdx @@ -135,8 +135,8 @@ be44368985f7fb3237c584ef86f3d6bdada42ddbd63a019d26955178 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. +- **Settings > API access** inside a project: for 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 tokens. ### Create a personal access token diff --git a/website/docs/reference/front-end-api.md b/website/docs/reference/front-end-api.md index 0f751e8002..32847fc623 100644 --- a/website/docs/reference/front-end-api.md +++ b/website/docs/reference/front-end-api.md @@ -8,7 +8,7 @@ title: Frontend API ::: -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. +The Unleash Frontend API offers a simplified workflow for connecting 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: @@ -19,7 +19,7 @@ On the other hand, using the Frontend API has the following drawbacks compared t - **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 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 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. +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 Unleash Edge when you need it. ## Using the Unleash Frontend API @@ -37,7 +37,7 @@ The client needs to point to the correct API endpoint. The Frontend API is avail ### API token -The client needs a frontend [token](../reference/api-tokens-and-client-keys.mdx#front-end-tokens) to interacti witht he Frontend API. +The client needs a frontend [token](../reference/api-tokens-and-client-keys.mdx#front-end-tokens) to interacting with the Frontend API. ### Refresh interval for tokens diff --git a/website/docs/reference/service-accounts.md b/website/docs/reference/service-accounts.md index 5a470f86b1..dc78d4cfdf 100644 --- a/website/docs/reference/service-accounts.md +++ b/website/docs/reference/service-accounts.md @@ -8,16 +8,16 @@ title: Service Accounts ::: -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 accounts provide an identity for integration and automation tools to access the Unleash API. You can assign tokens to service accounts which give them a granular set of permissions. Service accounts do not have a password and, as such, cannot access the Unleash Admin UI. ## Create a service account 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. +3. Optionally, create and assign a service account token. You can also generate one later. 4. Click **Save service account**. -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. - ![Service account tokens](/img/service-account-tokens.png) + +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](./events). diff --git a/website/docs/understanding-unleash/proxy-hosting.mdx b/website/docs/understanding-unleash/proxy-hosting.mdx index b8e317f15a..ff4618f3a3 100644 --- a/website/docs/understanding-unleash/proxy-hosting.mdx +++ b/website/docs/understanding-unleash/proxy-hosting.mdx @@ -81,7 +81,7 @@ You'll need to configure Edge and the SDKs. ### 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. +- Create one or more [client API tokens](../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. ### On Edge @@ -169,8 +169,8 @@ You'll need to configure the proxy and the proxy client SDKs. For the proxy, configure: - 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). -- 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. +- A [client API token](../reference/api-tokens-and-client-keys#client-tokens). +- One or more [proxy client keys](../reference/api-tokens-and-client-keys#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: diff --git a/website/docs/understanding-unleash/unleash-overview.md b/website/docs/understanding-unleash/unleash-overview.md index 69c87557ab..cfdba80187 100644 --- a/website/docs/understanding-unleash/unleash-overview.md +++ b/website/docs/understanding-unleash/unleash-overview.md @@ -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') - [**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](/reference/api-tokens-and-client-keys), 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#create-an-api-token), 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 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. diff --git a/website/docs/using-unleash/deploy/getting-started.md b/website/docs/using-unleash/deploy/getting-started.md index ce35590e8d..5025561c57 100644 --- a/website/docs/using-unleash/deploy/getting-started.md +++ b/website/docs/using-unleash/deploy/getting-started.md @@ -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](/reference/api-tokens-and-client-keys.mdx). +- [Create an API token](/reference/api-tokens-and-client-keys#create-an-api-token). ## Test your server and create a sample API call {#test-your-server-and-create-a-sample-api-call} diff --git a/website/vercel.json b/website/vercel.json index c9c6435b4b..c743d24a02 100644 --- a/website/vercel.json +++ b/website/vercel.json @@ -43,17 +43,22 @@ }, { "source": "/how-to/how-to-create-api-tokens", - "destination": "/reference/api-tokens-and-client-keys", + "destination": "/reference/api-tokens-and-client-keys#create-an-api-token", "permanent": true }, { - "source": "/how-to/how-to-project-api-tokens", - "destination": "/reference/api-tokens-and-client-keys", + "source": "/how-to/how-to-create-project-api-tokens", + "destination": "/reference/api-tokens-and-client-keys#create-an-api-token", "permanent": true }, { - "source": "/how-to/how-to-personal-access-tokens", - "destination": "/reference/api-tokens-and-client-keys", + "source": "/how-to/how-to-create-personal-access-tokens", + "destination": "/reference/api-tokens-and-client-keys#create-an-api-token", + "permanent": true + }, + { + "source": "/how-to/how-to-create-personal-access-tokens", + "destination": "/reference/service-accounts#create-a-service-account", "permanent": true }, {