Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 request was successful. The response body is a JSON object. Read more about the format in Query Reference

Response code 400 (Bad request)

...

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.

...

The endpoint requires authentication. The token is a JWT bearer token. Please refer to Authentication to learn how to get a token.

...

The endpoint requires authentication. The token is a JWT bearer token. Please refer to Authentication to learn how to get a token.

...

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.

{
"ActionInput": {
"ActionTable1": [
{
"Col1": "123",
"Col2": "456"
},
{
"Col1": "123",
"Col3": "456"
}
],
"ActionTable2": {
"Col1": "123",
"Col2": "456"
}
}
}

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.

...

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:

  • Pdf

  • Html

  • Mht

  • Rtf

  • Xls

  • Xlsx

  • Csv

  • Text

  • AddInOutput

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.

...