API Credentials
Obtain your API Key and temporary Secret directly from Cyrisma Support.The values shown throughout this documentation are examples only. You must use your own API credentials provided by Cyrisma Support.
Login and Obtain Access Token
Using your API credentials, access the API to receive the initial access token. Since the interaction with the API is plaintext, usex-www-form-urlencoded data type when submitting data elements. API response will be plaintext formatted as JSON.
Response
The
grant_type key indicates this is a password request in compliance with OAuth 2.0 principles. The access token is important and is used to continue all future interaction with the API. The optional refresh token is used to refresh the expiration time remaining back to the original value. The expiration value is generally 600 seconds (10 minutes). Tokens can be renewed as often as needed by re-issuing the call to the login endpoint using valid credentials if your API is not set up to handle refresh tokens.Reset Password
First-time API use should always begin with password reset. Please reset the original temporary password so that only your authorized applications have access to the API.Response
Using the Access Token
Once a token has been returned, this “session” token is used as authorization granting access to all of the API capabilities. Include the access token in subsequent requests using theAuthorization header:
Provisioning Endpoints
The following endpoints access and manage the provisioning process through the primary URLhttps://api.cyrisma.com/app:
Instance Authentication for Reporting Endpoints
Before scan, dashboard, or reporting data can be retrieved from any CYRISMA instance, the instance must be authenticated separately. This is an additional step required after obtaining an access token, and must be repeated whenever a new access token is generated or regenerated
Endpoint: POST https://api.cyrisma.com/app/partner/instances/login/{optional_instance_id}
If instance_id is not provided, all available CYRISMA instances are authenticated at once. The response returns an instance_url value for each authenticated instance. This instance_url is then used to build all reporting endpoint URLs using the format:
https://{instance_url}/app + endpoint path
Example: https://ccnnnnnn.cyrisma.com/app/partner/scans/data
The complete reporting endpoint flow is:
- Login and obtain an access token via POST
https://api.cyrisma.com/app/partner/login/ - Authenticate the instance via POST
https://api.cyrisma.com/app/partner/instances/login/{optional_instance_id} - Use the returned
instance_urlto call scan and reporting endpoints againsthttps://{instance_url}/app
