Authenticating with the ScopeMaster API
Authentication and Authorization
All requests require authentication.
Authentication with the API is achieved using an API key within the requests authorisation header. The API key (token) is created in ScopeMaster. Access privileges to API data will be the same as the user who created the API key.
Creating your API Key
Log into ScopeMaster, go to your profile and create an API key and then use this to authenticate your REST request. See Create an API Key
Making your first request
Your HTTPS request requires a base64_encoded Authorization header consisting of the email address and the API key e.g.
base64_encode([email protected]:AKfda8sujfqwkoj3krwesjakldfja)
Where AKda8sujfqwkoj3krwesjakldfja
is the API key that was created earlier.
So the HTTP request header becomes:
Authorization: Basic Y29saW5AYWxiaW9udGVjaC5abslkjnzMjBjMDhhZTc3YTM5MjJjMDEwNGUwNTQ1ZjkzNTY0NjQzNA===)
e.g.
Try this out on the endpoint:
GET https://api.scopemaster.com/v1/version
Response
The response will always contain json.
Using Jenkins
If you are using Jenkins as your CI/CD server you can include calls to ScopeMaster within your build process:
https://jenkins.io/doc/pipeline/steps/http_request/#httprequest-perform-an-http-request-and-return-a-response-object