-
Notifications
You must be signed in to change notification settings - Fork 559
Fixed some docs here and there #3484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
c262df2
Update scheduled pipeline deletion logic
htahir1 bdd65b1
Update Pro API documentation with new endpoints and features
htahir1 4f294af
Update component-guide.md with icon removal
htahir1 5b66e73
Merge remote-tracking branch 'origin/develop' into doc/fixsomeapidocs
htahir1 8ed0fca
Add icons and descriptions for ZenML Pro features
htahir1 b6283e2
GITBOOK-10: No subject
htahir1 42d4040
Update table of contents with new overview links
htahir1 b2c7123
Merge remote-tracking branch 'origin/develop' into doc/fixsomeapidocs
htahir1 b658889
Update API and SDK README to use "Overview" heading
htahir1 94e5bac
Merge remote-tracking branch 'origin/develop' into doc/fixsomeapidocs
htahir1 8178816
Merge remote-tracking branch 'origin/develop' into doc/fixsomeapidocs
htahir1 bca82ee
Restructure project and organization roles
htahir1 553ea80
Add resource ownership, sharing, and custom roles features
htahir1 8746e6d
Add team-based role assignments and best practices
htahir1 b2821bb
Update API documentation for ZenML OSS and Pro APIs
htahir1 7a1b720
Add Pro API getting started guide to table of contents
htahir1 323df9c
Update API ToC with new section titles
htahir1 6fdf9d6
Update getting-started.md with workspace URL info
htahir1 ecf9d16
GITBOOK-1: No subject
htahir1 4ebd871
GITBOOK-2: No subject
htahir1 b1ddcf0
Remove redundant Getting Started sub-sections
htahir1 d118ea8
Merge branch 'develop' into doc/fixsomeapidocs
htahir1 651d0a1
Apply suggestions from code review
htahir1 5694be8
Add info on OpenAPI vs ReDoc in getting-started.md
htahir1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+699 KB
docs/book/.gitbook/assets/cloud_architecture_self_hosted_detailed (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,173 +1,6 @@ | ||
| # OSS API | ||
|
|
||
| The ZenML OSS server is a FastAPI application, therefore the OpenAPI-compliant docs are available at `/docs` or `/redoc`\ | ||
| of your ZenML server: | ||
|
|
||
| {% hint style="info" %} | ||
| In the local case (i.e. using `zenml login --local`, the docs are available on `http://127.0.0.1:8237/docs`) | ||
| {% endhint %} | ||
|
|
||
|  | ||
|
|
||
|  | ||
|
|
||
| ## Accessing the ZenML OSS API | ||
|
|
||
| If you are using the ZenML OSS server API using the methods displayed above, it is enough to be logged in to your ZenML account in the same browser session. However, in order to do this programmatically, you can use one of the methods documented in the following sections. | ||
|
|
||
| ### Using a short-lived API token | ||
|
|
||
| You can generate a short-lived (1 hour) API token from your ZenML dashboard. This is useful when you need a fast way to make authenticated HTTP requests to the ZenML API endpoints and you don't need a long-term solution. | ||
|
|
||
| 1. Generate a short-lived API token through the API Tokens page under your ZenML dashboard server settings, as documented in the [Using an API token](../../../how-to/manage-zenml-server/connecting-to-zenml/connect-with-an-api-token.md) guide. | ||
| 2. Use the API token as the bearer token in your HTTP requests. For example, you can use the following command to check your current user: | ||
| * using curl: | ||
|
|
||
| ```bash | ||
| curl -H "Authorization: Bearer YOUR_API_TOKEN" https://your-zenml-server/api/v1/current-user | ||
| ``` | ||
| * using wget: | ||
|
|
||
| ```bash | ||
| wget -qO- --header="Authorization: Bearer YOUR_API_TOKEN" https://your-zenml-server/api/v1/current-user | ||
| ``` | ||
| * using python: | ||
|
|
||
| ```python | ||
| import requests | ||
|
|
||
| response = requests.get( | ||
| "https://your-zenml-server/api/v1/current-user", | ||
| headers={"Authorization": f"Bearer YOUR_API_TOKEN"} | ||
| ) | ||
| print(response.json()) | ||
| ``` | ||
|
|
||
| {% hint style="info" %} | ||
| **Important Notes** | ||
|
|
||
| * API tokens expire after 1 hour and cannot be retrieved after the initial generation | ||
| * Tokens are scoped to your user account and inherit your permissions | ||
| * For long-term programmatic access, it is recommended to [set up a service account and an API key](./#using-a-service-account-and-an-api-key) instead | ||
| {% endhint %} | ||
|
|
||
| ### Using a service account and an API key | ||
|
|
||
| You can use a service account's API key to obtain short-lived API tokens for programmatic access to the ZenML server's REST API. This is particularly useful when you need a long-term, secure way to make authenticated HTTP requests to the ZenML API endpoints. | ||
|
|
||
| 1. Create a [service account](https://docs.zenml.io/how-to/manage-zenml-server/connecting-to-zenml/connect-with-a-service-account): | ||
|
|
||
| ```shell | ||
| zenml service-account create myserviceaccount | ||
| ``` | ||
|
|
||
| This will print out the `<ZENML_API_KEY>`, you can use in the next steps. | ||
|
|
||
| 2. To obtain an API token using your API key, send a POST request to the `/api/v1/login` endpoint. Here are examples using common HTTP clients: | ||
| * using curl: | ||
|
|
||
| ```bash | ||
| curl -X POST -d "password=<YOUR_API_KEY>" https://your-zenml-server/api/v1/login | ||
| ``` | ||
| * using wget: | ||
| --- | ||
| icon: github-alt | ||
| --- | ||
|
|
||
| ```bash | ||
| wget -qO- --post-data="password=<YOUR_API_KEY>" \ | ||
| --header="Content-Type: application/x-www-form-urlencoded" \ | ||
| https://your-zenml-server/api/v1/login | ||
| ``` | ||
| * using python: | ||
|
|
||
| ```python | ||
| import requests | ||
| import json | ||
|
|
||
| response = requests.post( | ||
| "https://your-zenml-server/api/v1/login", | ||
| data={"password": "<YOUR_API_KEY>"}, | ||
| headers={"Content-Type": "application/x-www-form-urlencoded"} | ||
| ) | ||
|
|
||
| print(response.json()) | ||
| ``` | ||
|
|
||
| This will return a response like this: | ||
|
|
||
| ```json | ||
| { | ||
| "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI3MGJjZTg5NC1hN2VjLTRkOTYtYjE1Ny1kOTZkYWY5ZWM2M2IiLCJpc3MiOiJmMGQ5NjI1Ni04YmQyLTQxZDctOWVjZi0xMmYwM2JmYTVlMTYiLCJhdWQiOiJmMGQ5NjI1Ni04YmQyLTQxZDctOWVjZi0xMmYwM2JmYTVlMTYiLCJleHAiOjE3MTk0MDk0NjAsImFwaV9rZXlfaWQiOiIzNDkyM2U0NS0zMGFlLTRkMjctODZiZS0wZGRhNTdkMjA5MDcifQ.ByB1ngCPtBenGE6UugsWC6Blga3qPqkAiPJUSFDR-u4", | ||
| "token_type": "bearer", | ||
| "expires_in": 3600, | ||
| "refresh_token": null, | ||
| "scope": null | ||
| } | ||
| ``` | ||
|
|
||
| 3. Once you have obtained an API token, you can use it to authenticate your API requests by including it in the `Authorization` header. For example, you can use the following command to check your current user: | ||
| * using curl: | ||
|
|
||
| ```bash | ||
| curl -H "Authorization: Bearer YOUR_API_TOKEN" https://your-zenml-server/api/v1/current-user | ||
| ``` | ||
| * using wget: | ||
|
|
||
| ```bash | ||
| wget -qO- --header="Authorization: Bearer YOUR_API_TOKEN" https://your-zenml-server/api/v1/current-user | ||
| ``` | ||
| * using python: | ||
|
|
||
| ```python | ||
| import requests | ||
|
|
||
| response = requests.get( | ||
| "https://your-zenml-server/api/v1/current-user", | ||
| headers={"Authorization": f"Bearer {YOUR_API_TOKEN}"} | ||
| ) | ||
|
|
||
| print(response.json()) | ||
| ``` | ||
|
|
||
| {% hint style="info" %} | ||
| **Important notes** | ||
|
|
||
| * API tokens are scoped to the service account that created them and inherit their permissions | ||
| * Tokens are temporary and will expire after a configured duration (typically 1 hour, but it depends on how the server is configured) | ||
| * You can request a new token at any time using the same API key | ||
| * For security reasons, you should handle API tokens carefully and never share them | ||
| * If your API key is compromised, you can rotate it using the ZenML dashboard or by running the `zenml service-account api-key <SERVICE_ACCOUNT_NAME> rotate` command | ||
| {% endhint %} | ||
|
|
||
| ## Getting Started | ||
|
|
||
| To begin using the ZenML Server API, follow these simple steps: | ||
|
|
||
| {% stepper %} | ||
| {% step %} | ||
| #### Setup | ||
|
|
||
| Ensure you have an active ZenML server or workspace configured. | ||
| {% endstep %} | ||
|
|
||
| {% step %} | ||
| #### Authentication | ||
|
|
||
| Obtain an API token from your service account, as detailed in our core documentation. | ||
|
|
||
| {% tabs %} | ||
| {% tab title="OSS API" %} | ||
| * Obtain an API token from your service account | ||
| * Include the token in the authorization header: `Authorization: Bearer YOUR_API_TOKEN` | ||
| {% endtab %} | ||
|
|
||
| {% tab title="Pro API" %} | ||
| Use your Pro API key in the authorization header: `Authorization: Bearer YOUR_API_KEY` | ||
| {% endtab %} | ||
| {% endtabs %} | ||
| {% endstep %} | ||
|
|
||
| {% step %} | ||
| #### **API Access** | ||
| # OSS API | ||
|
|
||
| Use the token to authenticate and start interacting with the API endpoints. | ||
| {% endstep %} | ||
| {% endstepper %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,141 @@ | ||
| --- | ||
| icon: person-from-portal | ||
| --- | ||
|
|
||
| # Getting Started | ||
|
|
||
| The ZenML OSS server is a FastAPI application, therefore the OpenAPI-compliant docs are available at `/docs` or `/redoc` of your ZenML server: | ||
|
|
||
| {% hint style="info" %} | ||
| In the local case (i.e. using `zenml login --local`, the docs are available on `http://127.0.0.1:8237/docs`) | ||
| {% endhint %} | ||
|
|
||
|  | ||
|
|
||
|  | ||
|
|
||
| ## Accessing the ZenML OSS API | ||
|
|
||
| If you are using the ZenML OSS server API using the methods displayed above, it is enough to be logged in to your ZenML account in the same browser session. However, in order to do this programmatically, you can use one of the methods documented in the following sections. | ||
|
|
||
| ### Using a short-lived API token | ||
|
|
||
| You can generate a short-lived (1 hour) API token from your ZenML dashboard. This is useful when you need a fast way to make authenticated HTTP requests to the ZenML API endpoints and you don't need a long-term solution. | ||
|
|
||
| 1. Generate a short-lived API token through the API Tokens page under your ZenML dashboard server settings, as documented in the [Using an API token](../../../how-to/manage-zenml-server/connecting-to-zenml/connect-with-an-api-token.md) guide. | ||
| 2. Use the API token as the bearer token in your HTTP requests. For example, you can use the following command to check your current user: | ||
| * using curl: | ||
htahir1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ```bash | ||
| curl -H "Authorization: Bearer YOUR_API_TOKEN" https://your-zenml-server/api/v1/current-user | ||
| ``` | ||
| * using wget: | ||
|
|
||
| ```bash | ||
| wget -qO- --header="Authorization: Bearer YOUR_API_TOKEN" https://your-zenml-server/api/v1/current-user | ||
| ``` | ||
| * using python: | ||
|
|
||
| ```python | ||
| import requests | ||
htahir1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| response = requests.get( | ||
| "https://your-zenml-server/api/v1/current-user", | ||
| headers={"Authorization": f"Bearer YOUR_API_TOKEN"} | ||
| ) | ||
| print(response.json()) | ||
| ``` | ||
|
|
||
| {% hint style="info" %} | ||
| **Important Notes** | ||
|
|
||
| * API tokens expire after 1 hour and cannot be retrieved after the initial generation | ||
| * Tokens are scoped to your user account and inherit your permissions | ||
| * For long-term programmatic access, it is recommended to [set up a service account and an API key](./#using-a-service-account-and-an-api-key) instead | ||
htahir1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| {% endhint %} | ||
|
|
||
| ### Using a service account and an API key | ||
|
|
||
| You can use a service account's API key to obtain short-lived API tokens for programmatic access to the ZenML server's REST API. This is particularly useful when you need a long-term, secure way to make authenticated HTTP requests to the ZenML API endpoints. | ||
|
|
||
| 1. Create a [service account](https://docs.zenml.io/how-to/manage-zenml-server/connecting-to-zenml/connect-with-a-service-account): | ||
|
|
||
| ```shell | ||
| zenml service-account create myserviceaccount | ||
| ``` | ||
|
|
||
| This will print out the `<ZENML_API_KEY>`, you can use in the next steps. | ||
|
|
||
| 2. To obtain an API token using your API key, send a POST request to the `/api/v1/login` endpoint. Here are examples using common HTTP clients: | ||
| * using curl: | ||
|
|
||
| ```bash | ||
| curl -X POST -d "password=<YOUR_API_KEY>" https://your-zenml-server/api/v1/login | ||
| ``` | ||
| * using wget: | ||
|
|
||
| ```bash | ||
| wget -qO- --post-data="password=<YOUR_API_KEY>" \ | ||
| --header="Content-Type: application/x-www-form-urlencoded" \ | ||
| https://your-zenml-server/api/v1/login | ||
| ``` | ||
| * using python: | ||
|
|
||
| ```python | ||
| import requests | ||
| import json | ||
|
|
||
| response = requests.post( | ||
| "https://your-zenml-server/api/v1/login", | ||
| data={"password": "<YOUR_API_KEY>"}, | ||
| headers={"Content-Type": "application/x-www-form-urlencoded"} | ||
| ) | ||
|
|
||
| print(response.json()) | ||
| ``` | ||
|
|
||
| This will return a response like this: | ||
|
|
||
| ```json | ||
| { | ||
| "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI3MGJjZTg5NC1hN2VjLTRkOTYtYjE1Ny1kOTZkYWY5ZWM2M2IiLCJpc3MiOiJmMGQ5NjI1Ni04YmQyLTQxZDctOWVjZi0xMmYwM2JmYTVlMTYiLCJhdWQiOiJmMGQ5NjI1Ni04YmQyLTQxZDctOWVjZi0xMmYwM2JmYTVlMTYiLCJleHAiOjE3MTk0MDk0NjAsImFwaV9rZXlfaWQiOiIzNDkyM2U0NS0zMGFlLTRkMjctODZiZS0wZGRhNTdkMjA5MDcifQ.ByB1ngCPtBenGE6UugsWC6Blga3qPqkAiPJUSFDR-u4", | ||
| "token_type": "bearer", | ||
| "expires_in": 3600, | ||
| "refresh_token": null, | ||
| "scope": null | ||
| } | ||
| ``` | ||
|
|
||
| 3. Once you have obtained an API token, you can use it to authenticate your API requests by including it in the `Authorization` header. For example, you can use the following command to check your current user: | ||
| * using curl: | ||
|
|
||
| ```bash | ||
| curl -H "Authorization: Bearer YOUR_API_TOKEN" https://your-zenml-server/api/v1/current-user | ||
| ``` | ||
| * using wget: | ||
|
|
||
| ```bash | ||
| wget -qO- --header="Authorization: Bearer YOUR_API_TOKEN" https://your-zenml-server/api/v1/current-user | ||
| ``` | ||
| * using python: | ||
|
|
||
| ```python | ||
| import requests | ||
|
|
||
| response = requests.get( | ||
| "https://your-zenml-server/api/v1/current-user", | ||
| headers={"Authorization": f"Bearer {YOUR_API_TOKEN}"} | ||
| ) | ||
|
|
||
| print(response.json()) | ||
| ``` | ||
|
|
||
| {% hint style="info" %} | ||
| **Important notes** | ||
|
|
||
| * API tokens are scoped to the service account that created them and inherit their permissions | ||
| * Tokens are temporary and will expire after a configured duration (typically 1 hour, but it depends on how the server is configured) | ||
| * You can request a new token at any time using the same API key | ||
| * For security reasons, you should handle API tokens carefully and never share them | ||
| * If your API key is compromised, you can rotate it using the ZenML dashboard or by running the `zenml service-account api-key <SERVICE_ACCOUNT_NAME> rotate` command | ||
| {% endhint %} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,6 @@ | ||
| # Pro API | ||
|
|
||
| The ZenML Pro API extends the open-source API with additional features designed for enterprise users, including: | ||
|
|
||
| - Enhanced team collaboration features | ||
| - Advanced role-based access control | ||
| - Enterprise-grade security features | ||
|
|
||
| ### Accessing the ZenML Pro API | ||
|
|
||
| The ZenML Pro API is distinct from the OSS server API: | ||
|
|
||
| - The SaaS version of ZenML Pro API is hosted at [https://cloudapi.zenml.io](https://cloudapi.zenml.io) | ||
| - You can access the API docs directly at [https://cloudapi.zenml.io](https://cloudapi.zenml.io) | ||
| - If you're logged into your ZenML Pro account at [https://cloud.zenml.io](https://cloud.zenml.io), you can use the same browser session to authenticate requests directly in the OpenAPI docs | ||
| --- | ||
| icon: rectangle-pro | ||
| --- | ||
|
|
||
| ### Pro API Authentication | ||
|
|
||
| To programmatically access the ZenML Pro API: | ||
|
|
||
| 1. Navigate to the organization settings page in your ZenML Pro dashboard | ||
| 2. Select "API Tokens" from the left sidebar | ||
| 3. Click the "Create new token" button to generate a new API token | ||
| 4. Use the API token as the bearer token in your HTTP requests: | ||
|
|
||
| ```bash | ||
| # Example of accessing the Pro API | ||
| curl -H "Authorization: Bearer YOUR_API_TOKEN" https://cloudapi.zenml.io/users/me | ||
| ``` | ||
|
|
||
| Note that for workspace programmatic access, you can use the same methods described below for the OSS API (temporary API tokens or service accounts). | ||
| # Pro API | ||
|
|
||
| For full details on using the ZenML Pro API, including available endpoints and features, see the [Pro API guide](https://docs.zenml.io/pro/deployments/pro-api). |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a bit of text here about what the redoc version is? just to make it look a bit nicer instead of just two images next to one another?