API Authentication
Authentication Methods
To get the Swagger API reference page or your examples to work with your Platform Core instance, you need to authenticate the API calls by means of an authorization token (JSON Web Token). This is a standardized trusted token containing authentication context. This mechanism helps prevent unauthorized access to projects, analyses, pipelines, and data across ICA accounts. A JWT is generated by providing user credentials (API Key or username/password) to the token creation endpoint.
API key (ApiKeyAuth) is the simplest credential type. This is a long-lived key which is used to obtain a JSON Web Token. API Keys operate similar to a user name and password combination and must be kept secure and rotated on a regular basis. You can have up to 10 API keys per user and manage them through the product dashboard after logging in through the domain login URL. See Managing API Keys for more information.
Username and password (basicAuth) can be used for the POST tokens endpoint to exchange your user credentials for a JWT token. If you use this method, the credentials are sent to the token-generating endpoint which will return a JSON Web Token the returned JWT Token should then be used for subsequent API calls.
The JWT bearer token (JwtAuth) is the preferred authentication method. The JWT will expire after a pre-configured period specified by a tenant administrator through the IAM console in the Illumina portal. If the token was generated by using a username and password then it can be refreshed using the POST /tokens:refresh endpoint as long as it has not expired.
Appt-to-app tokens (PsTokenAuth) are only supported by the /data:transferOwnership endpoint
Authenticating for Examples
In the examples you will encounter in the next chapters, we will use API keys as authentication method. This is a simple authentication method, though the JWT bearer token is more secure due to the shorter lifespan. To generate an API key, refer to this section. This key is then used in your Python code to authenticate the API calls. It is best practice to regularly update your API keys.
API keys are valid for a single user, so any information you request is for that user to which the key belongs. Create a dedicated API user so you can manage the access rights for the API by managing those user rights.
API Key Security
Last updated
Was this helpful?
