Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Child pages (Children Display)
alltrue

Resource: Device

JSON representation

Code Block
{
  "id": string,
  "name": string,
  "numId": string,
  "credentials": [
    {
      object(DeviceCredential)
    }
  ],
  "lastHeartbeatTime": string,
  "lastEventTime": string,
  "lastStateTime": string,
  "lastConfigAckTime": string,
  "lastConfigSendTime": string,
  "blocked": boolean,
  "lastErrorTime": string,
  "lastErrorStatus": {
    object(Status)
  },
  "config": {
    object(DeviceConfig)
  },
  "state": {
    object(DeviceState)
  },
  "logLevel": enum(LogLevel),
  "metadata": {
    string: string,
    ...
  },
  "gatewayConfig": {
    object(GatewayConfig)
  }
}

...

A server-stored device credential used for authentication.

JSON representation

Code Block
{
  "expirationTime": string,
  "publicKey": {
    object(PublicKeyCredential)
  }
}

...

A public key format and data.

JSON representation

Code Block
{
  "format": enum(PublicKeyFormat),
  "key": string
}

...

  • Partial errors. If a service needs to return them to the client, it may embed the Status in the normal response to indicate them.

  • Workflow errors. A typical workflow has multiple steps. Each step may have an error reporting Status message.

  • Batch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.

  • Asynchronous operations. If an API calls asynchronous operations results in its response, the status of those operations should be represented directly using the Status message.

  • Logging. If some API errors are stored in logs, the Status message could be used directly after any stripping needed for security/privacy reasons.

JSON representation

Code Block
{
  "code": number,
  "message": string,
  "details": [
    {
      "@type": string,
      field1: ...,
      ...
    }
  ]
}

...

Gateway-related configuration and state.

JSON representation

Code Block
{
  "gatewayType": enum(GatewayType),
  "gatewayAuthMethod": enum(GatewayAuthMethod),
  "lastAccessedGatewayId": string,
  "lastAccessedGatewayTime": string
}

...