Searching:
0 results foundReports/Post
Description
To create a new Axonize report.
See the following for request and response details ‒
See Also
Request ‒ Reports/Post
Property | Type | Description | Mandatory |
name | String | Free-text name of the Report. This will be used as the title of the report and can be used to get the report. | |
Type | String/Enum | May have the following value –
|
|
entity | String | The entity on which the action was performed (such as Device, Application or Product) –
|
|
query | String | An expression in OData syntax that defines the data to be extracted from Axonize.
Example: ?$filter=contains(tolower(name),’gateway’). |
|
columns | Array | Specifies a list of columns to be included in the Report.
Each column specified in this list must be the exact name of property of that entity. For example, serialNumber of a Device or the name of a Product. The name of this property is used as the title of the column. |
|
subscribers | Array | subscribers contains an array of subscribers. Each subscriber contains the following –
Note ‒ Users can also be scheduled to Reports in the Axonize Portal. |
|
Filters | String | This is an optional field in which you can specify the filter to be applied to this report, which is used by the Axonize Portal when displaying the report. It is a JSON representation of the OData query string.
The OData query string will appear in the Filters tab of the report, as described on page 153. Specifying the string in this property enables you to edit this filter in the user interface and to immediately affect the report that is displayed. For example: “filters”:”[{\”filter\”:\”createDate\”,\”msgKeyLabel\”:\”msg_create_date\”,\”msgKeyDisplayName\”:\”msg_by_create_date\”,\”type\”:\”Date\”,\”propName\”:\”createDate\”,\”operator\”:\”lessThan\”,\”filterValue\”:\”2018-02-12T12:20:42+02:00\”}]” |
|
customProperties | String | Specifies the endpoint that is called in the custom report service. The custom report service consists of predefined SQL and API queries that are used to generate a custom report. Use this property when creating a custom report instead of filters.
The following properties are not relevant when using the customProperties property –
|
|
customProperties/endpoint | String | The name of the endpoint that is contacted in the custom report service to generate a custom report. | |
createdByDisplayName | String | The name of the User who created the Report. | |
isDefault | Boolean | Specifies whether this report is included in the list of default reports provided by Axonize. | |
shared | Array of Objects | This object has two properties –
“shared”: { “applications”: [], “tenants”: [“580c7cfbcb597ad4e123456”]
|
Example JSON RepExample JSON Reports/Post Request
curl -X POST \
https://api.stg.axonize.com/odata/reports \
-H ‘Cache-Control: no-cache’ \
-H ‘Authorization: Token’ \
-H ‘Content-Type: application/json’ \
-H ‘appId: 801A048A-9F23-429F-BF0D-B6D35B212345’ \
-d ‘ {
“columns”:[“name”],
“entity”:”devices”,
“query”:””,
“name”:”devices – report”
}’
Response ‒ Reports/Post
All the same properties in the request are returned in the response. The response that is returned also contains the following properties –
Property | Type | Description |
id | String | A unique Report identifier that is automatically generated for this Report by Axonize. |
appId | String | A unique Application identifier that is automatically generated by Axonize. This is the identifier of the Application to which this Report is assigned. |
createDate, createUser, updateDate, updateUser |
See Common Response Properties. |
Example JSON Reports/Post Response
{
“@odata.context”: “https://stg-axonizeapi-axonize.dev-ase-axonize.p.azurewebsites.net/odata/$metadata#Reports/$entity”,
“name”: “devices – report”,
“type”: “odata”,
“entity”: “devices”,
“query”: “”,
“columns”: [
“name”
],
“filters”: null,
“createdByDisplayName”: null,
“isDefault”: false,
“id”: “5b58670919ec0c1a68412345”,
“appId”: “801A048A-9F23-429F-BF0D-B6D35B212345”,
“createDate”: “2018-07-25T12:03:21.2135012Z”,
“createUser”: null,
“updateDate”: “0001-01-01T00:00:00Z”,
“updateUser”: null,
“reportInstances”: [],
“subscribers”: [],
“shared”: {
“applications”: [],
“tenants”: []
}
}