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    /api/tenant/report/executereport


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
reportFormatthe 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
403Incorrect access for the request
400Invalid request or unexpected error (detail will be in the response)
200

The response will be a JSON object containing the following properties:


systemIdsystem id of admin user sending request for execution of report
displayNamename of the admin user sending request for execution of report 
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}"}'