diff options
Diffstat (limited to 'main/src/main/resources/openapi/openapi.yaml')
-rw-r--r-- | main/src/main/resources/openapi/openapi.yaml | 1089 |
1 files changed, 1089 insertions, 0 deletions
diff --git a/main/src/main/resources/openapi/openapi.yaml b/main/src/main/resources/openapi/openapi.yaml new file mode 100644 index 00000000..3d6ffaa1 --- /dev/null +++ b/main/src/main/resources/openapi/openapi.yaml @@ -0,0 +1,1089 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2023 Nordix Foundation +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= +openapi: 3.0.3 +info: + title: "Policy Xacml PDP Documentation" + description: Policy Xacml PDP Service + version: Swagger Server + x-component: Policy Framework + x-planned-retirement-date: tbd +servers: +- url: http://policy-xacml-pdp:6969/policy/pdpx/v1 +- url: https://policy-xacml-pdp:6969/policy/pdpx/v1 +tags: +- name: Decision +- name: Statistics +- name: HealthCheck +paths: + /decision: + post: + tags: + - Decision + summary: Fetch the decision using specified decision parameters + description: Returns the policy decision from Policy Xacml PDP + operationId: decision + parameters: + - name: X-ONAP-RequestID + in: header + description: RequestID for http transaction + schema: + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DecisionRequest' + application/yaml: + schema: + $ref: '#/components/schemas/DecisionRequest' + required: false + responses: + 200: + description: successful operation + headers: + X-LatestVersion: + description: Used only to communicate an API's latest version + schema: + type: string + X-PatchVersion: + description: Used only to communicate a PATCH version in a response + for troubleshooting purposes only, and will not be provided by the + client on request + schema: + type: string + X-MinorVersion: + description: Used to request or communicate a MINOR version back from + the client to the server, and from the server back to the client + schema: + type: string + X-ONAP-RequestID: + description: Used to track REST transactions for logging purpose + schema: + type: string + format: uuid + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + application/yaml: + schema: + $ref: '#/components/schemas/Response' + 400: + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + application/yaml: + schema: + $ref: '#/components/schemas/ErrorResponse' + 401: + description: Authentication Error + content: {} + 403: + description: Authorization Error + content: {} + 500: + description: Internal Server Error + content: {} + security: + - basicAuth: [] + x-interface info: + last-mod-release: Dublin + pdpx-version: 1.0.0 + x-codegen-request-body-name: body + /xacml: + post: + tags: + - Decision + summary: Fetch the decision using specified decision parameters + description: Returns the policy decision from Policy Xacml PDP + operationId: xacml + parameters: + - name: X-ONAP-RequestID + in: header + description: RequestID for http transaction + schema: + type: string + format: uuid + requestBody: + content: + application/xacml+json: + schema: + $ref: '#/components/schemas/Request' + application/xacml+xml: + schema: + $ref: '#/components/schemas/Request' + required: false + responses: + 200: + description: successful operation + headers: + X-LatestVersion: + description: Used only to communicate an API's latest version + schema: + type: string + X-PatchVersion: + description: Used only to communicate a PATCH version in a response + for troubleshooting purposes only, and will not be provided by the + client on request + schema: + type: string + X-MinorVersion: + description: Used to request or communicate a MINOR version back from + the client to the server, and from the server back to the client + schema: + type: string + X-ONAP-RequestID: + description: Used to track REST transactions for logging purpose + schema: + type: string + format: uuid + content: + application/xacml+json: + schema: + $ref: '#/components/schemas/Response' + application/xacml+xml: + schema: + $ref: '#/components/schemas/Response' + 400: + description: Bad Request + content: + application/xacml+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + application/xacml+xml: + schema: + $ref: '#/components/schemas/ErrorResponse' + 401: + description: Authentication Error + content: {} + 403: + description: Authorization Error + content: {} + 500: + description: Internal Server Error + content: {} + security: + - basicAuth: [] + x-interface info: + last-mod-release: Frankfurt + pdpx-version: 1.0.0 + x-codegen-request-body-name: body + /statistics: + get: + tags: + - Statistics + summary: Fetch current statistics + description: Provides current statistics of the Policy Xacml PDP component + operationId: statistics + parameters: + - name: X-ONAP-RequestID + in: header + description: RequestID for http transaction + schema: + type: string + format: uuid + responses: + 200: + description: successful operation + headers: + X-LatestVersion: + description: Used only to communicate an API's latest version + schema: + type: string + X-PatchVersion: + description: Used only to communicate a PATCH version in a response + for troubleshooting purposes only, and will not be provided by the + client on request + schema: + type: string + X-MinorVersion: + description: Used to request or communicate a MINOR version back from + the client to the server, and from the server back to the client + schema: + type: string + X-ONAP-RequestID: + description: Used to track REST transactions for logging purpose + schema: + type: string + format: uuid + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + application/yaml: + schema: + $ref: '#/components/schemas/Response' + 401: + description: Authentication Error + content: {} + 403: + description: Authorization Error + content: {} + 500: + description: Internal Server Error + content: {} + security: + - basicAuth: [] + x-interface info: + last-mod-release: Dublin + pdpx-version: 1.0.0 + /healthcheck: + get: + tags: + - HealthCheck + summary: Perform a system healthcheck + description: Provides healthy status of the Policy Xacml PDP component + operationId: healthcheck + parameters: + - name: X-ONAP-RequestID + in: header + description: RequestID for http transaction + schema: + type: string + format: uuid + responses: + 200: + description: successful operation + headers: + X-LatestVersion: + description: Used only to communicate an API's latest version + schema: + type: string + X-PatchVersion: + description: Used only to communicate a PATCH version in a response + for troubleshooting purposes only, and will not be provided by the + client on request + schema: + type: string + X-MinorVersion: + description: Used to request or communicate a MINOR version back from + the client to the server, and from the server back to the client + schema: + type: string + X-ONAP-RequestID: + description: Used to track REST transactions for logging purpose + schema: + type: string + format: uuid + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + application/yaml: + schema: + $ref: '#/components/schemas/Response' + 401: + description: Authentication Error + content: {} + 403: + description: Authorization Error + content: {} + 500: + description: Internal Server Error + content: {} + security: + - basicAuth: [] + x-interface info: + last-mod-release: Dublin + pdpx-version: 1.0.0 +components: + schemas: + DecisionResponse: + type: object + properties: + status: + type: string + message: + type: string + advice: + type: object + additionalProperties: + type: object + properties: {} + obligations: + type: object + additionalProperties: + type: object + properties: {} + policies: + type: object + additionalProperties: + type: object + properties: {} + attributes: + type: object + additionalProperties: + type: object + properties: {} + ErrorResponse: + type: object + properties: + responseCode: + type: string + enum: + - OK + - CREATED + - ACCEPTED + - NO_CONTENT + - RESET_CONTENT + - PARTIAL_CONTENT + - MOVED_PERMANENTLY + - FOUND + - SEE_OTHER + - NOT_MODIFIED + - USE_PROXY + - TEMPORARY_REDIRECT + - BAD_REQUEST + - UNAUTHORIZED + - PAYMENT_REQUIRED + - FORBIDDEN + - NOT_FOUND + - METHOD_NOT_ALLOWED + - NOT_ACCEPTABLE + - PROXY_AUTHENTICATION_REQUIRED + - REQUEST_TIMEOUT + - CONFLICT + - GONE + - LENGTH_REQUIRED + - PRECONDITION_FAILED + - REQUEST_ENTITY_TOO_LARGE + - REQUEST_URI_TOO_LONG + - UNSUPPORTED_MEDIA_TYPE + - REQUESTED_RANGE_NOT_SATISFIABLE + - EXPECTATION_FAILED + - PRECONDITION_REQUIRED + - TOO_MANY_REQUESTS + - REQUEST_HEADER_FIELDS_TOO_LARGE + - INTERNAL_SERVER_ERROR + - NOT_IMPLEMENTED + - BAD_GATEWAY + - SERVICE_UNAVAILABLE + - GATEWAY_TIMEOUT + - HTTP_VERSION_NOT_SUPPORTED + - NETWORK_AUTHENTICATION_REQUIRED + errorMessage: + type: string + errorDetails: + type: array + items: + type: string + warningDetails: + type: array + items: + type: string + DecisionRequest: + type: object + properties: + onapName: + type: string + onapComponent: + type: string + onapInstance: + type: string + requestId: + type: string + context: + type: object + additionalProperties: + type: object + properties: {} + action: + type: string + currentDateTime: + type: string + format: date-time + currentDate: + type: string + format: date + currentTime: + $ref: '#/components/schemas/OffsetTime' + timeZone: + $ref: '#/components/schemas/ZoneOffset' + resource: + type: object + additionalProperties: + type: object + properties: {} + Duration: + type: object + properties: + seconds: + type: integer + format: int64 + nano: + type: integer + format: int32 + negative: + type: boolean + units: + type: array + items: + $ref: '#/components/schemas/TemporalUnit' + zero: + type: boolean + LocalTime: + type: object + properties: + hour: + type: integer + format: int32 + minute: + type: integer + format: int32 + second: + type: integer + format: int32 + nano: + type: integer + format: int32 + OffsetTime: + type: object + properties: + offset: + $ref: '#/components/schemas/ZoneOffset' + nano: + type: integer + format: int32 + hour: + type: integer + format: int32 + minute: + type: integer + format: int32 + second: + type: integer + format: int32 + TemporalUnit: + type: object + properties: + durationEstimated: + type: boolean + dateBased: + type: boolean + timeBased: + type: boolean + duration: + $ref: '#/components/schemas/Duration' + ZoneOffset: + type: object + properties: + totalSeconds: + type: integer + format: int32 + id: + type: string + rules: + $ref: '#/components/schemas/ZoneRules' + ZoneOffsetTransition: + type: object + properties: + offsetBefore: + $ref: '#/components/schemas/ZoneOffset' + offsetAfter: + $ref: '#/components/schemas/ZoneOffset' + gap: + type: boolean + overlap: + type: boolean + dateTimeAfter: + type: string + format: date-time + dateTimeBefore: + type: string + format: date-time + instant: + type: integer + format: int64 + duration: + $ref: '#/components/schemas/Duration' + ZoneOffsetTransitionRule: + type: object + properties: + month: + type: string + enum: + - JANUARY + - FEBRUARY + - MARCH + - APRIL + - MAY + - JUNE + - JULY + - AUGUST + - SEPTEMBER + - OCTOBER + - NOVEMBER + - DECEMBER + timeDefinition: + type: string + enum: + - UTC + - WALL + - STANDARD + standardOffset: + $ref: '#/components/schemas/ZoneOffset' + offsetBefore: + $ref: '#/components/schemas/ZoneOffset' + offsetAfter: + $ref: '#/components/schemas/ZoneOffset' + dayOfWeek: + type: string + enum: + - MONDAY + - TUESDAY + - WEDNESDAY + - THURSDAY + - FRIDAY + - SATURDAY + - SUNDAY + dayOfMonthIndicator: + type: integer + format: int32 + localTime: + $ref: '#/components/schemas/LocalTime' + midnightEndOfDay: + type: boolean + ZoneRules: + type: object + properties: + fixedOffset: + type: boolean + transitions: + type: array + items: + $ref: '#/components/schemas/ZoneOffsetTransition' + transitionRules: + type: array + items: + $ref: '#/components/schemas/ZoneOffsetTransitionRule' + Advice: + type: object + properties: + attributeAssignments: + type: array + items: + $ref: '#/components/schemas/AttributeAssignment' + id: + $ref: '#/components/schemas/Identifier' + Attribute: + type: object + properties: + issuer: + type: string + includeInResults: + type: boolean + values: + type: array + items: + $ref: '#/components/schemas/AttributeValueObject' + attributeId: + $ref: '#/components/schemas/Identifier' + category: + $ref: '#/components/schemas/Identifier' + AttributeAssignment: + type: object + properties: + attributeValue: + $ref: '#/components/schemas/AttributeValueObject' + issuer: + type: string + dataTypeId: + $ref: '#/components/schemas/Identifier' + attributeId: + $ref: '#/components/schemas/Identifier' + category: + $ref: '#/components/schemas/Identifier' + AttributeCategory: + type: object + properties: + category: + $ref: '#/components/schemas/Identifier' + attributes: + type: array + items: + $ref: '#/components/schemas/Attribute' + AttributeValue: + type: object + properties: + dataTypeId: + $ref: '#/components/schemas/Identifier' + xpathCategory: + $ref: '#/components/schemas/Identifier' + value: + type: object + properties: {} + AttributeValueObject: + type: object + properties: + dataTypeId: + $ref: '#/components/schemas/Identifier' + xpathCategory: + $ref: '#/components/schemas/Identifier' + value: + type: object + properties: {} + IdReference: + type: object + properties: + version: + $ref: '#/components/schemas/Version' + id: + $ref: '#/components/schemas/Identifier' + Identifier: + type: object + properties: + uri: + type: string + format: uri + MissingAttributeDetail: + type: object + properties: + issuer: + type: string + dataTypeId: + $ref: '#/components/schemas/Identifier' + attributeValues: + type: array + items: + $ref: '#/components/schemas/AttributeValueObject' + attributeId: + $ref: '#/components/schemas/Identifier' + category: + $ref: '#/components/schemas/Identifier' + Obligation: + type: object + properties: + attributeAssignments: + type: array + items: + $ref: '#/components/schemas/AttributeAssignment' + id: + $ref: '#/components/schemas/Identifier' + Response: + type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/Result' + Result: + type: object + properties: + status: + $ref: '#/components/schemas/Status' + decision: + type: string + enum: + - PERMIT + - DENY + - INDETERMINATE + - INDETERMINATE_PERMIT + - INDETERMINATE_DENY + - INDETERMINATE_DENYPERMIT + - NOTAPPLICABLE + obligations: + type: array + items: + $ref: '#/components/schemas/Obligation' + associatedAdvice: + type: array + items: + $ref: '#/components/schemas/Advice' + policyIdentifiers: + type: array + items: + $ref: '#/components/schemas/IdReference' + policySetIdentifiers: + type: array + items: + $ref: '#/components/schemas/IdReference' + attributes: + type: array + items: + $ref: '#/components/schemas/AttributeCategory' + Status: + type: object + properties: + statusCode: + $ref: '#/components/schemas/StatusCode' + statusMessage: + type: string + statusDetail: + $ref: '#/components/schemas/StatusDetail' + ok: + type: boolean + StatusCode: + type: object + properties: + statusCodeValue: + $ref: '#/components/schemas/Identifier' + child: + $ref: '#/components/schemas/StatusCode' + StatusDetail: + type: object + properties: + missingAttributeDetails: + type: array + items: + $ref: '#/components/schemas/MissingAttributeDetail' + Version: + type: object + properties: + version: + type: string + versionDigits: + type: array + items: + type: integer + format: int32 + DOMConfiguration: + type: object + properties: + parameterNames: + $ref: '#/components/schemas/DOMStringList' + DOMImplementation: + type: object + DOMStringList: + type: object + properties: + length: + type: integer + format: int32 + Document: + type: object + properties: + doctype: + $ref: '#/components/schemas/DocumentType' + inputEncoding: + type: string + xmlEncoding: + type: string + xmlStandalone: + type: boolean + xmlVersion: + type: string + strictErrorChecking: + type: boolean + documentURI: + type: string + domConfig: + $ref: '#/components/schemas/DOMConfiguration' + implementation: + $ref: '#/components/schemas/DOMImplementation' + documentElement: + $ref: '#/components/schemas/Element' + nodeName: + type: string + nodeValue: + type: string + firstChild: + $ref: '#/components/schemas/Node' + previousSibling: + $ref: '#/components/schemas/Node' + ownerDocument: + $ref: '#/components/schemas/Document' + prefix: + type: string + baseURI: + type: string + textContent: + type: string + localName: + type: string + childNodes: + $ref: '#/components/schemas/NodeList' + nodeType: + type: integer + format: int32 + nextSibling: + $ref: '#/components/schemas/Node' + parentNode: + $ref: '#/components/schemas/Node' + lastChild: + $ref: '#/components/schemas/Node' + namespaceURI: + type: string + attributes: + $ref: '#/components/schemas/NamedNodeMap' + DocumentType: + type: object + properties: + notations: + $ref: '#/components/schemas/NamedNodeMap' + internalSubset: + type: string + publicId: + type: string + systemId: + type: string + entities: + $ref: '#/components/schemas/NamedNodeMap' + name: + type: string + nodeName: + type: string + nodeValue: + type: string + firstChild: + $ref: '#/components/schemas/Node' + previousSibling: + $ref: '#/components/schemas/Node' + ownerDocument: + $ref: '#/components/schemas/Document' + prefix: + type: string + baseURI: + type: string + textContent: + type: string + localName: + type: string + childNodes: + $ref: '#/components/schemas/NodeList' + nodeType: + type: integer + format: int32 + nextSibling: + $ref: '#/components/schemas/Node' + parentNode: + $ref: '#/components/schemas/Node' + lastChild: + $ref: '#/components/schemas/Node' + namespaceURI: + type: string + attributes: + $ref: '#/components/schemas/NamedNodeMap' + Element: + type: object + properties: + schemaTypeInfo: + $ref: '#/components/schemas/TypeInfo' + tagName: + type: string + nodeName: + type: string + nodeValue: + type: string + firstChild: + $ref: '#/components/schemas/Node' + previousSibling: + $ref: '#/components/schemas/Node' + ownerDocument: + $ref: '#/components/schemas/Document' + prefix: + type: string + baseURI: + type: string + textContent: + type: string + localName: + type: string + childNodes: + $ref: '#/components/schemas/NodeList' + nodeType: + type: integer + format: int32 + nextSibling: + $ref: '#/components/schemas/Node' + parentNode: + $ref: '#/components/schemas/Node' + lastChild: + $ref: '#/components/schemas/Node' + namespaceURI: + type: string + attributes: + $ref: '#/components/schemas/NamedNodeMap' + NamedNodeMap: + type: object + properties: + length: + type: integer + format: int32 + Node: + type: object + properties: + nodeName: + type: string + nodeValue: + type: string + firstChild: + $ref: '#/components/schemas/Node' + previousSibling: + $ref: '#/components/schemas/Node' + ownerDocument: + $ref: '#/components/schemas/Document' + prefix: + type: string + baseURI: + type: string + textContent: + type: string + localName: + type: string + childNodes: + $ref: '#/components/schemas/NodeList' + nodeType: + type: integer + format: int32 + nextSibling: + $ref: '#/components/schemas/Node' + parentNode: + $ref: '#/components/schemas/Node' + lastChild: + $ref: '#/components/schemas/Node' + namespaceURI: + type: string + attributes: + $ref: '#/components/schemas/NamedNodeMap' + NodeList: + type: object + properties: + length: + type: integer + format: int32 + Request: + type: object + properties: + requestDefaults: + $ref: '#/components/schemas/RequestDefaults' + returnPolicyIdList: + type: boolean + requestAttributes: + type: array + items: + $ref: '#/components/schemas/RequestAttributes' + multiRequests: + type: array + items: + $ref: '#/components/schemas/RequestReference' + status: + $ref: '#/components/schemas/Status' + requestAttributesIncludedInResult: + type: array + items: + $ref: '#/components/schemas/AttributeCategory' + combinedDecision: + type: boolean + RequestAttributes: + type: object + properties: + contentRoot: + $ref: '#/components/schemas/Node' + xmlId: + type: string + category: + $ref: '#/components/schemas/Identifier' + attributes: + type: array + items: + $ref: '#/components/schemas/Attribute' + RequestAttributesReference: + type: object + properties: + referenceId: + type: string + RequestDefaults: + type: object + properties: + xpathVersion: + type: string + format: uri + RequestReference: + type: object + properties: + attributesReferences: + type: array + items: + $ref: '#/components/schemas/RequestAttributesReference' + TypeInfo: + type: object + properties: + typeNamespace: + type: string + typeName: + type: string + StatisticsReport: + type: object + properties: + code: + type: integer + format: int32 + totalPolicyTypesCount: + type: integer + format: int64 + totalPoliciesCount: + type: integer + format: int64 + totalErrorCount: + type: integer + format: int64 + permitDecisionsCount: + type: integer + format: int64 + denyDecisionsCount: + type: integer + format: int64 + deploySuccessCount: + type: integer + format: int64 + deployFailureCount: + type: integer + format: int64 + undeploySuccessCount: + type: integer + format: int64 + undeployFailureCount: + type: integer + format: int64 + indeterminantDecisionsCount: + type: integer + format: int64 + notApplicableDecisionsCount: + type: integer + format: int64 + applicationMetrics: + type: object + additionalProperties: + type: object + additionalProperties: + type: integer + format: int32 + HealthCheckReport: + type: object + properties: + name: + type: string + url: + type: string + healthy: + type: boolean + code: + type: integer + format: int32 + message: + type: string + HttpServletRequest: + type: object + securitySchemes: + basicAuth: + type: http + description: "" + scheme: basic |