Skip Navigation

Apply missing header information

The YAML file does not include the access token required to make an API request. You will need to include additional header information in the request.
Curl requests
For example, for the GET Devices call, if you use the YAML File in Swagger with the default options selected and https://login.onprem-cylance.com/cyapi/v1/client is set as the server, the following Curl command is generated:
curl -X GET "https://login.onprem-cylance.com/cyapi/v1/client/devices?page=1&pageSize=50&includeMeta=true" -H "accept: application/json"
However, for this command to work, you must include the access token:
curl -X GET "https://login.onprem-cylance.com/cyapi/v1/client/devices?page=1&pageSize=50&includeMeta=true" -H "accept: application/json" -H "authorization: Bearer {{access-token}}"
curl -X GET "https://login.onpremcylance.com/cyapi/v1/client/devices?page=1&pageSize=50&includeMeta=true" -H "accept: application/json" -H "authorization: Bearer {{accesstoken}}"
Replace {{access-token}} with the access token you generated using your application ID and application secret. See Access token .
Request URL
For example, for the GET Devices call, if you use the YAML file in Swagger with the default options selected and https://login.onprem-cylance.com/cyapi/v1/client is set as the server, the following URL command is generated:
https://login.onprem-cylance.com/cyapi/v1/client/devices?page=1&pageSize=100
However, for the command to work, it will require the following Headers:
  • Accept: application/json
  • Authorization: Bearer {{access-token}}
Replace {{access-token}} with the access token you generated using your application ID and application secret. See Access token .