The Service REST API uses the PUT /api/cluster/flexupservice and flexdownservice HTTP method and URI to dedicated resources to Myriad services. To launch services, such as JobHistoryServer, as a task from the Myriad Framework, the service must be defined in the Myriad configuration file, myriad-config-default.yml. See Configuring for JobHistoryServer and Other Services for more information.

HTTP Method and URI

PUT /api/cluster/flexupservice
PUT /api/cluster/flexdownservice

 

Parameters include:

ParameterDescription
instances(Required) Number of service instances to launch for the service.
serviceName(Required) Service name as configured in the Myriad configuration file, myriad-config-default.yml.

Syntax

http://<IP address>:8192/api/cluster/flexdownservice
	instances=<number of instances>
	serviceName=<name of service>

http://<IP address>:8192/api/cluster/flexupservice
	instances=<number of instances>
	serviceName=<name of service>

Request Examples

Curl request example:

curl -X PUT http://10.10.100.19.:8192/api/cluster/flexdownservices
    -d instances=1
    -d serviceName=jobhistory


The following launches a service instance for the jobhistory task:

{
    "instances":1, "serviceName": "jobhistory"
}
  • No labels