On this page

    1. Home
    2. API
    3. API Reference
    4. Network
    5. Network Control

    Network Control

    The control endpoint is used to send and receive encrypted control packets for managing network connections and relay states.


    POST /connect/control

    Send a control packet to the network controller. This is primarily used by client software to negotiate connections and update state.

    Request

    POST /connect/control

    Headers:

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

    Body:

    {
      "pack": ["string"]
    }
    FieldTypeDescription
    packarrayA list of base64 encoded strings representing encrypted control directives.

    Response

    200 Success

    Status: 200 OK

    Content-Type: application/json

    {
      "pack": ["string"],
      "error": {
        "message": "string"
      }
    }
    FieldTypeDescription
    packarrayResponse control packets from the controller.
    errorobjectAn error object if the control message could not be processed.
    error.messagestringA descriptive message explaining why the control directive failed.

    Example

    HTTP Request

    POST /connect/control HTTP/1.1
    Host: api.bringyour.com
    Content-Type: application/json
    Authorization: Bearer YOUR_JWT_TOKEN
     
    {
      "pack": ["ZXhhbXBsZSBjb250cm9sIHBhY2tldA=="]
    }

    Successful HTTP Response

    {
      "pack": ["cmVzcG9uc2UgcGFja2V0"],
      "error": null
    }


    Powered by Sudoc v2.5.0
    Hide table of contents