Getting Started
Overview
The CAST Imaging API provides RESTful access to analysis results. These APIs allow you to programmatically retrieve and interact with your application data.
Getting started
Base URL
The API is accessible via the following endpoint:
https://castimaging.io/rest/<endpoint>
Authentication
API access requires authentication using a user-specific API key:
Generating an API Key
- Log into the CAST Imaging Cloud
- Click on Profile Icon
- Generate your API key
Using the API Key
Include your API key in the X-API-KEY
header for every request:
curl -H "X-API-KEY: my-secret-key" https://castimaging.io/rest/<endpoint>
Multi-tenant Authentication
If the user belongs to multiple organizations, the tenant id must be provided using the X-TENANT-ID
header.
If this header is not provided, the API will default to the first tenant the user is associated with.
Also, X-TENANT-ID
must be a non-empty value.
Fetching Tenants List
To retrieve the list of tenants a user is associated with, use the following API:
curl -H "X-API-KEY: my-secret-key" https://castimaging.io/api/auth/user/tenancy
The tenant id to be used in the X-TENANT-ID
header corresponds to the id
field in the response.
Sample Response:
[
{
"id": "Organization1",
"displayName": "Organization1",
"joinedAt": "2024-11-25T09:21:41.64",
"authTenant": true,
"recentTenant": true
},
{
"id": "Organization2",
"displayName": "Organization2",
"joinedAt": "2024-12-25T09:21:41.64",
"authTenant": false,
"recentTenant": true
}
]