On this page

    1. Home
    2. API
    3. API Reference
    4. Device
    5. Set Association Name

    Set Association Name

    This endpoint allows you to update the display name of an existing device association (either a share or a pending adoption). This renaming affects how the shared device appears in your associations list.


    POST /device/set-association-name

    Updates the local descriptive name for a specific device code.

    Request

    POST /device/set-association-name

    Headers:

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

    Body:

    {
      "code": "string",
      "device_name": "string"
    }
    FieldTypeDescription
    codestringRequired. The unique share or adopt code for the association.
    device_namestringRequired. The new display name for the device.

    Response

    200 Success

    Status: 200 OK

    Content-Type: application/json

    {
      "error": {
        "message": "string"
      }
    }
    FieldTypeDescription
    errorobjectDetails on failure if renaming was unsuccessful (can be null).
    error.messagestringA descriptive message explaining any issues encountered.

    Example

    HTTP Request

    POST /device/set-association-name HTTP/1.1
    Host: api.bringyour.com
    Content-Type: application/json
    Authorization: Bearer YOUR_JWT_TOKEN
     
    {
      "code": "SHARE-1234-ABCD",
      "device_name": "Redesigned Office Node"
    }

    Successful HTTP Response

    {
      "error": null
    }


    Powered by Sudoc v2.5.0
    Hide table of contents