All API end points are protected and you will need a bearer token to send to the end point before you will be permitted access. To obtain a bearer token you will need to send a request to the following end point:
POST
Request
The following form-urlencoded content needs to be sent in the request:
Body
tenantid | the id of the tenant |
reportName | the name of report |
reportFormat | the format of the report |
See How to create API Clients to see how to obtain API Client IDs and secrets
Response
Return | |||||
Status code | Description | ||||
403 | Incorrect access for the request | ||||
400 | Invalid request or unexpected error (detail will be in the response) | ||||
200 | The response will be a JSON object containing the following properties:
|
C# Example:
var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://{platform API url}/api/tenant/report/executereport"); var content = new StringContent("\r\n \"tenantId\": \"{tenantId}\",\r\n \"reportName\": \"{reportName}\",\r\n \"reportFormat\": \"{reportFormat}"\r\n}", null, "application/json"); request.Content = content; var response = await client.SendAsync(request) response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync());
cURL Example
curl --location 'https://{platform API url}/api/admin/tenant/executereoprt' \ --header 'Content-Type: application/json' \ --data- '{"tenantId"="{tenanatId}","reportName"="{reportName}","reportFormat"="{reportFormat}"}'