Overview
EGS exposes a number of APIs to create and manage slices and GPU provision request (GPRs) resources in one or more EGS managed clusters. EGS manages cluster GPU resources and dynamically allocates GPU nodes (GPUs) to slices based on the request priority and other request attributes.
EGS API can be used by:
- LLM-Ops/ML-Ops/RAG pipelines from outside the cluster to create and manage slices and GPRs.
- LLM/ML/RAG control plane or ML/LLM-Ops in cluster services to create and manage slices and GPRs.
Prerequisites
- You must have access to the EGS Admin Portal. To know more, see accessing the Admin Portal.
Generate API Token for Authentication
An API token is used to authenticate to EGS to obtain a bearer token for other APIs.
Role-based API Tokens
The following are the two role-based with API Tokens:
- Owner: This token allows you to create and manage slices and GPRs. This token also allows you to view the GPU nodes inventory.
- Editor: This token allows you to edit the parameter values.
- Viewer: This token allows you to get information on slice and GPRs.
Generate an API Token
An admin can generate API token on the Admin Portal.
Starting with version 1.10.1, an owner role-based API token generated for a slice also serves as a token to access the User Portal.
To generate an API token:
-
Log in to the Admin Portal.
-
Go to API Tokens on the left sidebar.
-
On the API Tokens page, click Add API Token.
-
On the Add API Token pane, add the values as described below:
-
Enter a name for the API token in the Name text box.
-
Select a role from the Role drop-down list. You can choose Owner, Editor, or Viewer from the list.
-
If you select Editor, or Viewer, then you must select the slice for which you want to set the role.
-
-
Set a date until which the API token can be active in the Valid Until text box.
-
(Optional) Add a description about the API token.
-
Click Create Token.
-
The token is created. Copy the token and save it as you cannot see the token again.
cautionThis API token becomes invisible after it is created.
-
Click Done. The new token is listed on the API Tokens page.
-
On the API Tokens page, click the copy icon against the token to copy its value that you want to use it in your API calls.
Delete an API Token
To delete an API token:
-
Go to API Tokens on the left sidebar.
-
On the API Tokens page, click the delete icon against the token that you want to delete.
-
On the confirmatory dialog, click DELETE, and click Delete Token.