diff options
Diffstat (limited to 'docs/api')
-rw-r--r-- | docs/api/swagger/openapi-datajob.yaml | 427 | ||||
-rw-r--r-- | docs/api/swagger/openapi.yaml | 291 |
2 files changed, 575 insertions, 143 deletions
diff --git a/docs/api/swagger/openapi-datajob.yaml b/docs/api/swagger/openapi-datajob.yaml new file mode 100644 index 00000000..ef435f54 --- /dev/null +++ b/docs/api/swagger/openapi-datajob.yaml @@ -0,0 +1,427 @@ +openapi: 3.0.3 +info: + description: Support datajobs through one or more subjob for each DMI and Data Producer + Identifier combination + title: NCMP Data Subjob API + version: 1.0.0 +servers: +- url: /dmi +tags: +- description: DMI plugin rest apis + name: dmi-datajob +paths: + /v1/cmreadJob: + post: + description: Create a read request + operationId: readDataJob + parameters: + - description: The destination of the results (Kafka topic name or s3 bucket + name) + in: query + name: destination + required: true + schema: + example: some-destination + type: string + style: form + requestBody: + content: + application/3gpp-json-patch+json: + schema: + $ref: '#/components/schemas/SubjobReadRequest' + description: Operation body + responses: + "501": + content: + application/json: + example: + status: 501 + message: Not Implemented + details: Method Not Implemented + schema: + $ref: '#/components/schemas/ErrorMessage' + description: Not Implemented + tags: + - dmi-datajob + /v1/cmwriteJob: + post: + description: Create a write request + operationId: writeDataJob + parameters: + - description: The destination of the results (Kafka topic name or s3 bucket + name) + in: query + name: destination + required: true + schema: + example: some-destination + type: string + style: form + requestBody: + content: + application/3gpp-json-patch+json: + schema: + $ref: '#/components/schemas/SubjobWriteRequest' + description: Operation body + responses: + "501": + content: + application/json: + example: + status: 501 + message: Not Implemented + details: Method Not Implemented + schema: + $ref: '#/components/schemas/ErrorMessage' + description: Not Implemented + tags: + - dmi-datajob + /v1/cmwriteJob/dataProducer/{dataProducerId}/dataProducerJob/{dataProducerJobId}/status: + get: + description: Retrieve the status of a specific data job. + operationId: getDataJobStatus + parameters: + - description: Identifier for the data producer + explode: false + in: path + name: dataProducerId + required: true + schema: + example: some-data-producer-identifier + type: string + style: simple + - description: Identifier for the data producer job + explode: false + in: path + name: dataProducerJobId + required: true + schema: + example: some-producer-job-identifier + type: string + style: simple + responses: + "501": + content: + application/json: + example: + status: 501 + message: Not Implemented + details: Method Not Implemented + schema: + $ref: '#/components/schemas/ErrorMessage' + description: Not Implemented + tags: + - dmi-datajob + /v1/cmwriteJob/dataProducer/{dataProducerId}/dataProducerJob/{dataProducerJobId}/result: + get: + description: Retrieve the result of a data job. + operationId: getDataJobResult + parameters: + - description: Identifier for the data producer + explode: false + in: path + name: dataProducerId + required: true + schema: + example: some-data-producer-identifier + type: string + style: simple + - description: Identifier for the data producer job + explode: false + in: path + name: dataProducerJobId + required: true + schema: + example: some-producer-job-identifier + type: string + style: simple + - description: The destination of the results (Kafka topic name or s3 bucket + name) + in: query + name: destination + required: true + schema: + example: some-destination + type: string + style: form + responses: + "501": + content: + application/json: + example: + status: 501 + message: Not Implemented + details: Method Not Implemented + schema: + $ref: '#/components/schemas/ErrorMessage' + description: Not Implemented + tags: + - dmi-datajob +components: + parameters: + requestIdInPath: + description: Identifier for the overall Datajob + explode: false + in: path + name: requestId + required: true + schema: + example: some-identifier + type: string + style: simple + dataProducerJobIdInPath: + description: Identifier for the data producer job + explode: false + in: path + name: dataProducerJobId + required: true + schema: + example: some-producer-job-identifier + type: string + style: simple + dataProducerIdInPath: + description: Identifier for the data producer + explode: false + in: path + name: dataProducerId + required: true + schema: + example: some-data-producer-identifier + type: string + style: simple + dataProducerIdInQuery: + description: Identifier for the data producer + in: query + name: dataProducerId + required: true + schema: + example: some-data-producer-identifier + type: string + style: form + destinationInQuery: + description: The destination of the results (Kafka topic name or s3 bucket name) + in: query + name: destination + required: true + schema: + example: some-destination + type: string + style: form + responses: + NotImplemented: + content: + application/json: + example: + status: 501 + message: Not Implemented + details: Method Not Implemented + schema: + $ref: '#/components/schemas/ErrorMessage' + description: Not Implemented + schemas: + ErrorMessage: + properties: + status: + type: string + message: + type: string + details: + type: string + title: Error + type: object + SubjobReadRequest: + properties: + dataAcceptType: + description: Defines the data response accept type + example: application/vnd.3gpp.object-tree-hierarchical+json + type: string + dataContentType: + description: Defines the data request content type + example: application/3gpp-json-patch+json + type: string + dataProducerId: + description: ID of the producer registered by DMI for the paths in the operations + in this request + example: my-data-producer-identifier + type: string + data: + example: + op: read + operationId: 1 + path: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003/GNBCUCPFunction=2 + attributes: userLabel + scope: + scopeTyp: BASE_ONLY + items: + $ref: '#/components/schemas/SubjobReadRequest_data_inner' + type: array + required: + - data + - dataProducerId + type: object + SubjobWriteRequest: + properties: + dataAcceptType: + description: Defines the data response accept type + example: application/vnd.3gpp.object-tree-hierarchical+json + type: string + dataContentType: + description: Defines the data request content type + example: application/3gpp-json-patch+json + type: string + dataProducerId: + description: ID of the producer registered by DMI for the paths in the operations + in this request + example: my-data-producer-identifier + type: string + dataJobId: + description: Identifier for the overall Data Job + example: my-data-producer-identifier + type: string + data: + example: + op: add + path: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003/GNBCUCPFunction=1/EUtraNetwork=1/EUtranFrequency=12 + value: + id: 12 + attributes: + userLabel: label12 + items: + $ref: '#/components/schemas/SubjobWriteRequest_data_inner' + type: array + required: + - data + - dataProducerId + type: object + CmHandleProperties: + description: Private properties of the cm handle for the given path + type: object + Resource: + properties: + id: + description: Identifier of the resource object + example: resource-identifier + type: string + attributes: + additionalProperties: + example: "userLabel: label11" + type: string + description: Key value map representing the objects class attributes and + values + type: object + type: object + ActionParameters: + additionalProperties: + type: string + description: The input of the action in the form of key value pairs + type: object + Object: + type: object + SubjobWriteResponse: + properties: + subJobId: + description: Unique identifier for the sub-job + example: my-sub-job-id + type: string + dmiServiceName: + description: Name of the relevant DMI Service + example: my-dmi-service + type: string + dataProducerId: + description: ID of the producer registered by DMI for the paths in the operations + in this request + example: my-data-producer-identifier + type: string + required: + - dataProducerId + - dmiServiceName + - subJobId + type: object + SubjobReadRequest_data_inner: + properties: + path: + description: Defines the resource on which operation is executed + example: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003 + type: string + op: + description: Describes the operation to execute + example: read + type: string + operationId: + description: Unique identifier for the operation within the request + example: "1" + type: string + attributes: + description: This parameter specifies the attributes of the scoped resources + that are returned + items: + example: cellId + type: string + type: array + fields: + description: This parameter specifies the attribute fields of the scoped + resources that are returned + items: + type: string + type: array + filter: + description: This parameter is used to filter the scoped Managed Objects. + Only Managed Objects passing the filter criteria will be fetched + example: NRCellDU/attributes/administrativeState==LOCKED + type: string + scopeType: + description: ScopeType selects MOs depending on relationships with Base + Managed Object + example: BASE_ONLY + type: string + scopeLevel: + description: Only used when the scope type is BASE_NTH_LEVEL to specify + amount of levels to search + example: 0 + type: integer + moduleSetTag: + description: Module set identifier + example: my-module-set-tag + type: string + cmHandleProperties: + description: Private properties of the cm handle for the given path + type: object + required: + - op + - path + type: object + SubjobWriteRequest_data_inner_value: + description: Value dependent on the op specified. Resource for an add. Object + for a replace. ActionParameters for an action. + oneOf: + - $ref: '#/components/schemas/Resource' + - $ref: '#/components/schemas/ActionParameters' + - $ref: '#/components/schemas/Object' + type: object + SubjobWriteRequest_data_inner: + properties: + path: + description: Defines the resource on which operation is executed + example: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003 + type: string + op: + description: Describes the operation to execute + example: add + type: string + operationId: + description: Unique identifier for the operation within the request + example: "1" + type: string + moduleSetTag: + description: Module set identifier + example: my-module-set-tag + type: string + cmHandleProperties: + description: Private properties of the cm handle for the given path + type: object + value: + $ref: '#/components/schemas/SubjobWriteRequest_data_inner_value' + required: + - op + - path + type: object diff --git a/docs/api/swagger/openapi.yaml b/docs/api/swagger/openapi.yaml index 4e3ae897..14c721a3 100644 --- a/docs/api/swagger/openapi.yaml +++ b/docs/api/swagger/openapi.yaml @@ -4,26 +4,26 @@ info: title: NCMP DMI Plugin version: 1.0.0 servers: - - url: /dmi +- url: /dmi tags: - - description: DMI plugin internal rest apis - name: dmi-plugin-internal - - description: DMI plugin rest apis - name: dmi-plugin +- description: DMI plugin internal rest apis + name: dmi-plugin-internal +- description: DMI plugin rest apis + name: dmi-plugin paths: /v1/ch/{cmHandle}/modules: post: description: Get all modules for given cm handle operationId: getModuleReferences parameters: - - description: "The identifier for a network function, network element, subnetwork,\ + - description: "The identifier for a network function, network element, subnetwork,\ \ or any other cm object by managed Network CM Proxy" - in: path - name: cmHandle - required: true - schema: - example: my-cm-handle - type: string + in: path + name: cmHandle + required: true + schema: + example: my-cm-handle + type: string requestBody: content: application/json: @@ -59,20 +59,20 @@ paths: description: Internal Server Error summary: Get all modules for cm handle tags: - - dmi-plugin + - dmi-plugin /v1/ch/{cmHandle}/moduleResources: post: description: Retrieve module resources for one or more modules operationId: retrieveModuleResources parameters: - - description: "The identifier for a network function, network element, subnetwork,\ + - description: "The identifier for a network function, network element, subnetwork,\ \ or any other cm object by managed Network CM Proxy" - in: path - name: cmHandle - required: true - schema: - example: my-cm-handle - type: string + in: path + name: cmHandle + required: true + schema: + example: my-cm-handle + type: string requestBody: content: application/json: @@ -108,7 +108,7 @@ paths: description: Internal Server Error summary: Retrieve module resources tags: - - dmi-plugin + - dmi-plugin /v1/inventory/cmHandles: post: description: register given list of cm handles (internal use only) @@ -150,7 +150,7 @@ paths: description: Internal Server Error summary: register given list of cm handles (internal use only) tags: - - dmi-plugin-internal + - dmi-plugin-internal x-api-audience: component-internal /v1/ch/{cmHandle}/data/ds/{datastore-name}: post: @@ -158,57 +158,54 @@ paths: cm handle operationId: dataAccessPassthrough parameters: - - description: The type of the requested data - in: path - name: datastore-name - required: true - schema: - example: ncmp-datastore:passthrough-operational or ncmp-datastore:passthrough-running - type: string - - description: "The identifier for a network function, network element, subnetwork,\ + - description: The type of the requested data + in: path + name: datastore-name + required: true + schema: + example: ncmp-datastore:passthrough-operational or ncmp-datastore:passthrough-running + type: string + - description: "The identifier for a network function, network element, subnetwork,\ \ or any other cm object by managed Network CM Proxy" - in: path - name: cmHandle - required: true - schema: - example: my-cm-handle - type: string - - allowReserved: true - description: Resource identifier to get/set the resource data - in: query - name: resourceIdentifier - required: true - schema: - example: my-schema:my-node - type: string - - allowReserved: true - description: "options parameter in query, it is mandatory to wrap key(s)=value(s)\ + in: path + name: cmHandle + required: true + schema: + example: my-cm-handle + type: string + - description: Resource identifier to get/set the resource data + in: query + name: resourceIdentifier + required: true + schema: + example: my-schema:my-node + type: string + - description: "options parameter in query, it is mandatory to wrap key(s)=value(s)\ \ in parenthesis'()'." - examples: - sample1: - value: - options: "(key1=value1,key2=value2)" - sample2: - value: - options: "(key1=value1,key2=value1/value2)" - sample3: - value: - options: "(key1=10,key2=value2,key3=val31,val32)" - in: query - name: options - required: false - schema: - type: string - - allowReserved: true - description: topic name passed from client(NCMP). - examples: - sample1: - value: my-topic-name - in: query - name: topic - required: false - schema: - type: string + examples: + sample1: + value: + options: "(key1=value1,key2=value2)" + sample2: + value: + options: "(key1=value1,key2=value1/value2)" + sample3: + value: + options: "(key1=10,key2=value2,key3=val31,val32)" + in: query + name: options + required: false + schema: + type: string + - description: topic name passed from client(NCMP). + examples: + sample1: + value: my-topic-name + in: query + name: topic + required: false + schema: + type: string requestBody: content: application/json: @@ -222,9 +219,9 @@ paths: application/json: schema: example: - - yangSource: my-yang-source - moduleName: my-module-name - revision: my-revision + - yangSource: my-yang-source + moduleName: my-module-name + revision: my-revision type: object description: OK "400": @@ -250,35 +247,33 @@ paths: summary: Get resource data from passthrough operational or running for a cm handle tags: - - dmi-plugin + - dmi-plugin /v1/data: post: description: Execute a data operation for group of cm handle ids by supplied operation details operationId: getResourceDataForCmHandleDataOperation parameters: - - allowReserved: true - description: mandatory topic name passed from client(NCMP). - examples: - sample1: - value: - topic: my-topic-name - in: query - name: topic - required: true - schema: - type: string - - allowReserved: true - description: request Id generated by NCMP and sent as an acknowledgement for - the client request the same including here. - examples: - sample1: - value: 4753fc1f-7de2-449a-b306-a6204b5370b3 - in: query - name: requestId - required: true - schema: - type: string + - description: mandatory topic name passed from client(NCMP). + examples: + sample1: + value: + topic: my-topic-name + in: query + name: topic + required: true + schema: + type: string + - description: request Id generated by NCMP and sent as an acknowledgement for + the client request the same including here. + examples: + sample1: + value: 4753fc1f-7de2-449a-b306-a6204b5370b3 + in: query + name: requestId + required: true + schema: + type: string requestBody: content: application/json: @@ -320,7 +315,7 @@ paths: description: Not Implemented summary: Execute a data operation for group of cm handle ids. tags: - - dmi-plugin + - dmi-plugin components: parameters: cmHandleInPath: @@ -341,7 +336,6 @@ components: example: ncmp-datastore:passthrough-operational or ncmp-datastore:passthrough-running type: string resourceIdentifierInQuery: - allowReserved: true description: Resource identifier to get/set the resource data in: query name: resourceIdentifier @@ -350,7 +344,6 @@ components: example: my-schema:my-node type: string optionsParamInQuery: - allowReserved: true description: "options parameter in query, it is mandatory to wrap key(s)=value(s)\ \ in parenthesis'()'." examples: @@ -369,7 +362,6 @@ components: schema: type: string topicParamInQuery: - allowReserved: true description: topic name passed from client(NCMP). examples: sample1: @@ -380,7 +372,6 @@ components: schema: type: string requiredTopicParamInQuery: - allowReserved: true description: mandatory topic name passed from client(NCMP). examples: sample1: @@ -392,7 +383,6 @@ components: schema: type: string requiredRequestIdParamInQuery: - allowReserved: true description: request Id generated by NCMP and sent as an acknowledgement for the client request the same including here. examples: @@ -469,12 +459,12 @@ components: ModuleSet: example: schemas: - - moduleName: my-module-name - namespace: my-namespace - revision: my-revision - - moduleName: my-module-name - namespace: my-namespace - revision: my-revision + - moduleName: my-module-name + namespace: my-namespace + revision: my-revision + - moduleName: my-module-name + namespace: my-namespace + revision: my-revision properties: schemas: items: @@ -495,13 +485,18 @@ components: example: data: modules: - - name: my-name - revision: my-revision - - name: my-name - revision: my-revision + - name: my-name + revision: my-revision + - name: my-name + revision: my-revision + moduleSetTag: Module-set-tag-1 cmHandleProperties: key: "{\"prop1\":\"value1\",\"prop2\":\"value2\"}" properties: + moduleSetTag: + description: Module set tag of the given cm handle + example: Module-set-tag-1 + type: string data: $ref: '#/components/schemas/ModuleResourcesReadRequest_data' cmHandleProperties: @@ -533,15 +528,15 @@ components: CmHandles: example: cmHandles: - - cmHandleId1 - - cmHandleId2 - - cmHandleId3 + - cmHandleId1 + - cmHandleId2 + - cmHandleId3 properties: cmHandles: example: - - cmHandleId1 - - cmHandleId2 - - cmHandleId3 + - cmHandleId1 + - cmHandleId2 + - cmHandleId3 items: type: string type: array @@ -553,15 +548,16 @@ components: dataType: my-data-type cmHandleProperties: key: "{\"prop1\":\"value1\",\"prop2\":\"value2\"}" + moduleSetTag: module-set-tag1 operation: read properties: operation: enum: - - read - - create - - update - - patch - - delete + - read + - create + - update + - patch + - delete example: read type: string dataType: @@ -579,17 +575,21 @@ components: requestId: example: 3a9ce55c-e365-4dc9-8da3-a06f07cbc6d7 type: string + moduleSetTag: + example: module-set-tag1 + type: string type: object ResourceDataOperationRequests: items: $ref: '#/components/schemas/DataOperationRequest' type: array - cmHandle: + dmiOperationCmHandle: example: id: cmHandle123 cmHandleProperties: myProp: some value otherProp: other value + moduleSetTag: module-set-tag1 properties: id: type: string @@ -597,7 +597,10 @@ components: additionalProperties: type: string type: object - title: cmHandle + moduleSetTag: + example: module-set-tag1 + type: string + title: CmHandle with properties for DMI type: object ModuleSet_schemas_inner: example: @@ -630,10 +633,10 @@ components: ModuleResourcesReadRequest_data: example: modules: - - name: my-name - revision: my-revision - - name: my-name - revision: my-revision + - name: my-name + revision: my-revision + - name: my-name + revision: my-revision properties: modules: items: @@ -647,14 +650,16 @@ components: options: some option operationId: "12" cmHandles: - - id: cmHandle123 - cmHandleProperties: - myProp: some value - otherProp: other value - - id: cmHandle123 - cmHandleProperties: - myProp: some value - otherProp: other value + - id: cmHandle123 + cmHandleProperties: + myProp: some value + otherProp: other value + moduleSetTag: module-set-tag1 + - id: cmHandle123 + cmHandleProperties: + myProp: some value + otherProp: other value + moduleSetTag: module-set-tag1 operation: read properties: operation: @@ -676,12 +681,12 @@ components: type: string cmHandles: items: - $ref: '#/components/schemas/cmHandle' + $ref: '#/components/schemas/dmiOperationCmHandle' type: array required: - - cmHandles - - datastore - - operation - - operationId + - cmHandles + - datastore + - operation + - operationId title: DataOperationRequest type: object |