Skip to content

Commit b6d26d2

Browse files
docs: Update API page with links to Enterprise API docs (#7892)
Co-authored-by: caitlinwheeless <[email protected]>
1 parent 2fd70b3 commit b6d26d2

File tree

1 file changed

+51
-10
lines changed

1 file changed

+51
-10
lines changed

docs/source/guide/api.md

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,15 @@ section: "Integrate & Extend"
1111

1212
---
1313

14+
<div class="opensource-only">
15+
1416
You can use the Label Studio API to import data for labeling, export annotations, set up machine learning with Label Studio, and sync tasks with cloud storage.
1517

1618
See the [API reference documentation](https://api.labelstud.io/api-reference/introduction/getting-started) for further guidance and interactive examples. If you want to write Python scripts using the API, use the [Label Studio Python SDK](sdk.html).
1719

1820
!!! info Tip
1921
For additional guidance on using our API, see [5 Tips and Tricks for Label Studio’s API and SDK](https://labelstud.io/blog/5-tips-and-tricks-for-label-studio-s-api-and-sdk/).
2022

21-
<div class="enterprise-only">
22-
23-
<p>
24-
The Label Studio Enterprise API shares many endpoints with the Label Studio Community Edition API, but includes extra payload options and additional endpoints specific to Enterprise features. Access the full Label Studio Enterprise API reference documentation by doing the following:</p>
25-
<ol>
26-
<li>Log in to Label Studio Enterprise</li>
27-
<li>Open the menu and click <b>API</b></li>
28-
</ol>
29-
30-
</div>
3123

3224
### Authenticate to the API
3325

@@ -66,3 +58,52 @@ Retrieve a paginated list of tasks for a specific project. If you want, you can
6658
To export annotations, first see [which formats are available to export for your project](https://api.labelstud.io/api-reference/api-reference/projects/exports/list-formats).
6759

6860
Choose your selected format from the response and then call the export endpoint. See the [export annotations](https://api.labelstud.io/api-reference/api-reference/tasks/list) endpoint documentation for more details.
61+
62+
</div>
63+
64+
<div class="enterprise-only">
65+
66+
You can use the Label Studio API to import data for labeling, export annotations, set up machine learning with Label Studio, and sync tasks with cloud storage.
67+
68+
See the [API reference documentation](https://app.humansignal.com/docs/api) for further guidance and interactive examples. If you want to write Python scripts using the API, use the [Label Studio Python SDK](sdk.html).
69+
70+
!!! info Tip
71+
For additional guidance on using our API, see [5 Tips and Tricks for Label Studio’s API and SDK](https://labelstud.io/blog/5-tips-and-tricks-for-label-studio-s-api-and-sdk/).
72+
73+
### Authenticate to the API
74+
75+
You must retrieve your access token so that you can authenticate to the API.
76+
77+
1. In the Label Studio UI, click the user icon in the upper right.
78+
2. Click **Account & Settings**.
79+
3. Copy the access token. For more information, see [Access tokens](access_tokens).
80+
81+
In your first API call, specify the access token in the headers:
82+
```bash
83+
curl -X <method> <Label Studio URL>/api/<endpoint> -H 'Authorization: Bearer <token>'
84+
```
85+
86+
### List all projects
87+
88+
To perform most tasks with the Label Studio API, you must specify the project ID, sometimes referred to as the `pk`, or primary key. If you don't know what your project ID is, you might want to get a list of all projects in Label Studio that you can access. See the [List your projects API endpoint documentation](https://app.humansignal.com/docs/api#tag/Projects/operation/api_projects_list).
89+
90+
### Create and set up a project
91+
92+
Create a project and set up the labeling interface in Label Studio using the API. See the [Create new project API endpoint documentation](https://app.humansignal.com/docs/api#tag/Projects/operation/api_projects_create).
93+
94+
If you want to make sure the configuration for your labeling interface is valid before submitting it using the API, you can use the [validate label config](https://app.humansignal.com/docs/api#tag/Projects/operation/api_projects_validate_create) API endpoint.
95+
96+
### Import tasks using the API
97+
98+
To import tasks using the API, make sure you know the project ID that you want to add tasks to. See additional examples and parameter descriptions in the [import data endpoint documentation](https://app.humansignal.com/docs/api#tag/Tasks/operation/api_tasks_create)
99+
100+
### Retrieve tasks
101+
Retrieve a paginated list of tasks for a specific project. If you want, you can also retrieve tasks and annotations using this API endpoint, as an alternative to exporting annotations. See details and parameters in the [list project tasks endpoint documentation](https://app.humansignal.com/docs/api#tag/Tasks/operation/api_tasks_list).
102+
103+
### Export annotations
104+
105+
To export annotations, first see [which formats are available to export for your project](https://app.humansignal.com/docs/api#tag/Export/operation/api_projects_export_formats_read).
106+
107+
Choose your selected format from the response and then call the export endpoint. See the [export annotations](https://app.humansignal.com/docs/api#tag/Export/operation/api_projects_exports_create) endpoint documentation for more details.
108+
109+
</div>

0 commit comments

Comments
 (0)