The Greenspector Studio API is available using the swagger page when connecting to studio web interface or by using API token with tools like curl, postman …
Use swagger
When connecting to the Studio Web Interface, the swagger is available by going to the menu Help / Documentation page and clicking on Greenspector Studio API link.
Use API Token with curl or postman
Prerequisites
You need to generate a new API token or use an existing API token shared by an admin. You can go to menu Account / API Tokens and then copy to your clipboard the API token by clicking on the first action button.
Then, if you want to call API which concerns your analysis (or application), you need to add this API token as a member of the analysis. The API token is seen like an user.
Example with curl
curl -X 'GET' \ 'http://saas.greenspector.com/applications/{applicationId}/evolution' \ -H 'accept: application/json' \ -H 'Authorization: Bearer {XXXX}'
Replace {applicationId} with the applicationId of your analysis. When you open an analysis on the interface, you can find the applicationId on the url. For example:
https://saas.greenspector.com/applications/670777777777/versions/6710fb777777/synthesis
Replace
{XXXX}
with an API token.
Be careful, do not keep {} when replacing.
Example with postman
Add a new request in postman
Set a new GET request with url
http://saas.greenspector.com/applications/{applicationId}/evolution
Replace {applicationId} with the applicationId of your analysis. When you open an analysis on the interface, you can find the applicationId on the url. For example:
https://saas.greenspector.com/applications/670777777777/versions/6710fb777777/synthesis
Add an authorization of type Bearer Token and put your API Token.
Then press the button Send.
You should see the json results