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
- application/json
Body parameters
Security
-
Authorization: apiKey
Type:
apiKey
Response
Supported Media Types
- text/plain; charset=utf-8
200 Response
200 Response
Default Response
Error Payload
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":{}}}'