Updated Branches: refs/heads/trunk 14d3b2330 -> 55b634d71
AMBARI-2752 - Add Task resource schema to Ambari API docs. Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/55b634d7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/55b634d7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/55b634d7 Branch: refs/heads/trunk Commit: 55b634d719bdb101da2c92b84cae76d9ff9b2096 Parents: 14d3b23 Author: tbeerbower <[email protected]> Authored: Wed Jul 31 14:06:34 2013 -0400 Committer: tbeerbower <[email protected]> Committed: Thu Aug 1 10:03:44 2013 -0400 ---------------------------------------------------------------------- ambari-server/docs/api/v1/schemas.md | 240 ++++++++++++++++++++++++++++++ 1 file changed, 240 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/55b634d7/ambari-server/docs/api/v1/schemas.md ---------------------------------------------------------------------- diff --git a/ambari-server/docs/api/v1/schemas.md b/ambari-server/docs/api/v1/schemas.md index 6cb05fa..c9e0e4f 100644 --- a/ambari-server/docs/api/v1/schemas.md +++ b/ambari-server/docs/api/v1/schemas.md @@ -31,6 +31,8 @@ Ambari API Response Schemas - [GET host_component](#get-host_component) - [GET configurations](#get-configurations) - [GET configuration](#get-configuration) +- [GET request](#get-request) +- [GET task](#get-task) - [POST/PUT/DELETE resource](#post-put-delete-resource) @@ -2763,6 +2765,244 @@ GET configuration } } + +GET request +---- + +**Example** + + GET /api/v1/clusters/c1/requests/2 + + { + "href" : "http://your.ambari.server/api/v1/clusters/c1/requests/2", + "Requests" : { + "cluster_name" : "c1", + "id" : 2, + "request_context" : "Start Services" + }, + "tasks" : [ + { + "href" : "http://your.ambari.server/api/v1/clusters/c1/requests/2/tasks/15", + "Tasks" : { + "cluster_name" : "c1", + "id" : 15, + "request_id" : 2 + } + }, + { + "href" : "http://your.ambari.server/api/v1/clusters/c1/requests/2/tasks/16", + "Tasks" : { + "cluster_name" : "c1", + "id" : 16, + "request_id" : 2 + } + }, + { + "href" : "http://your.ambari.server/api/v1/clusters/c1/requests/2/tasks/17", + "Tasks" : { + "cluster_name" : "c1", + "id" : 17, + "request_id" : 2 + } + } + ] + } + +**Schema** + + { + "type":"object", + "$schema": "http://json-schema.org/draft-03/schema", + "title": "Request", + "required":true, + "properties":{ + "Requests": { + "type":"object", + "title": "RequestInfo", + "description":"Request information", + "required":true, + "properties":{ + "cluster_name": { + "type":"string", + "title": "ClusterName", + "required":true + }, + "id": { + "type":"number", + "Title": "Id", + "required":true + }, + "request_context": { + "type":"string", + "title": "RequestContext", + "required":false + } + } + }, + "href": { + "type":"string", + "description": "This request API href", + "required":true + }, + "tasks": { + "type":"array", + "title": "Task set", + "required":true, + "items": + { + "type":"object", + "title": "Task", + "required":true, + "properties":{ + "Tasks": { + "type":"object", + "title": "Task info", + "required":true, + "properties":{ + "cluster_name": { + "type":"string", + "title": "ClusterName", + "required":true + }, + "id": { + "type":"number", + "title": "Id", + "required":true + }, + "request_id": { + "type":"number", + "title": "RequestId", + "required":true + } + } + }, + "href": { + "type":"string", + "title": "This task API href", + "required":true + } + } + } + } + } + } + + +GET task +---- + +**Example** + + GET api/v1/clusters/c1/requests/2/tasks/15 + + { + "href" : "http://dev01.ambari.apache.org:8080/api/v1/clusters/c1/requests/2/tasks/15", + "Tasks" : { + "attempt_cnt" : 1, + "cluster_name" : "c1", + "command" : "START", + "exit_code" : 0, + "host_name" : "dev01.ambari.apache.org", + "id" : 15, + "request_id" : 2, + "role" : "DATANODE", + "stage_id" : 1, + "start_time" : 1375283290257, + "status" : "COMPLETED", + "stderr" : "none", + "stdout" : "notice: /Stage[2]/Hdp-hadoop::Initialize/Configgenerator::Configfile⦠+ } + } + +**Schema** + + { + "type":"object", + "$schema": "http://json-schema.org/draft-03/schema", + "title": "Task", + "required":true, + "properties":{ + "Tasks": { + "type":"object", + "title": "Task Info", + "required":true, + "properties":{ + "attempt_cnt": { + "type":"number", + "title": "AttemptCount", + "required":false + }, + "cluster_name": { + "type":"string", + "title": "ClusterName", + "required":true + }, + "command": { + "type":"string", + "title": "Command", + "required":false + }, + "exit_code": { + "type":"number", + "title": "ExitCode", + "required":false + }, + "host_name": { + "type":"string", + "title": "HostName", + "required":false + }, + "id": { + "type":"number", + "title": "Id", + "required":true + }, + "request_id": { + "type":"number", + "title": "RequestId", + "required":true + }, + "role": { + "type":"string", + "title": "Role", + "required":false + }, + "stage_id": { + "type":"number", + "title": "StageId", + "required":false + }, + "start_time": { + "type":"number", + "title": "StartTime", + "required":false + }, + "status": { + "type":"string", + "title": "Status", + "required":true + }, + "stderr": { + "type":"string", + "title": "StdErr", + "required":false + }, + "stdout": { + "type":"string", + "title": "StdOut", + "required":false + } + } + }, + "href": { + "type":"string", + "title": "This task API href", + "required":true + } + } + } + + POST/PUT/DELETE resource ----
