Share

Share device locations and group devices.


POST/share/device

Share device location

Generate a shareable token for a device's location with an expiration date.

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description

    HTTP Authorization Scheme: basic

  • Name
    ApiKey
    Type
    scheme
    Description

    HTTP Authorization Scheme: bearer

Request body schema

  • Name
    application/x-www-form-urlencoded
    Type
    schema
    Description

Body parameters

  • Name
    deviceId
    Type
    integer required
    Description

    The ID of the device to share

  • Name
    expiration
    Type
    string (date-time) required
    Description

    Expiration date-time for the share token

Responses

  • Name
    200
    Type
    success
    Description
  • Name
    text/plain
    Type
    response schema
    Description
  • A JWT share token string (e.g. eyJhbGciOi...)

  • Name
    403
    Type
    error
    Description

    Sharing is disabled or temporary user

Request

POST
/share/device
curl --location 'https://gw.onemap8.com/api/share/device' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic {your_access_token}' \
--data-urlencode 'deviceId=<integer>' \
--data-urlencode 'expiration=<date-time>'

Response

eyJhbGciOi...

POST/share/group

Share group devices

Generate a shareable token for all devices in a group with an expiration date.

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description

    HTTP Authorization Scheme: basic

  • Name
    ApiKey
    Type
    scheme
    Description

    HTTP Authorization Scheme: bearer

Request body schema

  • Name
    application/x-www-form-urlencoded
    Type
    schema
    Description

Body parameters

  • Name
    groupId
    Type
    integer required
    Description

    The ID of the group whose devices to share

  • Name
    expiration
    Type
    string (date-time) required
    Description

    Expiration date-time for the share token

Responses

  • Name
    200
    Type
    success
    Description
  • Name
    text/plain
    Type
    response schema
    Description
  • A JWT share token string (e.g. eyJhbGciOi...)

  • Name
    403
    Type
    error
    Description

    Sharing is disabled or temporary user

Request

POST
/share/group
curl --location 'https://gw.onemap8.com/api/share/group' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic {your_access_token}' \
--data-urlencode 'groupId=<integer>' \
--data-urlencode 'expiration=<date-time>'

Response

eyJhbGciOi...