Skip to main content

Register Instance

PUT 

//localhost:11337/registry-svc/instance

Registers an instance. Idempotent.

Request

Bodyrequired

Register Instance Request

    deploymentIdstring

    The ID of the deployment that this instance is an instance of.

    Example: depl_deBUCtJirc
    hoststring

    Host of the instance address. Required if URL is not provided

    Example: myserver.com
    idstring
    Example: inst_di9riJEvH2
    ipstring

    IP of the instance address. Optional: to register by IP instead of host

    Example: 8.8.8.8
    pathstring

    Path of the instance address. Optional (e.g., "/api")

    Example: /your-svc
    portinteger

    Port of the instance address. Required if URL is not provided

    Example: 8080
    schemestring

    Scheme of the instance address. Required if URL is not provided.

    Example: https
    urlstringrequired

    Full address URL of the instance.

    Example: https://myserver.com:5981

Responses

Created

Schema
    objectobject

Authorization: Authorization

name: Authorizationtype: apiKeydescription: Type "Bearer" followed by a space and token acquired from the User Svc Login endpoint.in: header
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "//localhost:11337/registry-svc/instance");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "<Authorization>");
var content = new StringContent("{\n \"deploymentId\": \"depl_deBUCtJirc\",\n \"host\": \"myserver.com\",\n \"id\": \"inst_di9riJEvH2\",\n \"ip\": \"8.8.8.8\",\n \"path\": \"/your-svc\",\n \"port\": 8080,\n \"scheme\": \"https\",\n \"url\": \"https://myserver.com:5981\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
//localhost:11337
Auth
Body required
{
  "deploymentId": "depl_deBUCtJirc",
  "host": "myserver.com",
  "id": "inst_di9riJEvH2",
  "ip": "8.8.8.8",
  "path": "/your-svc",
  "port": 8080,
  "scheme": "https",
  "url": "https://myserver.com:5981"
}
ResponseClear

Click the Send API Request button above and see the response here!