The Greenspector Studio API is available by using the swagger page when connecting to studio web interface or by using an API token with tools like curl, postman …
Use swagger
When connecting you are connected to the Studio Web Interface, the swagger is available by going to the menu Help / Documentation page and by clicking on Greenspector Studio API link.
...
Use API Token with curl or postman
...
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.
...
Take the opportunity to retrieve the “applicationId” identifier of your analysis. You can find it in the url bar when you open an analysis. For example:
https://saas.greenspector.com/applications/670777777777/versions/6710fb777777/synthesis
Example with curl
Code Block |
---|
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.
...
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:
...
Add an authorization of type Bearer Token and put your API Token.
...