Using Rescale’s REST API
With Rescale’s REST APIApplication program interface (API) is a set of routines, pr... you can upload input files, create jobs, view the status of existing jobs, and more. For the full list of API endpoints, see the Rescale API Documentation.
An API key is required to authenticate your account when interacting with the API. To generate an API key for your account, go to the API section of your settings page (Profile > User Profile Settings > API), then click the Add API Key button.
There’s no limit to how many API keys you can create, and deleting them is as easy as selecting and clicking “delete.” API keys are set to never expire by default, but if you need to set a max lifetime policy, reach out to Rescale Support for assistance. A max lifetime policy will include an API key lifetime in days (e.g. 90 days). Once a max lifetime policy is set, all new API keys created after the policy creation date will include an expiration date.
For example: if your max lifetime policy is set to 90 days on 1/1/23, any API keys created after that time will expire 90 days after the creation of the API key. If I create an API key on 2/13/23, then the API key will expire on 5/14/23
By default, the API key is hidden. In order to reveal it, simply click on the API key. You can copy the API key by clicking the copy icon to the right.
API Key FAQs
Q. Can I set the API max lifetime policy on a user-level?
A. No, API max lifetime policies are set on the Organization-level only
Q. What happens when an API key expires?
A. When an API key expires, the date will turn red, but the API key will continue to exist. When attempting to use the API key, an error will be thrown that says “API key is no longer active”. It is up to the user to delete API keys when they expire.
Q. Are there any alerts tied to the expiration date?
A. No, there are no alerts tied to the expiration date today. If you are interested in this, please reach out to Rescale to voice your need.
Q. Is it possible to add permissions on the key-level?
A. No, all keys will have full permissions to whatever the user has access to.
Q. What happens to the API key if a user is deactivated?
A. If you deactivate a user and try to use one of the keys you get the message:
User inactive or deleted.
Running a Job through the Rescale API
This example shows how to set up a LS-DYNA job through the API using both cURL and python.