Run:ai REST API¶
The purpose of the Run:ai REST API is to provide an easy-to-use programming interface for administrative tasks.
Endpoint URL for API¶
The domain used for Run:ai REST APIs is the same domain used to browse for the Run:ai User Interface. Either <company>.run.ai
, or app.run.ai
for older tenants or a custom URL used for Self-hosted installations.
Authentication¶
- Create a Client Application to make API requests. Use the client application and secret, to obtain a time-bound bearer token (
<ACCESS-TOKEN>
). For details, see Calling REST APIs. - Use the token for subsequent API calls.
Example Usage¶
For example, if you have an Administrator role, you can get a list of clusters by running:
(replace <ACCESS-TOKEN>
with the bearer token from above).
For an additional example, see the following code. It is an example of how to use the Run:ai REST API to create a User and a Project and set the User to the Project.
Run:ai REST API Documentation¶
The Run:ai REST API offers developers a robust interface for interacting with and managing Run:ai metadata objects, including Projects, Departments, Clusters, and Users.
Public API documentation is available at api-docs.run.ai. For self-hosted deployments, access the documentation at https://<control-plane-url>/api/docs
.