All data from Perfion can be queried via two different endpoints. The endpoints differ in their input methods. The response of both endpoints is the same.
The syntax of the JSON formatted response data is described in Query Reference.
POST Data endpoint
This endpoint accepts a Perfion JSON query and queries the Perfion Database for data.
Url: POST /data
Parameters:
Parameter | Description | Properties |
string query | JSON formatted search. The Perfion Query JSON is separated into the sections: Select, From, Where, Having and Order. The syntax is inspired by normal SQL and should therefore be easy to learn. | Content type: application/json Parameter type: Body |
As input, the method takes a Perfion Query in JSON format. The syntax is inspired by normal SQL but is enhanced with the ability to return multi-valued and sequenced data as well as localized data in multiple languages, and a number of other advanced abilities not possible with the regular SQL tabular result format.
The method returns all data in JSON format. For binary features such as images and files, the binaryID GUID value is returned. The actual Binary data can then be retrieved via the File & Image Server included in the Perfion API service.
Authentication:
The endpoint requires authentication. The token is a JWT bearer token. Please refer to Authentication to learn how to get a token.
The token must be supplied in the request header. In C# it can be done on a HttpClient like this:
The endpoint will respond with the following response codes
Response code 200 (OK)
The request was successful. The response body is a JSON object. Read more about the format in Query Reference.
Response code 400 (Bad request)
Given parameters was missing or invalid. The response body contains is a JSON object formatted in one of the following ways:
Response code 401 (Unauthorized)
No valid authentication token was supplied!
Response code 500 (Internal server error)
Some unexpected error has occurred. The response body contains is a JSON object formatted as follows:
GET Data endpoint
This endpoint excepts an ID reference of a search feature item and executes the Perfion query that is saved on it.
Url: Get /data?searchId=123&index=0&maxCount=5
Parameters:
Parameter | Description | Properties |
int searchId | Represents the identifier for a feature data item placed under a search feature. | Parameter type: query |
int index | Optional parameter that injects page index into the saved Perfion query to give control of paging. | Parameter type: query |
int maxCount | Optional parameter that injects page max count into the saved Perfion query to give control of paging. | Parameter type: query |
The method returns all data in JSON format. For binary features such as images and files, the binaryID GUID value is returned. The actual Binary data can then be retrieved via the File & Image Server included in the Perfion API service.
Authentication:
The endpoint requires authentication. The token is a JWT bearer token. Please refer to Authentication to learn how to get a token.
The token must be supplied in the request header. In C# it can be done on a HttpClient like this:
The endpoint will respond with the following response codes
Response code 200 (OK)
The request was successful. The response body contains is a JSON object formatted as follows.
Response code 400 (Bad request)
Given parameters was missing or invalid. The response body contains is a JSON object formatted in one of the following ways:
Response code 401 (Unauthorized)
No valid authentication token was supplied!
Response code 500 (Internal server error)
Some unexpected error has occurred. The response body contains is a JSON object formatted as follows:
POST Get Version endpoint
This endpoint return the version number.
Url: GET /get-version
Parameters: no parameters needed
Authentication:
The endpoint requires authentication. The token is a JWT bearer token. Please refer to Authentication to learn how to get a token.
The token must be supplied in the request header. In C# it can be done on a HttpClient like this:
The endpoint will respond with the following response codes
Response code 200 (OK)
The request was successful. The response body is a JSON object.
{ "Version": "5.2.0" }
Response code 400 (Bad request)
Given parameters was missing or invalid.
Response code 401 (Unauthorized)
No valid authentication token was supplied!
Response code 500 (Internal server error)
Some unexpected error has occurred. The response body contains is a JSON object formatted as follows:
POST Execute Action endpoint
This endpoint execute an action and return an execution Id.
Url: POST /execute-action/{actionId}
Parameters:
Parameter | Description | Properties |
int actionId | Action Id to be executed | Content type: application/json Parameter type: URI |
string actionInput | JSON formatted table. { | Content type: application/json Parameter type: Body |
Authentication:
The endpoint requires authentication. The token is a JWT bearer token. Please refer to Authentication to learn how to get a token.
The token must be supplied in the request header. In C# it can be done on a HttpClient like this:
The endpoint will respond with the following response codes
Response code 200 (OK)
The request was successful. The response body is a JSON object.
{ "ExecutionQueueId": 19 }
Response code 400 (Bad request)
Given parameters was missing or invalid.
Response code 401 (Unauthorized)
No valid authentication token was supplied!
Response code 500 (Internal server error)
Some unexpected error has occurred. The response body contains is a JSON object formatted as follows:
POST Process report endpoint
This endpoint processes a report and return the processed report.
Available from Perfion 2023 R1 SR1.
Url: POST /reports/{reportId}/process?id=3027&language=dan&streamtype=pdf
Parameters:
Parameter | Description | Properties |
int reportId | Report Id to be processed. | Parameter type: URI |
int id | Id of item or items to be included in the report. Can be comma separated list of id’s if multiple items is to be included. | Parameter type: URI |
string language | Language to generate report in. This is an optional parameter. | Parameter type: URI |
string streamtype | Report can be generated in the following formats:
This is an optional parameter. | Parameter type: URI |
string action | The action parameter work for reports as described for Media Services URL Parameters. This is an optional parameter. | Parameter type: URI |
string parameters | JSON formatted array of report parameters as specified in the superquery of the report. This is an optional parameter. [ {"id":'StringTestParam',"values":['Testing']}, {"id":'IntTestParam',"values":['123']}, {"id":'DateTestParam',"values":['2022-12-01']}, {"id":'SelectTestParam',"values":['3593']}, {"id":'MultiTestParam',"values":['1st value','2nd value']} ] | Content type: application/json Parameter type: Body |
Authentication:
The endpoint requires authentication. The token is a JWT bearer token. Please refer to Authentication to learn how to get a token.
The token must be supplied in the request header. In C# it can be done on a HttpClient like this:
The endpoint will respond with the following response codes
Response code 200 (OK)
The request was successful. The response body is a streamed report file.
Response code 400 (Bad request)
Given parameters was missing or invalid.
Response code 401 (Unauthorized)
No valid authentication token was supplied!
Response code 500 (Internal server error)
Some unexpected error has occurred.