JSON-RPC API sdc-plgn-checker
Module description
Plugin for defining and running custom procedures
Operations
Define a new procedure for use in the cluster.
Request data
{
"context": {
"op": "procedure_add"
},
"data": {
"name": "<name>",
"definition": "<definition>",
"json": "<json>",
"validate": "<validate>"
}
}
Description
name [ str required ] - Name of the procedure. Must be unique within the cluster.
definition [ str required ] - Yaml definition of the procedure.
json [ str ] - Should the output of this command be returned as json? ['yes', 'no']
validate [ str ] - Should this command just validate the passed definition instead of adding it? ['yes', 'no']
Update definition of an existing procedure.
Request data
{
"context": {
"op": "procedure_update"
},
"data": {
"name": "<name>",
"definition": "<definition>",
"json": "<json>",
"validate": "<validate>"
}
}
Description
name [ str required ] - Name of the procedure. Must be unique within the cluster.
definition [ str required ] - Yaml definition of the procedure.
json [ str ] - Should the output of this command be returned as json? ['yes', 'no']
validate [ str ] - Should this command just validate the passed definition instead of adding it? ['yes', 'no']
Remove a procedure from cluster. Also undelegates and unschedules it from all namespaces.
Request data
Description
name [ str required ] - Name of the procedure to be undefined.
List all registered procedures.
Request data
Description
ns [ str * ] - Filter namespaces to show
List procedures delegated to this namespace.
Request data
Show detailed description of the procedure.
Request data
Description
name [ str required ] - Name of the procedure to show.
json [ str ] - Should the output of this command be returned as json? ['yes', 'no']
Delegate a procedure to namespaces, making it possible to schedule it.
Request data
Description
name [ str required ] - Name of the procedure to be (un)delegated.
ns [ str * required ] - Namespace(s) this procedure should be (un)delegated to(from).
Undelegate a procedure from namespaces, making it inaccessible to schedule.
Request data
Description
name [ str required ] - Name of the procedure to be (un)delegated.
ns [ str * required ] - Namespace(s) this procedure should be (un)delegated to(from).
Schedule a procedure to run within this namespace.
Request data
{
"context": {
"op": "procedure_schedule_add"
},
"data": {
"name": "<name>",
"vars": "<vars>",
"cron": "<cron>"
}
}
Description
name [ str required ] - Name of the procedure to be scheduled.
vars [ jsonstr ] - Default variables to be set.
cron [ str required ] - Cron schedule to run at.
Unschedule a procedure.
Request data
Description
uuid [ str required ] - UUID of a scheduled procedure to remove
Show all procedures scheduled to run in this namespace.
Request data
Show all procedures scheduled to run in this namespace.
Request data
{
"context": {
"op": "procedure_schedule_update"
},
"data": {
"uuid": "<uuid>",
"vars": "<vars>",
"cron": "<cron>"
}
}
Description
uuid [ str required ] - UUID of a scheduled procedure to remove
vars [ jsonstr ] - Default variables to be set.
cron [ str required ] - Cron schedule to run at.
Manually execute a procedure.
Request data
{
"context": {
"op": "procedure_execute"
},
"data": {
"name": "<name>",
"vars": "<vars>",
"json": "<json>"
}
}
Description
name [ str required ] - Name of the procedure to be executed.
vars [ jsonstr ] - Default variables to be set.
json [ str ] - Should the output of this command be returned as json? ['yes', 'no']
Stop a procedure from execution
Request data
Description
uuid [ str required ] - UUID of running procedure to interrupt
Show status of a completed or in-progress procedure.
Request data
Description
uuid [ str required ] - Task UUID of a procedure.
json [ str ] - Should the output of this command be returned as json? ['yes', 'no']
List statuses of all executed procedures
Request data
Delete status of a procedure from a list. This is only possible for completed procedures.
Request data
Description
uuid [ str required ] - Task UUID of a procedure.
json [ str ] - Should the output of this command be returned as json? ['yes', 'no']
Clears the status log by deleting all statuses of already completed procedures.
Request data