Skip to main content
Documentation

Actor

Actions in the actor namespace of the Nexigon Hub API.

Badges mark actions of the Device API and the Admin API, whose compatibility differs from other actions.

actor_GetActor

POST/api/v1/actions/invoke/actor_GetActorDevice API

Get the actor invoking the action.

The actor identifies the authenticated caller, such as a user, an API token, or a device. Devices use this action to learn their own device ID.

Request GetActorAction

No fields. Send an empty JSON object.

Response GetActorOutput

  • actorobjectActor

    The actor.

    7 variants

    One of the following, identified by actor:

    • actor: "Anonymous"

      An anonymous, unauthenticated actor.

    • actor: "System"

      The system itself, typically used for internal actions.

    • actor: "Device"

      A device authenticated via a specific deployment token.

      • deviceIdstringDeviceId

        ID of the device.

      • tokenIdstringDeploymentTokenId

        ID of the deployment token used for authentication.

    • actor: "User"

      A user typically authenticated via a user session.

      • userIdstringUserId

        ID of the user.

    • actor: "UserToken"

      A user authenticated via a specific token.

      • userIdstringUserId

        ID of the user.

      • tokenIdstringUserTokenId

        ID of the user token used for authentication.

    • actor: "ClusterNode"

      A cluster node.

      • nodeIdstringClusterNodeId

        ID of the cluster node.

    • actor: "OrganizationApiToken"

      An organization API token.

      • organizationIdstringOrganizationId

        ID of the organization.

      • tokenIdstringOrganizationApiTokenId

        ID of the API token.

Example

curl --fail-with-body \
  -H "Authorization: Bearer $NEXIGON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}' \
  $NEXIGON_HUB_URL/api/v1/actions/invoke/actor_GetActor
{
  "actor": {
    "actor": "Device",
    "deviceId": "<device-id>",
    "tokenId": "<deployment-token-id>"
  }
}