Put Service By Id

Put Service By Id

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
URI
PUT
https://{api_host}/dms/service/v0alpha1/services/{service_id}
COPY
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

Service object that needs to be updated or created

Service of type(s) application/json
Required
{
    "name": "pmhistory",
    "version": "0.1.0",
    "display_name": "PM Counter History",
    "description": "An rApp producer for querying historical PM Counter data.",
    "updated_at": 1632781620000000000,
    "created_at": 1632781620000000000,
    "service_type": "platform",
    "service_href": "http://pmhistory:8080/v0alpha1",
    "status": "REGISTERED"
}
string
name
Optional

Acts as the service ID.

string
version
Required

The current version of the service.

string
display_name
Optional

The name as displayed for the service.

string
description
Optional

A summary description of the service.

integer As int64 As int64
updated_at
Optional

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

integer As int64 As int64
created_at
Optional

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

string
service_type
Required

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

string
service_href
Optional

The href associated with the service.

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 : REGISTERED, UNDISCOVERABLE,
Responses
200

Successfully updated the service

Returns R1RegistryResponse of type(s) application/json
{
    "heartbeat_timer": 0
}
integer As int64 As int64
heartbeat_timer
Required

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


201

Successfully created a new service

Returns R1RegistryResponse of type(s) application/json
{
    "heartbeat_timer": 0
}
integer As int64 As int64
heartbeat_timer
Required

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


400

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

Returns ProblemDetails of type(s) application/problem+json
{
    "type": "string",
    "title": "string",
    "status": 400,
    "detail": "Required field 'counter_names' missing.",
    "instance": "string"
}
string
type
Optional

A URI representing the type of the problem.

string
title
Required

A short summary of the error.

number
status
Required

The HTTP Response code associated with this error.

string
detail
Required

A detailed description of the error.

string
instance
Optional

An optional URI of the instance involved in the problem.