Introduction
You can use the Autify Nexus API to do things like run tests programmatically or even integrate Autify Nexus into your CI/CD pipeline with custom scripts. This guide provides basic information that you will need when making API calls for Autify Nexus.
Prerequisites
You are an admin in your Autify Nexus organization
You have access to and are comfortable using a Unix-like command line interface such as Terminal on macOS or WSL on Windows
Make sure you have the following information:
Autify Nexus server URL (the URL you use to sign in to Autify Nexus)
Create an API client in Autify Nexus
In Autify Nexus:
Click Settings (
)Navigate to the “Your account” section
Click Manage API clients to open the “Manage API clients” page
Click Create API client at the top-right of the page
In the dialog window that opens, enter a unique value (case-insensitive) for the Client ID and click Create
An optional name and description can be provided to help you better identify or organize your clients.
Obtain the client secret
In Autify Nexus, on the “Manage API clients” page:
Click the
icon to see the API credentials for your API clientThe client secret is hidden by default — click the
icon to reveal it
You’ll need the client secret in order to call the API. If suspect the client secret may be compromised (for example, if it was accidentally included in a public GitHub repository), you can use the “Regenerate” button to replace it with a new randomly-generated secret.
Make an API call
API calls are made via the nexus endpoint on your Autify Nexus server. For example:
Autify Nexus server |
|
API endpoint |
|
To make an API call, you will need to pass the client secret as a Bearer token for authorization.
Example call to api/workspaces
API_ENDPOINT=""
CLIENT_SECRET=""
curl -X GET "${API_ENDPOINT}/api/workspaces" \
-H "Authorization: Bearer ${CLIENT_SECRET}"Output
>> [{"id":"4cbcd34e-60b6-4a43-a78d-df7bf84d8849"}]Next steps
Explore our full API documentation for more information on what you can do with the Autify Nexus API.