Register a new Service Discovery database item

put

/api/catalog/register

To add a new service to the Service Discovery database, you provide the service details, which are passed to the service using properties in the endpoint root schema and nested schemas.

Request

Supported Media Types
Body ()
Body parameters
Root Schema : schema
Type: object
Show Source
Nested Schema : Service
Type: object
Show Source
Nested Schema : Check
Type: object
Show Source
Nested Schema : Tags
Type: array
Show Source
Security
Back to Top

Response

Supported Media Types

200 Response

200 Response
Body ()
Root Schema : schema
Type: array
Show Source

Default Response

Error Payload
Body ()
Root Schema : schema
Type: array
Show Source
Back to Top

Examples

The following example shows how to register a new service in the service discovery database by submitting a PUT request on the REST resource using cURL. For more information about cURL, see Use cURL

Note: The command in this example uses the URL structure https://rest_server_url/resource-path, where rest_server_url is the manager node for the Oracle Cloud Container instance. See Send Requests for the appropriate URL structure to use for Oracle Public Cloud.

cURL Command

curl -si
     -X "PUT" 
     -H "Authorization: Bearer 394ed660d52ac8d8"
     -H "Content-Type:application/json"
        "http://rest_server_url/api/catalog/register"
     -d '{"Service": {"ID":"myservice_id",
                      "Service":"myservice_name",
                      "Address":"ip_address",
                      "Port": 9999,
                      "Tags":["myservice_tag1"],
                      "Check":{}}}'
Back to Top