diff options
Diffstat (limited to 'openapi')
-rw-r--r-- | openapi/components.yml | 79 | ||||
-rw-r--r-- | openapi/openapi.yml | 40 |
2 files changed, 97 insertions, 22 deletions
diff --git a/openapi/components.yml b/openapi/components.yml index 2bddd8b9..b32130b9 100644 --- a/openapi/components.yml +++ b/openapi/components.yml @@ -49,6 +49,53 @@ components: cmHandleProperties: $ref: '#/components/schemas/cmHandleProperties' + ResourceBatchDataRequest: + type: array + items: + type: object + title: 'ResourceBatchRequest' + properties: + operation: + type: string + example: 'read' + operationId: + description: 'it is recommended that the operationId is unique within the scope of the request' + type: string + example: '12' + datastore: + type: string + example: 'ncmp-datastore:passthrough-operational' + options: + type: string + example: 'some option' + resourceIdentifier: + type: string + example: 'some resource identifier' + cmHandles: + type: array + items: + $ref: '#/components/schemas/cmHandle' + required: + - operation + - operationId + - datastore + - cmHandles + + cmHandle: + type: object + title: 'cmHandle' + properties: + id: + type: string + cmHandleProperties: + additionalProperties: + type: string + example: + id: cmHandle123 + cmHandleProperties: + myProp: some value + otherProp: other value + ModuleResourcesReadRequest: type: object properties: @@ -134,6 +181,7 @@ components: NoContent: description: No Content content: {} + BadRequest: description: Bad Request content: @@ -144,6 +192,7 @@ components: status: 400 message: Bad Request details: The provided request is not valid + NotFound: description: The specified resource was not found content: @@ -154,6 +203,7 @@ components: status: 404 message: Resource Not Found details: The requested resource is not found + ServerError: description: Internal Server Error content: @@ -164,6 +214,7 @@ components: status: 500 message: Internal Server Error details: Internal Server Error occured + NotImplemented: description: Not Implemented content: @@ -174,6 +225,7 @@ components: status: 501 message: Not Implemented details: Method Not Implemented + parameters: cmHandleInPath: name: cmHandle @@ -212,6 +264,7 @@ components: sample3: value: options: (key1=10,key2=value2,key3=val31,val32) + topicParamInQuery: name: topic in: query @@ -223,6 +276,32 @@ components: examples: sample1: value: my-topic-name + + requiredTopicParamInQuery: + name: topic + in: query + description: mandatory topic name passed from client(NCMP). + required: true + schema: + type: string + allowReserved: true + examples: + sample1: + value: + topic: my-topic-name + + requiredRequestIdParamInQuery: + name: requestId + in: query + description: request Id generated by NCMP and sent as an acknowledgement for the client request the same including here. + required: true + schema: + type: string + allowReserved: true + examples: + sample1: + value: 4753fc1f-7de2-449a-b306-a6204b5370b3 + datastoreName: name: datastore-name in: path diff --git a/openapi/openapi.yml b/openapi/openapi.yml index 24854e9c..4bca4108 100644 --- a/openapi/openapi.yml +++ b/openapi/openapi.yml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2021 Nordix Foundation +# Copyright (C) 2021-2023 Nordix Foundation # Modifications Copyright (C) 2022 Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -150,32 +150,28 @@ paths: '500': $ref: 'components.yml#/components/responses/ServerError' - /v1/ch/batch/data/ds/{datastore-name}: + /v1/data: post: tags: - dmi-plugin - summary: Get a collection of CMHandles - description: Get a collection of cm handles by datastore (not implemented) - operationId: getResourceDataByCmHandles + summary: Get resource data for batch of cm handle ids. + description: Get resource data for batch of cm handle ids by supplied operation details + operationId: getResourceDataForCmHandleBatch parameters: - - $ref: 'components.yml#/components/parameters/datastoreName' - - $ref: 'components.yml#/components/parameters/topicParamInQuery' + - $ref: 'components.yml#/components/parameters/requiredTopicParamInQuery' + - $ref: 'components.yml#/components/parameters/requiredRequestIdParamInQuery' requestBody: - description: Contains collection of cm handles with it's private properties and requestId - content: - application/json: - schema: - type: object - responses: - '200': - description: OK + description: list of operation details content: application/json: schema: - type: object - '400': - $ref: 'components.yml#/components/responses/BadRequest' - '500': - $ref: 'components.yml#/components/responses/ServerError' - '501': - $ref: 'components.yml#/components/responses/NotImplemented'
\ No newline at end of file + $ref: 'components.yml#/components/schemas/ResourceBatchDataRequest' + responses: + '202': + description: Accepted + '400': + $ref: 'components.yml#/components/responses/BadRequest' + '500': + $ref: 'components.yml#/components/responses/ServerError' + '501': + $ref: 'components.yml#/components/responses/NotImplemented'
\ No newline at end of file |