From 486d08bc5e274c222879cb45385d7614bdf0fae5 Mon Sep 17 00:00:00 2001 From: licanwei Date: Thu, 19 Jul 2018 23:48:06 -0700 Subject: [PATCH] Add actionplan list detail api ref Change-Id: If8bdea3b29049870b222b69ede10669183a3d952 --- api-ref/source/parameters.yaml | 22 +++++++++ .../actionplan-list-detailed-response.json | 26 ++++++++++ api-ref/source/watcher-api-v1-actionplans.inc | 47 ++++++++++++++++++- 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 api-ref/source/samples/actionplan-list-detailed-response.json diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index 0d0fc6e45..c0596b2ec 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -269,6 +269,21 @@ audittemplate_strategy: required: false type: string +created_at: + description: | + The date and time when the resource was created. The date and time + stamp format is `ISO 8601 `_ + in: body + required: true + type: string +deleted_at: + description: | + The date and time when the resource was deleted. The date and time + stamp format is `ISO 8601 `_ + in: body + required: true + type: string + # Goal goal_display_name: description: | @@ -403,6 +418,13 @@ strategy_uuid: required: true type: string +updated_at: + description: | + The date and time when the resource was updated. The date and time + stamp format is `ISO 8601 `_ + in: body + required: true + type: string uuid: description: | The UUID for the resource. diff --git a/api-ref/source/samples/actionplan-list-detailed-response.json b/api-ref/source/samples/actionplan-list-detailed-response.json new file mode 100644 index 000000000..74fda48e5 --- /dev/null +++ b/api-ref/source/samples/actionplan-list-detailed-response.json @@ -0,0 +1,26 @@ +{ + "action_plans": [ + { + "state": "ONGOING", + "efficacy_indicators": [], + "strategy_uuid": "7dae0eea-9df7-42b8-bb3e-313958ff2242", + "global_efficacy": [], + "links": [ + { + "rel": "self", + "href": "http://controller:9322/v1/action_plans/4cbc4ede-0d25-481b-b86e-998dbbd4f8bf" + }, + { + "rel": "bookmark", + "href": "http://controller:9322/action_plans/4cbc4ede-0d25-481b-b86e-998dbbd4f8bf" + } + ], + "updated_at": "2018-04-10T11:59:52.640067+00:00", + "strategy_name": "dummy_with_resize", + "deleted_at": null, + "uuid": "4cbc4ede-0d25-481b-b86e-998dbbd4f8bf", + "audit_uuid": "7d100b05-0a86-491f-98a7-f93da19b272a", + "created_at": "2018-04-10T11:59:52.640067+00:00" + } + ] +} diff --git a/api-ref/source/watcher-api-v1-actionplans.inc b/api-ref/source/watcher-api-v1-actionplans.inc index 8a1792dda..219978e0c 100644 --- a/api-ref/source/watcher-api-v1-actionplans.inc +++ b/api-ref/source/watcher-api-v1-actionplans.inc @@ -98,6 +98,51 @@ Response .. literalinclude:: samples/actionplan-list-response.json :language: javascript +List Action Plan detailed +========================= + +.. rest_method:: GET /v1/action_plans/detail + +Returns a list of Action Plan resources with complete details. + +Normal response codes: 200 + +Error codes: 400,401 + +Request +------- + +.. rest_parameters:: parameters.yaml + + - audit_uuid: r_audit + - strategy: r_strategy + - limit: limit + - marker: marker + - sort_dir: sort_dir + - sort_key: sort_key + +Response +-------- + +.. rest_parameters:: parameters.yaml + + - deleted_at: deleted_at + - updated_at: updated_at + - created_at: created_at + - uuid: uuid + - state: actionplan_state + - audit_uuid: actionplan_audit_uuid + - strategy_uuid: strategy_uuid + - strategy_name: strategy_name + - efficacy_indicators: actionplan_efficacy_indicators + - global_efficacy: actionplan_global_efficacy + - links: links + +**Example JSON representation of an Action Plan:** + +.. literalinclude:: samples/actionplan-list-detailed-response.json + :language: javascript + Show Action Plan ================ @@ -206,4 +251,4 @@ Request .. rest_parameters:: parameters.yaml - - actionplan_ident: actionplan_ident \ No newline at end of file + - actionplan_ident: actionplan_ident