On this page

    1. Home
    2. API
    3. API Reference
    4. Network
    5. Create Provider Spec

    Create Provider Spec

    The create-provider-spec endpoint allows you to generate specific connection requirements (Provider Specs) based on a natural language query or intent. This is useful for translating user needs (e.g., "fast connection in London") into actionable technical parameters.


    POST /network/create-provider-spec

    Generate provider specifications for a connection query.

    Request

    POST /network/create-provider-spec

    Headers:

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

    Body:

    {
      "query": "string"
    }
    FieldTypeDescription
    querystringA description of the intended use or geographical preference for the connection.

    Response

    200 Success

    Status: 200 OK

    Content-Type: application/json

    A successful response returns an array of matched provider specifications.

    {
      "specs": [
        {
          "location_id": "udid",
          "location_group_id": "udid",
          "client_id": "udid",
          "best_available": true
        }
      ]
    }

    Fields

    FieldTypeDescription
    specsarrayList of Provider Spec objects matching the query.

    Provider Spec

    FieldTypeDescription
    location_idstringThe UDID of the specific matching location.
    location_group_idstringThe UDID of the matching location group.
    client_idstringUDID of a specific recommended hardware client.
    best_availablebooleanIf true, the system recommends this as the optimal choice.

    Example

    HTTP Request

    POST /network/create-provider-spec HTTP/1.1
    Host: api.bringyour.com
    Content-Type: application/json
    Authorization: Bearer YOUR_JWT_TOKEN
     
    {
      "query": "High speed node in Germany"
    }

    Successful HTTP Response

    {
      "specs": [
        {
          "location_id": "de-fra-1",
          "best_available": true
        }
      ]
    }


    Powered by Sudoc v2.5.0
    Hide table of contents