Authorization
The Standards API is protected with OAuth 2.0 and supports interactive and service login for retrieving access tokens. For both scenarios, you will need an API key which can be created from your workspace settings page in the Standards app.Service login
Service login uses the client credentials OAuth flow to retrieve an access token without user interaction. To perform this action, POST a request to the Standards OAuth server’s token endpoint athttps://api.standards.site/oauth/token with form encoding and these fields:
grant_typeFor service login, this should be set toclient_credentialsresourceThis is a URL in the formathttps://api.standards.site/workspace/$WORKSPACE_IDwhere$WORKSPACE_IDis the id of the workspace for which access is being requested. Your id can be taken from the URL of your workspace when logged in to the Standards app. As an example, the URL may behttps://app.standards.site/workspace/2e8cbaff83ain which case$WORKSPACE_IDis2e8cbaff83aclient_idThe ID you were given after creating an API key to identify the API key to use for authenticationclient_secretThe secret value for the same API key
access_tokenA string containing the access token to send in theAuthorizationheader as a bearer token in API requeststoken_typeThis will always be the stringBearer, indicating access_token is to be used as a bearer tokenexpires_inThe number of seconds the token can be used before a new one will need to be retrievedscopeA space separated list of scopes that have been granted for the token, as defined by the API keyresourceThe resource the token is authorized to access, which matches the resource sent with the request
Interactive login
Coming soon
Testing the API
To retrieve an access token for testing, use one of the following commands depending on your platform. You will be prompted to enter the Workspace ID, Client ID, and Client Secret and the full JSON response, including the access token will be printed.workspace-idThis is the same value that was used to retrieve the access tokenproject-idUse the list projects endpoint to retrieve the ids for all projects in the workspacepage-idUse the list pages endpoint to retrieve the ids for all pages in the project