78 lines
2.9 KiB
JSON
78 lines
2.9 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
|
|
"type": "object",
|
|
|
|
"request": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_logs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"node_aid": {"type": "string"},
|
|
"external_id": {"type": "integer"},
|
|
"body": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {"type": "number"},
|
|
"actor_id": {"type": ["string", "null"]},
|
|
"action_group": {"type": "string"},
|
|
"action_name": {"type": "string"},
|
|
"action_type": {"type": "string"},
|
|
"start_timestamp": {"type": "string"},
|
|
"end_timestamp": {"type": "string"},
|
|
"additional_info": {"type": "object"},
|
|
"is_sent": {"type": "boolean"},
|
|
"cluster_id": {"type": ["number", "null"]},
|
|
"task_uuid": {"type": ["string", "null"]}
|
|
}
|
|
}
|
|
},
|
|
"required": ["node_aid", "external_id", "body"]
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
|
|
"response": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {"enum": ["ok"]},
|
|
"message": {"type": "string"},
|
|
"exec_time": {"type": "number"},
|
|
"action_logs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"node_aid": {"type": "string"},
|
|
"external_id": {"type": "integer"},
|
|
"status": {"enum": ["added", "existed", "failed"]}
|
|
},
|
|
"required": ["node_aid", "external_id", "status"],
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
},
|
|
"required": ["status", "action_logs"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {"enum": ["error"]},
|
|
"exec_time": {"type": "number"},
|
|
"message": {"type": "string"}
|
|
},
|
|
"required": ["status", "message"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
|
|
} |