Events REST API

The /events API logs information about events that happen during an update and while the device is running the product at any time after the update.

Log the Event of the Update Process

Event logging makes particular use of the following main fields:

eventName—This can be any string you choose to use. This field enables you to define a number of events that you might want to monitor while the device is running your software. This field is required.
eventGroup—This field enables you to group a number of eventNames into categories, for easier analysis at a later time. This field is optional.
eventValue—This field provides additional information, for example to explain why a particular event has been logged. This field is optional.

Logging device events

Item

Description

URI

/uai/2.0/events 

Method

POST 

Query parameters

eventRequest

Request body

{

    "deviceClass": "string",

    "downloadPackageId": "string",

    "eventGroup": "string",

    "eventName": "string",

    "eventValue": "string",

    "id": "string",

    "idType": "string",

    "language": 0,

    "platform": "string",

    "publisherName": "string",

    "timestamp": "string",

    "updateId": "string",

    "updateName": "string"

}

Note:The fields downloadPackageId, eventGroup, eventValue, language, platform, updateId, and updateName are optional.

Response codes

200: Not used

202: Asynchronous request. Use the URL returned to poll for a response.

Sample Response

If the request has been accepted (status 202), a URL including a polling ID to poll for completion of the registration is returned:

{

   "url": "string"

}

Poll for Response to the Request for Event Logging

Indicate the success or failure to log the event.

Poll for response to the request for event logging

Item

Description

URI

/uai/2.0/events/{pollingId} 

Method

GET 

Query parameters

pollingId: ID returned by /uai/2.0/events API (see Log the Event of the Update Process)

Request body

N/A

Response codes

200: Success.

402: Asynchronous request. Use the URL returned to poll for a response.

401: The request is unauthorized. This could be because a JWT was not found in the header, the token has expired, the signature is invalid, or a public key could not be identified (most commonly because the public key has not been uploaded to FlexNet Operations).

Sample Response

This is the data structure indicating the success (status 200) or failure (status 401) to log the event for an update.

{

   "arguments": "string"

   "key": "string"

   "message": "string"

}

If the request is still being processed (status 202), a URL to poll for completion of the request is returned:

{

   "url": "string"

}