On this page

    1. Home
    2. API
    3. API Reference
    4. Device
    5. Device Associations

    Device Associations

    This endpoint provides a comprehensive view of all device-level partnerships and handovers associated with your network. It categorizes associations into those you are offering (pending adoption), devices shared with you by others, and your own devices that you have shared with other networks.


    GET /device/associations

    Retrieve lists of all pending and active device associations.

    Request

    GET /device/associations

    Headers:

    {
      "Host": "api.bringyour.com",
      "Authorization": "Bearer YOUR_JWT_TOKEN",
      "Accept": "application/json"
    }

    Response

    200 Success

    Status: 200 OK

    Content-Type: application/json

    A successful response returns an object categorizing three types of device associations.

    {
      "pending_adoption_devices": [
        {
          "code": "string",
          "device_name": "string",
          "duration_minutes": 0
        }
      ],
      "incoming_shared_devices": [
        {
          "pending": true,
          "code": "string",
          "device_name": "string",
          "client_id": "udid",
          "network_name": "string"
        }
      ],
      "outgoing_shared_devices": [
        {
          "pending": true,
          "code": "string",
          "device_name": "string",
          "client_id": "udid",
          "network_name": "string"
        }
      ]
    }

    Fields

    FieldTypeDescription
    pending_adoption_devicesarrayDevices you have created adopt codes for that are awaiting a new owner.
    incoming_shared_devicesarrayDevices belonging to other networks that have been shared with you.
    outgoing_shared_devicesarrayDevices you own that have been shared with other networks.

    Shared Device Object

    FieldTypeDescription
    pendingbooleantrue if the share invitation has not yet been confirmed by the recipient.
    codestringThe unique alphanumeric code representing this association.
    device_namestringHuman-readable name of the hardware device.
    client_idstringThe UDID of the client involved in the share.
    network_namestringThe name of the peer network involved in the association.

    Example

    HTTP Request

    GET /device/associations HTTP/1.1
    Host: api.bringyour.com
    Authorization: Bearer YOUR_JWT_TOKEN
    Accept: application/json

    Successful HTTP Response

    {
      "incoming_shared_devices": [
        {
          "pending": false,
          "code": "SHARE-9988-7766",
          "device_name": "Remote-Worker-Laptop",
          "client_id": "c73040c1-0000-0000-0000-000000000000",
          "network_name": "Main-Office-Net"
        }
      ],
      "outgoing_shared_devices": [],
      "pending_adoption_devices": []
    }


    Powered by Sudoc v2.5.0
    Hide table of contents