RESTful Web API (v1)

RESTful Web API (v1)

Goals

GET /v1/goal

Retrieve a list of goals.

Parameters:
  • marker (unicode) – pagination marker for large data sets.
  • limit (int) – maximum number of resources to return in a single result.
  • sort_key (unicode) – column to sort results by. Default: id.
  • sort_dir (unicode) – direction to sort. “asc” or “desc”. Default: asc.
Return type:

GoalCollection

GET /v1/goal/(goal)

Retrieve information about the given goal.

Parameters:
  • goal (unicode) – UUID or name of the goal.
Return type:

Goal

GET /v1/goal/detail

Retrieve a list of goals with detail.

Parameters:
  • marker (unicode) – pagination marker for large data sets.
  • limit (int) – maximum number of resources to return in a single result.
  • sort_key (unicode) – column to sort results by. Default: id.
  • sort_dir (unicode) – direction to sort. “asc” or “desc”. Default: asc.
Return type:

GoalCollection

type GoalCollection

API representation of a collection of goals.

Data samples:

Json
{
    "goals": [
        {
            "display_name": "Dummy strategy",
            "efficacy_specification": [
                {
                    "description": "Dummy indicator",
                    "name": "dummy",
                    "schema": "Range(min=0, max=100, min_included=True, max_included=True, msg=None)",
                    "unit": "%"
                }
            ],
            "links": [
                {
                    "href": "http://localhost:9322/v1/goals/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
                    "rel": "self"
                },
                {
                    "href": "http://localhost:9322/goals/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
                    "rel": "bookmark"
                }
            ],
            "name": "DUMMY",
            "uuid": "27e3153e-d5bf-4b7e-b517-fb518e17f34c"
        }
    ]
}
goals
Type:list(Goal)

A list containing goals objects

type Goal

API representation of a goal.

This class enforces type checking and value constraints, and converts between the internal object model and the API representation of a goal.

Data samples:

Json
{
    "display_name": "Dummy strategy",
    "efficacy_specification": [
        {
            "description": "Dummy indicator",
            "name": "dummy",
            "schema": "Range(min=0, max=100, min_included=True, max_included=True, msg=None)",
            "unit": "%"
        }
    ],
    "links": [
        {
            "href": "http://localhost:9322/v1/goals/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
            "rel": "self"
        },
        {
            "href": "http://localhost:9322/goals/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
            "rel": "bookmark"
        }
    ],
    "name": "DUMMY",
    "uuid": "27e3153e-d5bf-4b7e-b517-fb518e17f34c"
}
display_name
Type:unicode

Localized name of the goal

efficacy_specification
Type:json

Efficacy specification for this goal

Type:list(Link)

A list containing a self link and associated audit template links

name
Type:unicode

Name of the goal

uuid
Type:uuid

Unique UUID for this goal

Strategies

GET /v1/strategies

Retrieve a list of strategies.

Parameters:
  • goal (unicode) – goal UUID or name to filter by.
  • marker (unicode) – pagination marker for large data sets.
  • limit (int) – maximum number of resources to return in a single result.
  • sort_key (unicode) – column to sort results by. Default: id.
  • sort_dir (unicode) – direction to sort. “asc” or “desc”. Default: asc.
Return type:

StrategyCollection

GET /v1/strategies/(strategy)

Retrieve information about the given strategy.

Parameters:
  • strategy (unicode) – UUID or name of the strategy.
Return type:

Strategy

GET /v1/strategies/detail

Retrieve a list of strategies with detail.

Parameters:
  • goal (unicode) – goal UUID or name to filter by.
  • marker (unicode) – pagination marker for large data sets.
  • limit (int) – maximum number of resources to return in a single result.
  • sort_key (unicode) – column to sort results by. Default: id.
  • sort_dir (unicode) – direction to sort. “asc” or “desc”. Default: asc.
Return type:

StrategyCollection

type StrategyCollection

API representation of a collection of strategies.

Data samples:

Json
{
    "strategies": [
        {
            "display_name": "Dummy strategy",
            "goal_name": null,
            "goal_uuid": null,
            "links": [
                {
                    "href": "http://localhost:9322/v1/strategies/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
                    "rel": "self"
                },
                {
                    "href": "http://localhost:9322/strategies/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
                    "rel": "bookmark"
                }
            ],
            "name": "DUMMY",
            "uuid": "27e3153e-d5bf-4b7e-b517-fb518e17f34c"
        }
    ]
}
strategies
Type:list(Strategy)

A list containing strategies objects

type Strategy

API representation of a strategy.

This class enforces type checking and value constraints, and converts between the internal object model and the API representation of a strategy.

Data samples:

Json
{
    "display_name": "Dummy strategy",
    "goal_name": null,
    "goal_uuid": null,
    "links": [
        {
            "href": "http://localhost:9322/v1/strategies/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
            "rel": "self"
        },
        {
            "href": "http://localhost:9322/strategies/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
            "rel": "bookmark"
        }
    ],
    "name": "DUMMY",
    "uuid": "27e3153e-d5bf-4b7e-b517-fb518e17f34c"
}
display_name
Type:unicode

Localized name of the strategy

goal_name
Type:unicode

The name of the goal this audit refers to

goal_uuid
Type:unicode

The UUID of the goal this audit refers to

Type:list(Link)

A list containing a self link and associated goal links

name
Type:unicode

Name of the strategy

parameters_spec
Type:dict(unicode: json)

Parameters spec dict

uuid
Type:uuid

Unique UUID for this strategy

Audit Templates

GET /v1/audit_templates

Retrieve a list of audit templates.

Parameters:
  • goal (unicode) – goal UUID or name to filter by
  • strategy (unicode) – strategy UUID or name to filter by
  • marker (uuid) – pagination marker for large data sets.
  • limit (int) – maximum number of resources to return in a single result.
  • sort_key (unicode) – column to sort results by. Default: id.
  • sort_dir (unicode) – direction to sort. “asc” or “desc”. Default: asc.
Return type:

AuditTemplateCollection

GET /v1/audit_templates/(audit_template)

Retrieve information about the given audit template.

Parameters:
  • audit_template (unicode) – UUID or name of an audit template.
Return type:

AuditTemplate

POST /v1/audit_templates

Create a new audit template.

Parameters:
  • audit_template_postdata (AuditTemplatePostType) – the audit template POST data from the request body.
Return type:

AuditTemplate

DELETE /v1/audit_templates

Delete a audit template.

Parameters:
  • template_uuid – UUID or name of an audit template.
PATCH /v1/audit_templates

Update an existing audit template.

Parameters:
  • template_uuid – UUID of a audit template.
  • patch (list(AuditTemplatePatchType)) – a json PATCH document to apply to this audit template.
Return type:

AuditTemplate

GET /v1/audit_templates/detail

Retrieve a list of audit templates with detail.

Parameters:
  • goal (unicode) – goal UUID or name to filter by
  • strategy (unicode) – strategy UUID or name to filter by
  • marker (uuid) – pagination marker for large data sets.
  • limit (int) – maximum number of resources to return in a single result.
  • sort_key (unicode) – column to sort results by. Default: id.
  • sort_dir (unicode) – direction to sort. “asc” or “desc”. Default: asc.
Return type:

AuditTemplateCollection

type AuditTemplateCollection

API representation of a collection of audit templates.

Data samples:

Json
{
    "audit_templates": [
        {
            "goal_name": null,
            "goal_uuid": null,
            "links": [
                {
                    "href": "http://localhost:9322/v1/audit_templates/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
                    "rel": "self"
                },
                {
                    "href": "http://localhost:9322/audit_templates/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
                    "rel": "bookmark"
                }
            ],
            "name": "My Audit Template",
            "scope": [],
            "strategy_name": null,
            "strategy_uuid": null,
            "uuid": "27e3153e-d5bf-4b7e-b517-fb518e17f34c"
        }
    ]
}
audit_templates
Type:list(AuditTemplate)

A list containing audit templates objects

type AuditTemplate

API representation of a audit template.

This class enforces type checking and value constraints, and converts between the internal object model and the API representation of an audit template.

Data samples:

Json
{
    "created_at": "2017-11-15T11:01:04.868433",
    "deleted_at": null,
    "description": "Description of my audit template",
    "goal_name": null,
    "goal_uuid": null,
    "links": [
        {
            "href": "http://localhost:9322/v1/audit_templates/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
            "rel": "self"
        },
        {
            "href": "http://localhost:9322/audit_templates/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
            "rel": "bookmark"
        }
    ],
    "name": "My Audit Template",
    "scope": [],
    "strategy_name": null,
    "strategy_uuid": null,
    "updated_at": "2017-11-15T11:01:04.868435",
    "uuid": "27e3153e-d5bf-4b7e-b517-fb518e17f34c"
}
audits
Type:list(Link)

Links to the collection of audits contained in this audit template

description
Type:unicode

Short description of this audit template

goal_name
Type:unicode

The name of the goal this audit template refers to

goal_uuid
Type:unicode

Goal UUID the audit template refers to

Type:list(Link)

A list containing a self link and associated audit template links

name
Type:unicode

Name of this audit template

scope
Type:json

Audit Scope

strategy_name
Type:unicode

The name of the strategy this audit template refers to

strategy_uuid
Type:unicode

Strategy UUID the audit template refers to

uuid
Type:uuid

Unique UUID for this audit template

Audits

GET /v1/audits

Retrieve a list of audits.

Parameters:
  • marker (uuid) – pagination marker for large data sets.
  • limit (int) – maximum number of resources to return in a single result.
  • sort_key (unicode) – column to sort results by. Default: id.
  • sort_dir (unicode) – direction to sort. “asc” or “desc”. Default: asc.
  • goal (unicode) – goal UUID or name to filter by
  • strategy (unicode) – strategy UUID or name to filter by
Return type:

AuditCollection

GET /v1/audits/(audit_uuid)

Retrieve information about the given audit.

Parameters:
  • audit_uuid (uuid) – UUID of a audit.
Return type:

Audit

POST /v1/audits

Create a new audit.

Parameters:
  • audit_p (AuditPostType) – a audit within the request body.
Return type:

Audit

DELETE /v1/audits

Delete a audit.

Parameters:
  • audit_uuid (uuid) – UUID of a audit.
PATCH /v1/audits

Update an existing audit.

Parameters:
  • audit_uuid (uuid) – UUID of a audit.
  • patch (list(AuditPatchType)) – a json PATCH document to apply to this audit.
Return type:

Audit

GET /v1/audits/detail

Retrieve a list of audits with detail.

Parameters:
  • goal (unicode) – goal UUID or name to filter by
  • marker (uuid) – pagination marker for large data sets.
  • limit (int) – maximum number of resources to return in a single result.
  • sort_key (unicode) – column to sort results by. Default: id.
  • sort_dir (unicode) – direction to sort. “asc” or “desc”. Default: asc.
Return type:

AuditCollection

type AuditCollection

API representation of a collection of audits.

Data samples:

Json
{
    "audits": [
        {
            "audit_type": "ONESHOT",
            "auto_trigger": false,
            "goal_name": null,
            "goal_uuid": null,
            "interval": "7200",
            "links": [
                {
                    "href": "http://localhost:9322/v1/audits/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
                    "rel": "self"
                },
                {
                    "href": "http://localhost:9322/audits/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
                    "rel": "bookmark"
                }
            ],
            "next_run_time": "2017-11-15T11:01:05.098942",
            "scope": [],
            "state": "PENDING",
            "strategy_name": null,
            "strategy_uuid": null,
            "uuid": "27e3153e-d5bf-4b7e-b517-fb518e17f34c"
        }
    ]
}
audits
Type:list(Audit)

A list containing audits objects

type Audit

API representation of a audit.

This class enforces type checking and value constraints, and converts between the internal object model and the API representation of a audit.

Data samples:

Json
{
    "audit_type": "ONESHOT",
    "auto_trigger": false,
    "created_at": "2017-11-15T11:01:05.112708",
    "deleted_at": null,
    "goal_name": null,
    "goal_uuid": null,
    "interval": "7200",
    "links": [
        {
            "href": "http://localhost:9322/v1/audits/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
            "rel": "self"
        },
        {
            "href": "http://localhost:9322/audits/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
            "rel": "bookmark"
        }
    ],
    "next_run_time": "2017-11-15T11:01:05.112712",
    "scope": [],
    "state": "PENDING",
    "strategy_name": null,
    "strategy_uuid": null,
    "updated_at": "2017-11-15T11:01:05.112711",
    "uuid": "27e3153e-d5bf-4b7e-b517-fb518e17f34c"
}
audit_type
Type:unicode

Type of this audit

auto_trigger
Type:bool

Autoexecute action plan once audit is succeeded

goal_name
Type:unicode

The name of the goal this audit template refers to

goal_uuid
Type:unicode

Goal UUID the audit template refers to

interval
Type:unicode

Launch audit periodically (in seconds)

Type:list(Link)

A list containing a self link and associated audit links

next_run_time
Type:datetime

The next time audit launch

parameters
Type:dict(unicode: json)

The strategy parameters for this audit

scope
Type:json

Audit Scope

state
Type:unicode

This audit state

strategy_name
Type:unicode

The name of the strategy this audit template refers to

strategy_uuid
Type:unicode

Strategy UUID the audit template refers to

uuid
Type:uuid

Unique UUID for this audit

Action Plans

GET /v1/action_plans

Retrieve a list of action plans.

Parameters:
  • marker (uuid) – pagination marker for large data sets.
  • limit (int) – maximum number of resources to return in a single result.
  • sort_key (unicode) – column to sort results by. Default: id.
  • sort_dir (unicode) – direction to sort. “asc” or “desc”. Default: asc.
  • audit_uuid (uuid) – Optional UUID of an audit, to get only actions for that audit.
  • strategy (unicode) – strategy UUID or name to filter by
Return type:

ActionPlanCollection

GET /v1/action_plans/(action_plan_uuid)

Retrieve information about the given action plan.

Parameters:
  • action_plan_uuid (uuid) – UUID of a action plan.
Return type:

ActionPlan

DELETE /v1/action_plans

Delete an action plan.

Parameters:
  • action_plan_uuid (uuid) – UUID of a action.
PATCH /v1/action_plans

Update an existing action plan.

Parameters:
  • action_plan_uuid (uuid) – UUID of a action plan.
  • patch (list(ActionPlanPatchType)) – a json PATCH document to apply to this action plan.
Return type:

ActionPlan

GET /v1/action_plans/detail

Retrieve a list of action_plans with detail.

Parameters:
  • marker (uuid) – pagination marker for large data sets.
  • limit (int) – maximum number of resources to return in a single result.
  • sort_key (unicode) – column to sort results by. Default: id.
  • sort_dir (unicode) – direction to sort. “asc” or “desc”. Default: asc.
  • audit_uuid (uuid) – Optional UUID of an audit, to get only actions for that audit.
  • strategy (unicode) – strategy UUID or name to filter by
Return type:

ActionPlanCollection

type ActionPlanCollection

API representation of a collection of action_plans.

Data samples:

Json
{
    "action_plans": [
        {
            "audit_uuid": "abcee106-14d3-4515-b744-5a26885cf6f6",
            "efficacy_indicators": [
                {
                    "description": "Test indicator",
                    "name": "test_indicator",
                    "unit": "%"
                }
            ],
            "links": [
                {
                    "href": "http://localhost:9322/v1/action_plans/9ef4d84c-41e8-4418-9220-ce55be0436af",
                    "rel": "self"
                },
                {
                    "href": "http://localhost:9322/action_plans/9ef4d84c-41e8-4418-9220-ce55be0436af",
                    "rel": "bookmark"
                }
            ],
            "state": "ONGOING",
            "strategy_name": null,
            "strategy_uuid": null,
            "updated_at": "2017-11-15T11:01:05.453217",
            "uuid": "9ef4d84c-41e8-4418-9220-ce55be0436af"
        }
    ]
}
action_plans
Type:list(ActionPlan)

A list containing action_plans objects

type ActionPlan

API representation of a action plan.

This class enforces type checking and value constraints, and converts between the internal object model and the API representation of an action plan.

Data samples:

Json
{
    "audit_uuid": "abcee106-14d3-4515-b744-5a26885cf6f6",
    "created_at": "2017-11-15T11:01:05.466879",
    "deleted_at": null,
    "efficacy_indicators": [
        {
            "description": "Test indicator",
            "name": "test_indicator",
            "unit": "%"
        }
    ],
    "links": [
        {
            "href": "http://localhost:9322/v1/action_plans/9ef4d84c-41e8-4418-9220-ce55be0436af",
            "rel": "self"
        },
        {
            "href": "http://localhost:9322/action_plans/9ef4d84c-41e8-4418-9220-ce55be0436af",
            "rel": "bookmark"
        }
    ],
    "state": "ONGOING",
    "strategy_name": null,
    "strategy_uuid": null,
    "updated_at": "2017-11-15T11:01:05.466881",
    "uuid": "9ef4d84c-41e8-4418-9220-ce55be0436af"
}
audit_uuid
Type:uuid

The UUID of the audit this port belongs to

efficacy_indicators
Type:json

The list of efficacy indicators associated to this action plan

global_efficacy
Type:json

The global efficacy of this action plan

Type:list(Link)

A list containing a self link and associated action links

state
Type:unicode

This action plan state

strategy_name
Type:unicode

The name of the strategy this action plan refers to

strategy_uuid
Type:unicode

Strategy UUID the action plan refers to

uuid
Type:uuid

Unique UUID for this action plan

Actions

GET /v1/actions

Retrieve a list of actions.

Parameters:
  • marker (uuid) – pagination marker for large data sets.
  • limit (int) – maximum number of resources to return in a single result.
  • sort_key (unicode) – column to sort results by. Default: id.
  • sort_dir (unicode) – direction to sort. “asc” or “desc”. Default: asc.
  • action_plan_uuid (uuid) – Optional UUID of an action plan, to get only actions for that action plan.
  • audit_uuid (uuid) – Optional UUID of an audit, to get only actions for that audit.
Return type:

ActionCollection

GET /v1/actions/(action_uuid)

Retrieve information about the given action.

Parameters:
  • action_uuid (uuid) – UUID of a action.
Return type:

Action

POST /v1/actions

Create a new action.

Parameters:
  • action (Action) – a action within the request body.
Return type:

Action

DELETE /v1/actions

Delete a action.

Parameters:
  • action_uuid (uuid) – UUID of a action.
PATCH /v1/actions

Update an existing action.

Parameters:
  • action_uuid (uuid) – UUID of a action.
  • patch (list(ActionPatchType)) – a json PATCH document to apply to this action.
Return type:

Action

GET /v1/actions/detail

Retrieve a list of actions with detail.

Parameters:
  • marker (uuid) – pagination marker for large data sets.
  • limit (int) – maximum number of resources to return in a single result.
  • sort_key (unicode) – column to sort results by. Default: id.
  • sort_dir (unicode) – direction to sort. “asc” or “desc”. Default: asc.
  • action_plan_uuid (uuid) – Optional UUID of an action plan, to get only actions for that action plan.
  • audit_uuid (uuid) – Optional UUID of an audit, to get only actions for that audit.
Return type:

ActionCollection

type ActionCollection

API representation of a collection of actions.

Data samples:

Json
{
    "actions": [
        {
            "action_plan_uuid": "7ae81bb3-dec3-4289-8d6c-da80bd8001ae",
            "links": [
                {
                    "href": "http://localhost:9322/v1/actions/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
                    "rel": "self"
                },
                {
                    "href": "http://localhost:9322/actions/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
                    "rel": "bookmark"
                }
            ],
            "parents": [],
            "state": "PENDING",
            "uuid": "27e3153e-d5bf-4b7e-b517-fb518e17f34c"
        }
    ]
}
actions
Type:list(Action)

A list containing actions objects

type Action

API representation of a action.

This class enforces type checking and value constraints, and converts between the internal object model and the API representation of a action.

Data samples:

Json
{
    "action_plan_uuid": "7ae81bb3-dec3-4289-8d6c-da80bd8001ae",
    "created_at": "2017-11-15T11:01:05.637719",
    "deleted_at": null,
    "links": [
        {
            "href": "http://localhost:9322/v1/actions/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
            "rel": "self"
        },
        {
            "href": "http://localhost:9322/actions/27e3153e-d5bf-4b7e-b517-fb518e17f34c",
            "rel": "bookmark"
        }
    ],
    "parents": [],
    "state": "PENDING",
    "updated_at": "2017-11-15T11:01:05.637722",
    "uuid": "27e3153e-d5bf-4b7e-b517-fb518e17f34c"
}
action_plan_uuid
Type:uuid

The action plan this action belongs to

action_type
Type:unicode

Action type

description
Type:unicode

Action description

input_parameters
Type:json

One or more key/value pairs

Type:list(Link)

A list containing a self link and associated action links

parents
Type:json

UUIDs of parent actions

state
Type:unicode

This audit state

uuid
Type:uuid

Unique UUID for this action

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.