Get Incident Logs

This endpoint retrieves the history of an Incident.

Request

To retrieve all Logs of an Incident please make a GET request to the following URL:

HTTP MethodURL
GEThttps://industrial.api.ubidots.com/api/v2.0/incidents/<incident_id>/logs/

Path Parameters

ParameterTypeDescription
incident_idStringThe id of the Incident. Incidents have no label, so the ~label form is not supported

Query Parameters

ParameterTypeDescription
page_sizeIntegerResults per page. Default 500, max 500
cursorStringOpaque cursor taken from the next or previous URL
sort_byStringComma-separated fields, prefix - for descending. Default -createdAt
typeStringOne Log type: change_state, comment, severity_change or assigned_to_change. Use type__in for several, comma-separated
idStringLog id. Use id__in for several, comma-separated
createdAtDateDate lookups, e.g. createdAt__gte. Same lookups as in Incident Filters; tz is not supported here, dates are UTC
searchStringCase-insensitive search over the comment message and the username
fieldsStringComma-separated list of fields to keep in the response, e.g. id,name,state
omitStringComma-separated list of fields to drop from the response

Header

ParameterRequired?Description
X-Auth-TokenYesAuthentication Token of account
$ curl -X GET 'https://industrial.api.ubidots.com/api/v2.0/incidents/<incident_id>/logs/?type__in=comment,change_state' \
 -H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73'
{
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "689e3a01246a939d3a0c2f21",
            "type": "change_state",
            "context": {
                "state": 2,
                "actor": {
                    "type": "user",
                    "userId": "5d966dbbe694aa3a85c0cef7",
                    "username": "jane.doe",
                    "firstName": "Jane",
                    "lastName": "Doe",
                    "avatarUrl": null
                }
            },
            "createdAt": "2026-11-20T15:02:37.904000Z"
        },
        {
            "id": "689e2f1a246a939d3a0c2f10",
            "type": "comment",
            "context": {
                "message": "Technician dispatched",
                "userId": "5d966dbbe694aa3a85c0cef7",
                "username": "jane.doe",
                "firstName": "Jane",
                "lastName": "Doe",
                "avatarUrl": null,
                "created_at": "2026-11-20 14:03:11.512000+00:00"
            },
            "createdAt": "2026-11-20T14:20:45.118000Z"
        },
        {
            "id": "689e2f1a246a939d3a0c2f0f",
            "type": "change_state",
            "context": {
                "state": 1,
                "actor": {
                    "type": "system"
                }
            },
            "createdAt": "2026-11-20T14:20:45.110000Z"
        }
    ]
}
{
    "code": 401001,
    "message": "Authentication credentials were not provided.",
    "detail": "Authentication credentials were not provided."
}
{
    "code": 402001,
    "message": "Your current plan does not include Incidents feature."
}
{
    "detail": "You do not have permission to perform this action."
}
{
    "code": 404001,
    "message": "The request was not found."
}

Response

An object with an array results of Incident Log objects. This endpoint uses cursor pagination: to get the next page, follow the next URL until it is null.