docs: finish user guide updates (#11603)

* finished settings changes

* fix todos

* update titles
This commit is contained in:
Shahed Nasser
2025-02-25 19:04:25 +02:00
committed by GitHub
parent 5d404a3bb8
commit c382ed6ed1
60 changed files with 611 additions and 295 deletions
@@ -1,89 +0,0 @@
---
sidebar_position: 1
---
import { SquareTwoStack, EllipsisHorizontal } from "@medusajs/icons"
export const metadata = {
title: `API Key Management`,
}
# {metadata.title}
In this document, youll learn how to manage publishable API keys in the Medusa Admin.
## What is a Publishable API Key
Publishable API key define resources associated with a public API key. This API key is used by developers when developing a storefront.
Currently, publishable API keys are only associated with sales channels.
---
## Create a Publishable API Key
To create a publishable API key:
1. Go to Settings → API key management.
2. Click on the Create button at the top right.
3. In the new form that opens, enter the title of the API key.
4. Click the Save button.
---
## Copy Token of Publishable API Key
To copy the token of an API key:
1. Go to Settings → API key management.
2. Find the API key you want to copy.
3. Click the <InlineIcon Icon={SquareTwoStack} alt="copy" /> icon in the Key column of the API key.
---
## Edit Publishable API Key Details
To edit the details of an API key:
1. Go to Settings → API key management.
2. Find the publishable API key in the list and click on it.
3. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> icon at the top right of the first section.
4. Choose Edit from the dropdown.
5. In the drawer that opens, edit the publishable API key's details.
6. Once you're done, click the Save button.
---
## Revoke Publishable API Key
<Note type="warning">
Revoking a publishable API key is irreversible.
</Note>
To revoke a publishable API key:
1. Go to Settings → API key management.
2. Find the publishable API key in the list and click on it.
3. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> icon at the top right of the first section.
4. Choose Revoke from the dropdown.
5. Confirm revoking the publishable API key by clicking the Revoke button in the pop-up.
---
## Delete Publishable API Key
<Note type="warning">
Deleting a publishable API key is irreversible.
</Note>
To delete a publishable API key:
1. Go to Settings → API key management.
2. Find the publishable API key in the list and click on it.
3. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> icon at the top right of the first section.
4. Choose Delete from the dropdown.
5. Confirm deleting the publishable API key by clicking the Delete button in the pop-up.
@@ -1,34 +0,0 @@
---
sidebar_position: 1
sidebar_label: "Manage Sales Channels"
---
export const metadata = {
title: `Manage Sales Channels of a Publishable API Key`,
}
# {metadata.title}
In this document, you'll learn how to manage the sales channels of a publishable API key.
## Add Sales Channels
To add sales channels to a publishable API key:
1. Go to Settings → API key management.
2. Find the publishable API key in the list and click on it.
3. Under the Sales Channels section, click the Add button.
4. In the list that opens, check the checkbox next the sales channels to add.
5. Once you're done, click the Save button.
---
## Remove Sales Channels
To remove sales channels from a publishable API key:
1. Go to Settings → API key management.
2. Find the publishable API key in the list and click on it.
3. Under the Sales Channels section, check the checkbox next to the sales channels you want to remove.
4. Once you're done, press <Kbd>R</Kbd>
5. Confirm deleting the sales channel by clicking the Delete button in the pop-up.
@@ -1,57 +0,0 @@
---
sidebar_position: 2
sidebar_label: "Executions"
---
import { ArrowsPointingOut } from "@medusajs/icons"
export const metadata = {
title: `View Executions`,
}
# {metadata.title}
In this documentation, you'll learn how to view executions in your store and their details.
## What is an Execution?
An execution refers to a workflow that's been executed. You can view a workflow execution's progress, details, and raw JSON data all from the Medusa Admin.
---
## View Executions
To view all workflow executions, go to Settings → Executions. You'll find a list of executions with general details.
---
## View Execution Details
To view an execution's details:
1. Go to Settings → Executions.
2. Click on the execution to view it.
On the execution's page, you'll find multiple sections with the execution's details.
### Summary Section
In the first section, you'll find a summary of the execution, including its status, workflow ID, transaction ID, and progress.
### Timeline
The timeline diagram shows you the execution step by step. You can zoom in and pan to view the entire diagram.
If you click on a step, you'll be shown the details in the History section.
### History
The History section shows you the execution of the steps in a linear path.
If you click on a step, you'll see its definition, output, and compensation input.
For a failed step, you'll see the error that occurred.
### JSON
The JSON section allows you to see view the execution's details as a raw JSON by clicking the <InlineIcon Icon={ArrowsPointingOut} alt="expand" /> icon.
@@ -4,16 +4,15 @@ sidebar_label: "Developer"
---
export const metadata = {
title: `Developer Settings`,
title: `Developer Settings in Medusa Admin`,
}
# {metadata.title}
The Developer section in the settings allows you to manage developer-related settings, such as API key managements or executions.
The Developer section in the Medusa Admin's settings is useful for developers building customizations for your Medusa application. If you're unsure about how to use these settings, please consult with your technical team.
---
## Manage Developer Settings
## Learn More about Developer Settings
- [API Key Management](./api-key-management/page.mdx)
- [Executions](./executions/page.mdx)
- [Publishable API Keys Management](./publishable-api-keys/page.mdx)
- [Secret API Keys Management](./secret-api-keys/page.mdx)
- [View Workflow Executions](./workflows/page.mdx)
@@ -0,0 +1,168 @@
import { Table } from "docs-ui"
import { EllipsisHorizontal } from "@medusajs/icons"
export const metadata = {
title: `Manage Publishable API Keys in Medusa Admin`,
}
# {metadata.title}
In this guide, you'll learn how to create and manage publishable API keys in the Medusa Admin.
<Note>
This guide is mainly useful for developers and technical teams building customizations for a Medusa application.
</Note>
## What is a Publishable API Key?
A publishable API key is a client key scoped to one or more sales channels. When you build a storefront, you must pass a publishable API key in the request headers indicating the sales channel to scope the request to. This impacts the products retrieved, available stock quantities, and other data.
To learn how to pass the publishable API key in request headers, refer to the [API Reference](!api!/store#publishable-api-key).
---
## View Publishable API Keys
To view the publishable API keys in the Medusa Admin, go to Settings -> Publishable API Keys.
Here, you can see a list of all the publishable API keys you have set up in your store. You can also search, filter, and sort the API keys to find the one you are looking for.
![Publishable API keys list](https://res.cloudinary.com/dza7lstvk/image/upload/v1740489989/User%20Guide/Screenshot_2025-02-25_at_3.26.09_PM_xmpxdw.png)
---
## Create Publishable API Key
To create a new publishable API key:
1. Go to Settings -> Publishable API Keys.
2. Click the Create button at the top right.
3. In the form that opens, enter the publishable API key's title.
4. Once you're done, click the Save button.
![Create publishable API key form](https://res.cloudinary.com/dza7lstvk/image/upload/v1740490166/User%20Guide/Screenshot_2025-02-25_at_3.28.44_PM_aosbhw.png)
---
## View Publishable API Key Details
To view the details of a publishable API key:
1. Go to Settings -> Publishable API Keys.
2. Click on a publishable API key from the list.
This opens the publishable API key's details page where you can also manage the API key.
![Publishable API key details page](https://res.cloudinary.com/dza7lstvk/image/upload/v1740490244/User%20Guide/Screenshot_2025-02-25_at_3.30.35_PM_bgcl23.png)
### Publishable API Key Status
You can see the status of the publishable API key at the top right of the first section in the details page. A publishable API key's status can be:
<Table>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Status</Table.HeaderCell>
<Table.HeaderCell>Description</Table.HeaderCell>
</Table.Row>
</Table.Header>
<Table.Body>
<Table.Row>
<Table.Cell>Active</Table.Cell>
<Table.Cell>The API key is active and can be used in requests.</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Revoked</Table.Cell>
<Table.Cell>The API key has been revoked and can't be used in requests.</Table.Cell>
</Table.Row>
</Table.Body>
</Table>
---
## Copy Publishable API Key
To copy a publishable API key:
1. Go to the publishable API key's details page.
2. In the first section, click on the truncated key to copy it to your clipboard.
![Copy publishable API key](https://res.cloudinary.com/dza7lstvk/image/upload/v1740500116/User%20Guide/Screenshot_2025-02-25_at_6.14.15_PM_muwq9e.png)
---
## Edit Publishable API Key
To edit a publishable API key:
1. Go to the publishable API key's details page.
2. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> at the top right of the first section.
3. Choose "Edit" from the dropdown.
4. In the side window that opens, you can edit the publishable API key's title.
5. Once you're done, click the Save button.
![Edit publishable API key form](https://res.cloudinary.com/dza7lstvk/image/upload/v1740490481/User%20Guide/Screenshot_2025-02-25_at_3.34.28_PM_hxppxj.png)
---
## Manage Publishable API Key's Sales Channels
You can manage the sales channels of a publishable API key in its details page. By adding sales channels to the publishable API key, it becomes part of the scope in requests made with the key.
### Add Sales Channels
To add a sales channel to a publishable API key:
1. Go to the publishable API key's details page.
2. Click the "Add" button at the top right of the "Sales Channels" section.
3. In the list that opens, check the sales channels you want to add the API key to.
4. Once you're done, click the Save button.
![Add sales channels form](https://res.cloudinary.com/dza7lstvk/image/upload/v1740490636/User%20Guide/Screenshot_2025-02-25_at_3.37.05_PM_ontnzy.png)
### Remove Sales Channels
To remove a sales channel from a publishable API key:
1. Go to the publishable API key's details page.
2. Check the checkbox next to the sales channel you want to remove in the "Sales Channels" section.
3. Press <Kbd>R</Kbd> or click the Remove button at the bottom center of the page.
4. Confirm removing the sales channels by clicking the Continue button.
![Remove sales channels from publishable API key](https://res.cloudinary.com/dza7lstvk/image/upload/v1740490931/User%20Guide/Screenshot_2025-02-25_at_3.38.41_PM_pmlbqk.png)
---
## Revoke Publishable API Key
<Note type="warning">
Revoking a publishable API key is irreversible. You can't use the key in requests after revoking it or reactivate it.
</Note>
To revoke a publishable API key:
1. Go to the publishable API key's details page.
2. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> at the top right of the first section.
3. Choose "Revoke API key" from the dropdown.
4. Confirm revoking the API key by clicking the "Revoke API key" button in the pop-up.
---
## Delete Publishable API Key
<Note type="warning">
Deleting a publishable API key is irreversible.
</Note>
You can only delete a publishable API key after [revoking it](#revoke-publishable-api-key). To delete a publishable API key:
1. Go to the publishable API key's details page.
2. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> at the top right of the first section.
3. Choose "Delete" from the dropdown.
4. Confirm deleting the API key by clicking the Delete button in the pop-up.
@@ -0,0 +1,132 @@
import { Table } from "docs-ui"
import { EllipsisHorizontal } from "@medusajs/icons"
export const metadata = {
title: `Manage Secret API Keys in Medusa Admin`,
}
# {metadata.title}
In this guide, you'll learn how to create and manage secret API keys in the Medusa Admin.
<Note>
This guide is mainly useful for developers and technical teams building customizations for a Medusa application.
</Note>
## What is a Secret API Key?
A secret API key is an authentication token that allows you to access Medusa's Admin APIs. You can pass it in request headers to send requests as an authenticated admin user. So, it's important to not expose the secret API key in client-side code or public repositories.
To learn how to pass the secret API key in request headers, refer to the [API Reference](!api!/admin#2-api-token).
---
## View Secret API Keys
To view the secret API keys of the currently logged-in user in the Medusa Admin, go to Settings -> Secret API Keys.
Here, you can see a list of all the secret API keys for the logged-in user. You can also search, filter, and sort the API keys to find the one you are looking for.
![Secret API keys list](https://res.cloudinary.com/dza7lstvk/image/upload/v1740491442/User%20Guide/Screenshot_2025-02-25_at_3.49.04_PM_asthgc.png)
---
## Create Secret API Key
When you create a secret API key, you create it for the currently logged-in user. A user can have one active secret key at a time. So, if you already have one, you must [revoke it](#revoke-secret-api-key) before creating a new one.
To create a new secret API key for the currently logged-in user:
1. Go to Settings -> Secret API Keys.
2. Click the Create button at the top right.
3. In the form that opens, enter the secret API key's title.
4. Once you're done, click the Save button.
5. You'll get a pop-up with the secret API key. Copy it and store it securely before closing the pop-up, as you won't be able to see it again.
![Create secret API key form](https://res.cloudinary.com/dza7lstvk/image/upload/v1740495860/User%20Guide/Screenshot_2025-02-25_at_5.04.07_PM_u91vm5.png)
---
## View Secret API Key Details
To view the details of a secret API key:
1. Go to Settings -> Secret API Keys.
2. Click on a secret API key from the list.
This opens the secret API key's details page where you can also manage the API key.
![Secret API key details page](https://res.cloudinary.com/dza7lstvk/image/upload/v1740496080/User%20Guide/Screenshot_2025-02-25_at_5.07.49_PM_oqt9mf.png)
### Secret API Key Status
You can see the status of the secret API key at the top right of the first section in the details page. A secret API key's status can be:
<Table>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Status</Table.HeaderCell>
<Table.HeaderCell>Description</Table.HeaderCell>
</Table.Row>
</Table.Header>
<Table.Body>
<Table.Row>
<Table.Cell>Active</Table.Cell>
<Table.Cell>The API key is active and can be used in requests.</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Revoked</Table.Cell>
<Table.Cell>The API key has been revoked and can't be used in requests.</Table.Cell>
</Table.Row>
</Table.Body>
</Table>
---
## Edit Secret API Key
To edit a secret API key:
1. Go to the secret API key's details page.
2. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> at the top right of the first section.
3. Choose "Edit" from the dropdown.
4. In the side window that opens, you can edit the secret API key's title.
5. Once you're done, click the Save button.
![Edit secret API key form](https://res.cloudinary.com/dza7lstvk/image/upload/v1740496144/User%20Guide/Screenshot_2025-02-25_at_5.08.53_PM_o4h3cn.png)
---
## Revoke Secret API Key
<Note type="warning">
Revoking a secret API key is irreversible. You can't use the key in requests after revoking it or reactivate it.
</Note>
To revoke a secret API key:
1. Go to the secret API key's details page.
2. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> at the top right of the first section.
3. Choose "Revoke API key" from the dropdown.
4. Confirm revoking the API key by clicking the "Revoke API key" button in the pop-up.
---
## Delete Secret API Key
<Note type="warning">
Deleting a secret API key is irreversible.
</Note>
You can only delete a secret API key after [revoking it](#revoke-secret-api-key). To delete a secret API key:
1. Go to the secret API key's details page.
2. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> at the top right of the first section.
3. Choose "Delete" from the dropdown.
4. Confirm deleting the API key by clicking the Delete button in the pop-up.
@@ -0,0 +1,164 @@
---
sidebar_position: 2
sidebar_label: "Executions"
---
import { EllipsisHorizontal, ArrowUpRightOnBox } from "@medusajs/icons"
import { Table } from "docs-ui"
export const metadata = {
title: `View Workflow Executions in Medusa Admin`,
}
# {metadata.title}
In this guide, you'll learn how to view workflow executions in the Medusa Admin.
<Note>
This guide is mainly useful for developers and technical teams building and debugging customizations of a Medusa application.
</Note>
## What are Workflow Executions?
[Workflows](!docs!/learn/fundamentals/workflows) are a series of steps that perform a task. You build a workflow in your source code to implement custom commerce flows and features.
When you execute a workflow, it runs the steps in sequence to complete the task. If you've configured the workflow to have its executions stored in the database as explained in [this technical guide](!docs!/learn/fundamentals/workflows/store-executions), you can view the executions and their details in the Medusa Admin. This is useful to debug workflows and ensure they ran as expected.
---
## View Workflow Executions
To view workflow executions, go to Settings → Workflows. There, you'll find the list of custom and Medusa workflows that have been executed and are stored in the database. You can search through the list to find the one you're looking for.
![Workflow executions list](https://res.cloudinary.com/dza7lstvk/image/upload/v1740496862/User%20Guide/Screenshot_2025-02-25_at_5.16.30_PM_fjkbrc.png)
### Workflow Execution Status
In the list, you can view the status of each workflow execution. A workflow's execution status can be:
<Table>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Status</Table.HeaderCell>
<Table.HeaderCell>Description</Table.HeaderCell>
</Table.Row>
</Table.Header>
<Table.Body>
<Table.Row>
<Table.Cell>Not Started</Table.Cell>
<Table.Cell>The workflow has been executed, but its steps haven't been invoked yet.</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Invoking</Table.Cell>
<Table.Cell>The workflow execution is currently running, invoking its steps.</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Done</Table.Cell>
<Table.Cell>The workflow execution has finished successfully.</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Failed</Table.Cell>
<Table.Cell>The workflow execution has failed.</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Compensating</Table.Cell>
<Table.Cell>The workflow execution is compensating its steps after a failure.</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Reverted</Table.Cell>
<Table.Cell>The workflow execution has been reverted, which occurs when the workflow ran as part of another workflow and the parent workflow failed.</Table.Cell>
</Table.Row>
</Table.Body>
</Table>
---
## View Workflow Execution Details
To view a workflow execution's details:
1. Go to Settings → Workflows.
2. Click on the workflow execution to view it.
On the workflow execution's page, you'll find multiple sections with the execution's details.
![Workflow executions details](https://res.cloudinary.com/dza7lstvk/image/upload/v1740496967/User%20Guide/Screenshot_2025-02-25_at_5.22.33_PM_z6al6a.png)
### Summary Section
In the first section, you'll find a summary of the workflow execution, including:
- A badge at the top right indicating its [status](#workflow-execution-status).
- The workflow's unique ID, which you specify when you create the workflow.
- The transaction ID, which is a unique identifier for the workflow execution. This is useful for debugging, tracking, and changing step statuses of [long-running workflows](!docs!/learn/fundamentals/workflows/long-running-workflow).
- The workflow's progress which shows a quick overview of the steps that have been executed.
### Timeline
The timeline diagram shows you the step by step execution of the workflow. You can zoom in and out, and drag and move the mouse to view the entire diagram. You can also click on a step to view its execution details in the [History](#history) section.
#### Step Status
In the timeline diagram, each step node has a small box at its left whose color indicates its status:
<Table>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Color</Table.HeaderCell>
<Table.HeaderCell>Description</Table.HeaderCell>
</Table.Row>
</Table.Header>
<Table.Body>
<Table.Row>
<Table.Cell>
Orange
</Table.Cell>
<Table.Cell>
The step is currently being executed.
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
Green
</Table.Cell>
<Table.Cell>
The step has been executed successfully.
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
Red
</Table.Cell>
<Table.Cell>
The step has failed.
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
Gray
</Table.Cell>
<Table.Cell>
The step hasn't been executed yet, or it's been skipped, which can occur if the step is part of a [when condition](!docs!/learn/fundamentals/workflows/conditions).
</Table.Cell>
</Table.Row>
</Table.Body>
</Table>
### JSON
The JSON section allows you to view the execution's details as a raw JSON object by clicking the <InlineIcon Icon={ArrowUpRightOnBox} alt="expand" /> icon. This is useful for advanced debugging to see all the details of the workflow execution.
### History
The History section shows you the execution of the workflow's steps by order of execution. You can see each step's name with a dot reflecting its status as explained in the [Step Status](#step-status) section.
If you click on any executed step, you'll see its details, including:
- **Definition**: the step's configurations which can be passed when you create the step. For example, the step's name, whether it has a compensation function, whether it's asynchronous, etc...
- **Output**: the step's output, which is the result of the step's execution.
- **Compensation Input**: if the workflow failed and the step has a compensation function, you can see the input that the compensation function received.
- **Error**: if the step failed, you can see the error message.
![Workflow executions history](https://res.cloudinary.com/dza7lstvk/image/upload/v1740498395/User%20Guide/Screenshot_2025-02-25_at_5.46.20_PM_spnh0j.png)