Authenticate
Xray provides a REST API with endpoints specifically made for dealing with test management.
Requests made to Xray's REST API must be authenticated based on an API Key created for some user in the Xray Global Settings: API Keys.
Thus, the first step you need to do is to obtain a token based on the Client ID and Client Secret of your assigned API Key. You can then use that token to make requests to the Xray Cloud.