Getting Started
The API is crafted around REST 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.
Currently, the API only supports JSON. All POST/PUT requests required a valid JSON object for the request body.
Access to the REST API requires the
apifeature set
API Host
The root API host is https://api.greenstack.cloud/
The API is only available via HTTPS
API Endpoints
The API endpoints available are documented in an Open API spec at https://api.greensack.dev/v1
Authentication
The authentication required for each endpoint varies, but in general, most endpoints will require some form of authentication. There are two ways to provide authentication.
API Keys
An API key is passed in the X-Green-Stack-Key header to authenticate a request.
X-Green-Stack-Key: dgf...euhsdfGenerating an API Key
Step 1 - Login to the Green Stack Console
Step 2 - Navigate to Engineering Mode
Step 3 - Select the API Keys tab
Step 4 - Click New Key to create a new API key
Step 5 - Provide a Name for the new key and select the desired permissions
Step 6 - Click Save to generate the key
Access Token
To authenticate with a token, add an Authorization header with a valid Bearer token.
Authorization: Bearer eyJg...fw5cObtaining an Access Token
Follow these steps to obtain an access token for use with these docs:
- Login to the Green Stack Console
- In the console menu, click your photo to access your account details
- Scroll down to the Access Token section
- Click Copy Token to copy your access token to your clipboard