Authentication
The API cannot be accessed without one of these two forms of authentication:
Personal access token
Use cases
For customers that want to automate the submission/consumption of their own simulations.
Usage
Each PAT is connected to a user account and can expire/be revoked.
Once you get the token, you can access the API using it in an HTTP header like this:
x-nablaflow-token: ${token}
Example
export NABLAFLOW_TOKEN="..."
curl \
-H "x-nablaflow-token: ${NABLAFLOW_TOKEN}" \
https://api.nablaflow.io/aerocloud/users/self
OAuth2 application
Use cases
For third-party services that want to give the ability to their customers to submit simulations/consume results.
For example, an application that does 3D modeling and can submit and then visualise results inline.
Usage
When a client accesses the API, it does so on behalf of an existing user.
In order to do that, a classical OAuth 2.0 token request flow must be performed.
Please get yourself familiar with OAuth 2.0 before continuing.
Once you have performed the token request, you will get back an access_token
and a refresh_token
.
An access_token
needs to be used in each HTTP call’s headers:
authorization: bearer ${access_token}
Access tokens are valid for 1 hour, while refresh tokens are valid for 30 days.
Example
export ACCESS_TOKEN="..."
curl \
-H "authorization: bearer ${ACCESS_TOKEN}" \
https://api.nablaflow.io/aerocloud/users/self