REST API FAQs
The questions that come up most often when scripting against the API. For the full operation-by-operation detail, see the API reference; for tokens and headers, see Authentication.
Which code do I use for the software I want to run?
Every application in the catalog has a stable code that you put in a job's
analysis.code. Ask the platform rather than hardcoding a list, because the catalog changes
as versions are added:
curl -H "Authorization: Token $RESCALE_API_TOKEN" \
https://platform.rescale.com/api/v2/analyses/
The codes are not always what you would guess from the product name. A few current examples:
Note that GUI and batch variants are separate entries with separate codes: comsol and
comsol_gui are not interchangeable. Filter the response by name to find the variant you
want.
Which code do I use for the coretype I want?
Same pattern, different endpoint:
curl -H "Authorization: Token $RESCALE_API_TOKEN" \
https://platform.rescale.com/api/v2/coretypes/
Use the code field as hardware.coreType in a job.
There are several hundred coretypes and the list turns over as hardware generations are added and retired. Codes published in older guides have gone stale: a code that names a retired coretype fails at submission, and some coretypes have been re-coded since. Read the endpoint at the time you write the script, and see Coretypes for how to choose one in the first place.
What fields does a job need?
These go in the request body when you create a job. Only name and jobanalyses are
required:
The API reference carries the full schema, including the nested
shape of jobanalyses and every field not listed here. For a worked end-to-end submission,
see Submit your first workflow.
How do I use a Rescale-provided license through the API?
Set useRescaleLicense to true on the analysis. Without it, the job expects to reach a
license server you have configured, and fails the license check if it cannot. See
Licensing for the difference between on-demand and bring-your-own licensing.
Related
- Authentication for generating and scoping an API token
- Submit your first workflow for a complete request
- API reference for every operation and schema
- CLI if a command-line tool would do instead of writing HTTP calls