REST API
Last updated
Was this helpful?
Last updated
Was this helpful?
The Green Stack REST API allows you to extend your Green Stack account and integrate custom solutions.
The API is crafted around and the REST architectural style to provide developers with a stateless and language-agnostic interface. The API leverages common HTTP verbs and response codes, OAuth2 authentication, and resource oriented URLs.
The root API host is https://api.greenstack.cloud/
You must have an active subscription for the Green Stack REST API to add new API keys and make API calls.
To create a new API key:
Login to the Green Stack Console and navigate to Settings
Select API Keys from the sidebar
Select New Key to create a new API key
Provide a Name for the new key and select the desired permissions
Select Save to generate the key
Once you create a key, you must pass it with the X-Green-Stack-Key
header to authenticate every request.
HATEOAS (Hypermedia as the Engine of Application State) is a constraint of the REST application architecture that lets us use hypermedia links in the API responses that allow the client to dynamically navigate resources without prior knowledge of the API.
Green Stack REST API returns HATEOS links in resource responses by default. These links outline relative access to related resources, collections, and references.
Links may not be necessary or appropriate for every request. Links can be removed from the response by passing the X-Green-Stack-Suppress-Links
header and setting it to true
The API endpoints available are documented in an spec at