openapi: 3.0.1
info:
- title: Api Documentation
- description: Api Documentation
- termsOfService: urn:tos
- contact: {}
+ title: Policy Framework Lifecycle API
+ description: The Policy Fraemwork API allows the lifecycle of policy types and policyes to be managed
+ contact:
+ name: ONAP Support
+ url: https://lists.onap.org/g/onap-discuss
+ email: onap-discuss@lists.onap.org
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0
- version: "1.0"
+ version: '1.0'
+externalDocs:
+ description: Policy Framework Documentation
+ url: https://docs.onap.org/projects/onap-policy-parent/en/latest
servers:
- url: //localhost:30440/
tags:
-- name: policy-api-rest-controller
- description: Api Rest Controller
+- name: "Tosca Node Template Design"
+ description:
+ Tosca Node template Design API is publicly exposed for clients to Create/Read/Update/Delete
+ node templates which can be recognized and executable by incorporated policy engines. It is an
+ independent component running rest service that takes all node templates design API calls
+ from clients and then assign them to different API working functions.
+- name: "Policy Design"
+ description:
+ Policy Design API is publicly exposed for clients to Create/Read/Update/Delete
+ policy types, policy type implementation and policies which can be recognized
+ and executable by incorporated policy engines. It is an
+ independent component running rest service that takes all policy design API calls
+ from clients and then assign them to different API working functions. Besides
+ that, API is also exposed for clients to retrieve healthcheck status of this API
+ rest service and the statistics report including the counters of API invocation.
paths:
- /policy/api/v1/healthcheck:
+ /healthcheck:
get:
tags:
- - HealthCheck
+ - "Policy Design"
summary: Perform a system healthcheck
description: Returns healthy status of the Policy API component
operationId: getHealthCheck
x-interface info:
api-version: 1.0.0
last-mod-release: Dublin
- /policy/api/v1/nodetemplates:
+ /nodetemplates:
get:
tags:
- - NodeTemplates
+ - "Tosca Node Template Design"
summary: Retrieve all the available tosca node templates
description: Returns all the node templates from the service template
operationId: getAllNodeTemplates
last-mod-release: Jakarta
put:
tags:
- - NodeTemplates
+ - "Tosca Node Template Design"
summary: Updates one or more new node templates
description: Client should provide TOSCA body of the updated node templates in an instance of
[ToscaServiceTemplate](https://github.com/onap/policy-models/blob/master/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java)
content:
application/json:
schema:
- type: array
- items:
- $ref: '#/components/schemas/ToscaNodeTemplate'
+ $ref: '#/components/schemas/ToscaServiceTemplate'
application/yaml:
schema:
- type: array
- items:
- $ref: '#/components/schemas/ToscaNodeTemplate'
+ $ref: '#/components/schemas/ToscaServiceTemplate'
required: true
responses:
200:
x-codegen-request-body-name: body
post:
tags:
- - NodeTemplates
+ - "Tosca Node Template Design"
summary: Create one or more new node templates
description: Client should provide TOSCA body of the new node templates
operationId: createToscaNodeTemplates
api-version: 1.0.0
last-mod-release: Jakarta
x-codegen-request-body-name: body
- /policy/api/v1/nodetemplates/{name}/versions/{version}:
+ /nodetemplates/{name}/versions/{version}:
get:
tags:
- - NodeTemplates
+ - "Tosca Node Template Design"
summary: Retrieve one version of a tosca node template
description: Returns a particular version of a node template
operationId: getSpecificVersionOfNodeTemplate
last-mod-release: Jakarta
delete:
tags:
- - NodeTemplates
+ - "Tosca Node Template Design"
summary: Updates one or more new node templates
description: Client should provide TOSCA body of the updated node templates
operationId: deleteToscaNodeTemplates
x-interface info:
api-version: 1.0.0
last-mod-release: Jakarta
- /policy/api/v1/policies:
+ /policies:
get:
tags:
- - PolicyInstances
+ - "Policy Design"
summary: Retrieve all versions of available policies
description: Returns all version of available policies
operationId: getPolicies
description: Fetch mode for policies, BARE for bare policies (default), REFERENCED
for fully referenced policies
schema:
- type: string
- default: BARE
- enum:
- - BARE
- - REFERENCED
+ $ref: '#/components/schemas/PolicyFetchMode'
- name: X-ONAP-RequestID
in: header
description: RequestID for http transaction
last-mod-release: Guilin
post:
tags:
- - PolicyInstances
+ - "Policy Design"
summary: Create one or more new policies
description: Client should provide TOSCA body of the new polic(ies)
operationId: createPolicies
api-version: 1.0.0
last-mod-release: El Alto
x-codegen-request-body-name: body
- /policy/api/v1/policies/{policyId}/versions/{policyVersion}:
+ /policies/{policyId}/versions/{policyVersion}:
get:
tags:
- - PolicyInstances
+ - "Policy Design"
summary: Retrieve specific version of a specified policy
description: Returns a particular version of specified policy
operationId: getSpecificPolicy
description: Fetch mode for policies, BARE for bare policies (default), REFERENCED
for fully referenced policies
schema:
- type: string
- default: BARE
- enum:
- - BARE
- - REFERENCED
+ $ref: '#/components/schemas/PolicyFetchMode'
- name: policyId
in: path
description: Name of policy
last-mod-release: Guilin
delete:
tags:
- - PolicyInstances
+ - "Policy Design"
summary: Delete a particular version of a policy
description: 'Rule: the version that has been deployed in PDP group(s) cannot
be deleted'
x-interface info:
api-version: 1.0.0
last-mod-release: Guilin
- /policy/api/v1/policytypes:
+ /policytypes:
get:
tags:
- - PolicyTypes
+ - "Policy Design"
summary: Retrieve existing policy types
description: Returns a list of existing policy types stored in Policy Framework
operationId: getAllPolicyTypes
last-mod-release: Dublin
post:
tags:
- - PolicyTypes
+ - "Policy Design"
summary: Create a new policy type
description: Client should provide TOSCA body of the new policy type
operationId: createPolicyType
api-version: 1.0.0
last-mod-release: Dublin
x-codegen-request-body-name: body
- /policy/api/v1/policytypes/{policyTypeId}:
+ /policytypes/{policyTypeId}:
get:
tags:
- - PolicyTypes
+ - "Policy Design"
summary: Retrieve all available versions of a policy type
description: Returns a list of all available versions for the specified policy
type
x-interface info:
api-version: 1.0.0
last-mod-release: Dublin
- /policy/api/v1/policytypes/{policyTypeId}/versions/latest:
+ /policytypes/{policyTypeId}/versions/latest:
get:
tags:
- - PolicyTypes
+ - "Policy Design"
summary: Retrieve latest version of a policy type
description: Returns latest version for the specified policy type
operationId: getLatestVersionOfPolicyType
x-interface info:
api-version: 1.0.0
last-mod-release: Dublin
- /policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies:
+ /policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies:
get:
tags:
- - PolicyInstances
+ - "Policy Design"
summary: Retrieve all versions of a policy created for a particular policy type
version
description: Returns a list of all versions of specified policy created for
description: Fetch mode for policies, BARE for bare policies (default), REFERENCED
for fully referenced policies
schema:
- type: string
- default: BARE
- enum:
- - BARE
- - REFERENCED
+ $ref: '#/components/schemas/PolicyFetchMode'
- name: policyTypeId
in: path
description: ID of policy type
last-mod-release: Dublin
post:
tags:
- - PolicyInstances
+ - "Policy Design"
summary: Create a new policy for a policy type version
description: Client should provide TOSCA body of the new policy
operationId: createPolicy
api-version: 1.0.0
last-mod-release: Dublin
x-codegen-request-body-name: body
- /policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}:
+ /policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}:
get:
tags:
- - PolicyInstances
+ - "Policy Design"
summary: Retrieve all version details of a policy created for a particular policy
type version
description: Returns a list of all version details of the specified policy
description: Fetch mode for policies, BARE for bare policies (default), REFERENCED
for fully referenced policies
schema:
- type: string
- default: BARE
- enum:
- - BARE
- - REFERENCED
+ $ref: '#/components/schemas/PolicyFetchMode'
- name: policyId
in: path
description: ID of policy
x-interface info:
api-version: 1.0.0
last-mod-release: Dublin
- /policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/latest:
+ /policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/latest:
get:
tags:
- - PolicyInstances
+ - "Policy Design"
summary: Retrieve the latest version of a particular policy
description: Returns the latest version of specified policy
operationId: getLatestVersionOfPolicy
description: Fetch mode for policies, TERSE for bare policies (default), REFERENCED
for fully referenced policies
schema:
- type: string
- default: BARE
- enum:
- - BARE
- - REFERENCED
+ $ref: '#/components/schemas/PolicyFetchMode'
- name: policyId
in: path
description: ID of policy
x-interface info:
api-version: 1.0.0
last-mod-release: Dublin
- /policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/{policyVersion}:
+ /policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/{policyVersion}:
get:
tags:
- - PolicyInstances
+ - "Policy Design"
summary: Retrieve one version of a policy created for a particular policy type
version
description: Returns a particular version of specified policy created for the
description: Fetch mode for policies, BARE for bare policies (default), REFERENCED
for fully referenced policies
schema:
- type: string
- default: BARE
- enum:
- - BARE
- - REFERENCED
+ $ref: '#/components/schemas/PolicyFetchMode'
- name: policyId
in: path
description: ID of policy
last-mod-release: Dublin
delete:
tags:
- - PolicyInstances
+ - "Policy Design"
summary: Delete a particular version of a policy
description: 'Rule: the version that has been deployed in PDP group(s) cannot
be deleted'
operationId: deleteSpecificVersionOfPolicy
parameters:
- - name: policyId
- in: path
- description: ID of policy
- required: true
- schema:
- type: string
- name: policyTypeId
in: path
description: PolicyType ID
required: true
schema:
type: string
+ - name: policyId
+ in: path
+ description: ID of policy
+ required: true
+ schema:
+ type: string
- name: policyVersion
in: path
description: Version of policy
x-interface info:
api-version: 1.0.0
last-mod-release: Dublin
- /policy/api/v1/policytypes/{policyTypeId}/versions/{versionId}:
+ /policytypes/{policyTypeId}/versions/{versionId}:
get:
tags:
- - PolicyTypes
+ - "Policy Design"
summary: Retrieve one particular version of a policy type
description: Returns a particular version for the specified policy type
operationId: getSpecificVersionOfPolicyType
last-mod-release: Dublin
delete:
tags:
- - PolicyTypes
+ - "Policy Design"
summary: Delete one version of a policy type
description: 'Rule 1: pre-defined policy types cannot be deleted;Rule 2: policy
types that are in use (parameterized by a TOSCA policy) cannot be deleted.The
x-interface info:
api-version: 1.0.0
last-mod-release: Dublin
- /policy/api/v1/statistics:
+ /statistics:
get:
tags:
- - Statistics
+ - "Policy Design"
summary: Retrieve current statistics
description: Returns current statistics including the counters of API invocation
operationId: getStatistics
StatisticsReport:
title: StatisticsReport
type: object
+ PolicyFetchMode:
+ title: PolicyFetchMode
+ type: object
\ No newline at end of file