Myriad REST API
To scale a cluster up or down, use the Cluster API. The Cluster API provide flexup and flex down capability the changes the size of one or more instances in a cluster. The instance size is a profile parameter that is a predefined value of zero, small, medium, and large. These predefined values are specified in the Myriad configuration file (myriad-config-default.yml). To specify the number of instances for a service, use the Service API. Services are configured in the Myriad configuration file (myriad-config-default.yml). To retrieve the Myriad configuration and the Myriad Scheduler state, use the Configuration API and State API. See Myriad open source REST API for more information.
The Myriad REST API provides the following functionality:
API | HTTP Method | URI | Description |
---|---|---|---|
Cluster | PUT | /api/cluster/flexup | Expands the cluster size. Parameters: profile, instances, constraints |
Cluster | PUT | /api/cluster/flexdown | Shrinks the cluster size. Parameters: profile, instances, constraints |
Service | PUT | /api/cluster/flexupservice | Increases the number of instances for a service. Parameters: instances, serviceName |
Service | PUT | /api/cluster/flexdownservice | Shrinks the number of instances for a service. Parameters: instances, serviceName |
Configuration | GET | /api/config | Retrieves the Myriad configuration. |
State | GET | api/state | Retrieves a snapshot of the Myriad Scheduler state. |
Framework | GET | /api/framework/shutdown/frameworkd | Destroys the Myriad framework. NOTE: With this release, GET is the method used to
destroy the Myriad framework. |