[{"label":"Latest (0.1.1)","version":"latest"}]
cric-r1

Put Service By ID

Description

Add a service if its not existing by creating an entry in the database. Update a service if its already existing by modifying the existing entry in the database.

Request

Request

URL

URL


put
https://{api_host}/dms/service/v0alpha1/services/{service_id}
Copy

Path Parameters

Path Parameters

string
service_id Required

ID of the service to be created or updated. It is the name associated with the service.


Request Body

Request Body

Service of mimetype application/json Required

Service object that needs to be updated or created

{
    "version": "0.1.0"
}
string
version Required

The current version of the service.


integer as int64
created_at Optional

Time at which the service was created. Times are nanoseconds since the unix epoch.


string
description Optional

A summary description of the service.


string
name Optional

Acts as the service ID.


string
service_href Optional

The href associated with the service.


string
service_type Optional

The type of the service stating whether the service is a platform service or an rApp.


string
status Optional

The status of the service. Only services with their status set to REGISTERED will be listed. By default the registry will set the status of service being added to REGISTERED. Services that do not send periodic heartbeat updates will be marked as UNDISCOVERABLE.

Possible values are: REGISTEREDUNDISCOVERABLE


integer as int64
updated_at Optional

Time at which the service was last updated. Times are nanoseconds since the unix epoch.


string
display_name Optional

The name as displayed for the service.

Response

Response

200 OK Response Body>

Response Body

200 OK

Returns R1RegistryResponse of type application/json

Successfully updated the service

integer as int64
heartbeat_timer Required

The duration, in seconds, at which heartbeats should be sent.


201 Created Response Body>

Response Body

201 Created

Returns R1RegistryResponse of type application/json

Successfully created a new service

integer as int64
heartbeat_timer Required

The duration, in seconds, at which heartbeats should be sent.

Errors

Errors

ProblemDetails
400

The input does not have the correct form, a service cannot be created.

Code Samples

Code Samples

cURL Command

curl -X PUT -H "Content-Type: application/json" -d '{"created_at":1632781620000000000,"description":"An rApp producer for querying historical PM Counter data.","display_name":"PM Counter History","name":"pmhistory","service_href":"http://pmhistory:8080/v0alpha1","service_type":"platform","status":"REGISTERED","updated_at":1632781620000000000,"version":"0.1.0"}' https://{api_host}/dms/service/v0alpha1/services/{service_id}


[{"label":"Latest (0.1.1)","version":"latest"}]
cric-r1
Feedback

Was this page helpful?