blob: ab83ed2ae66638b9d88e5b934b64a46d24321fc7 [file] [log] [blame]
openapi: 3.0.3
info:
description: NCMP Inventory API
title: NCMP Inventory API
version: 3.5.4
servers:
- url: /ncmpInventory
security:
- basicAuth: []
paths:
/v1/ch:
post:
description: "Register a DMI Plugin with any new, updated or removed CM Handles."
operationId: updateDmiPluginRegistration
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RestDmiPluginRegistration'
required: true
responses:
"200":
content: {}
description: No Content
"400":
content:
application/json:
example:
status: 400
message: Bad request error message
details: Bad request error details
schema:
$ref: '#/components/schemas/ErrorMessage'
description: Bad Request
"403":
content:
application/json:
example:
status: 403
message: Forbidden error message
details: Forbidden error details
schema:
$ref: '#/components/schemas/ErrorMessage'
description: Forbidden
"500":
content:
application/json:
example:
failedCreatedCmHandles:
- cmHandle: my-cm-handle-01
errorCode: "00"
errorText: Unknown error. <error-details>
- cmHandle: my-cm-handle-02
errorCode: "01"
errorText: cm-handle already exists
- cmHandle: my-cm-handle-03
errorCode: "03"
errorText: cm-handle has an invalid character(s) in id
failedUpdatedCmHandles:
- cmHandle: my-cm-handle-01
errorCode: "00"
errorText: Unknown error. <error-details>
- cmHandle: my-cm-handle-02
errorCode: "02"
errorText: cm-handle does not exist
- cmHandle: my-cm-handle-03
errorCode: "03"
errorText: cm-handle has an invalid character(s) in id
failedRemovedCmHandles:
- cmHandle: my-cm-handle-01
errorCode: "00"
errorText: Unknown error. <error-details>
- cmHandle: my-cm-handle-02
errorCode: "02"
errorText: cm-handle does not exists
- cmHandle: my-cm-handle-03
errorCode: "03"
errorText: cm-handle has an invalid character(s) in id
schema:
$ref: '#/components/schemas/DmiPluginRegistrationErrorResponse'
description: Partial or Complete failure. The error details are provided
in the response body and all supported error codes are documented in the
example.
summary: DMI notifies NCMP of new CM Handles
tags:
- network-cm-proxy-inventory
/v1/ch/cmHandles:
get:
description: Get all cm handle references for a registered DMI plugin
operationId: getAllCmHandleReferencesForRegisteredDmi
parameters:
- description: dmi-plugin-identifier
in: query
name: dmi-plugin-identifier
required: true
schema:
example: my-dmi-plugin
type: string
- description: Boolean parameter to determine if returned value(s) will be cm
handle ids or alternate ids for a given query
in: query
name: outputAlternateId
required: false
schema:
default: false
type: boolean
responses:
"200":
content:
application/json:
schema:
items:
type: string
type: array
description: OK
"403":
content:
application/json:
example:
status: 403
message: Forbidden error message
details: Forbidden error details
schema:
$ref: '#/components/schemas/ErrorMessage'
description: Forbidden
"500":
content:
application/json:
example:
status: 500
message: Internal Server Error
details: Internal Server Error occurred
schema:
$ref: '#/components/schemas/ErrorMessage'
description: Internal Server Error
summary: "Get all cm handle references for a registered DMI plugin (DMI plugin,\
\ DMI data plugin, DMI model plugin)"
tags:
- network-cm-proxy-inventory
/v1/ch/searches:
post:
description: "Query and get cm handle references for additional properties,\
\ public properties and registered DMI plugin (DMI plugin, DMI data plugin,\
\ DMI model plugin)."
operationId: searchCmHandleIds
parameters:
- description: Boolean parameter to determine if returned value(s) will be cm
handle ids or alternate ids for a given query
in: query
name: outputAlternateId
required: false
schema:
default: false
type: boolean
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CmHandleQueryParameters'
required: true
responses:
"200":
content:
application/json:
schema:
items:
type: string
type: array
description: OK
"403":
content:
application/json:
example:
status: 403
message: Forbidden error message
details: Forbidden error details
schema:
$ref: '#/components/schemas/ErrorMessage'
description: Forbidden
"500":
content:
application/json:
example:
status: 500
message: Internal Server Error
details: Internal Server Error occurred
schema:
$ref: '#/components/schemas/ErrorMessage'
description: Internal Server Error
summary: Query for CM Handle IDs
tags:
- network-cm-proxy-inventory
components:
parameters:
dmiPluginIdentifierInQuery:
description: dmi-plugin-identifier
in: query
name: dmi-plugin-identifier
required: true
schema:
example: my-dmi-plugin
type: string
outputAlternateIdOptionInQuery:
description: Boolean parameter to determine if returned value(s) will be cm
handle ids or alternate ids for a given query
in: query
name: outputAlternateId
required: false
schema:
default: false
type: boolean
responses:
NoContent:
content: {}
description: No Content
BadRequest:
content:
application/json:
example:
status: 400
message: Bad request error message
details: Bad request error details
schema:
$ref: '#/components/schemas/ErrorMessage'
description: Bad Request
Forbidden:
content:
application/json:
example:
status: 403
message: Forbidden error message
details: Forbidden error details
schema:
$ref: '#/components/schemas/ErrorMessage'
description: Forbidden
InternalServerError:
content:
application/json:
example:
status: 500
message: Internal Server Error
details: Internal Server Error occurred
schema:
$ref: '#/components/schemas/ErrorMessage'
description: Internal Server Error
schemas:
RestDmiPluginRegistration:
example:
updatedCmHandles:
- cmHandle: my-cm-handle
alternateId: my-alternate-id
dataProducerIdentifier: my-data-producer-identifier
publicCmHandleProperties:
key: my-property
cmHandleProperties:
key: my-property
moduleSetTag: my-module-set-tag
trustLevel: COMPLETE
- cmHandle: my-cm-handle
alternateId: my-alternate-id
dataProducerIdentifier: my-data-producer-identifier
publicCmHandleProperties:
key: my-property
cmHandleProperties:
key: my-property
moduleSetTag: my-module-set-tag
trustLevel: COMPLETE
createdCmHandles:
- cmHandle: my-cm-handle
alternateId: my-alternate-id
dataProducerIdentifier: my-data-producer-identifier
publicCmHandleProperties:
key: my-property
cmHandleProperties:
key: my-property
moduleSetTag: my-module-set-tag
trustLevel: COMPLETE
- cmHandle: my-cm-handle
alternateId: my-alternate-id
dataProducerIdentifier: my-data-producer-identifier
publicCmHandleProperties:
key: my-property
cmHandleProperties:
key: my-property
moduleSetTag: my-module-set-tag
trustLevel: COMPLETE
dmiPlugin: my-dmi-plugin
dmiModelPlugin: my-dmi-model-plugin
upgradedCmHandles:
cmHandles:
- my-cm-handle1
- my-cm-handle2
- my-cm-handle3
moduleSetTag: my-module-set-tag
dmiDataPlugin: my-dmi-data-plugin
removedCmHandles:
- my-cm-handle1
- my-cm-handle2
- my-cm-handle3
properties:
dmiPlugin:
default: ""
example: my-dmi-plugin
type: string
dmiDataPlugin:
default: ""
example: my-dmi-data-plugin
type: string
dmiModelPlugin:
default: ""
example: my-dmi-model-plugin
type: string
createdCmHandles:
items:
$ref: '#/components/schemas/RestInputCmHandle'
type: array
updatedCmHandles:
items:
$ref: '#/components/schemas/RestInputCmHandle'
type: array
removedCmHandles:
example:
- my-cm-handle1
- my-cm-handle2
- my-cm-handle3
items:
type: string
type: array
upgradedCmHandles:
$ref: '#/components/schemas/UpgradedCmHandles'
type: object
RestInputCmHandle:
example:
cmHandle: my-cm-handle
alternateId: my-alternate-id
dataProducerIdentifier: my-data-producer-identifier
publicCmHandleProperties:
key: my-property
cmHandleProperties:
key: my-property
moduleSetTag: my-module-set-tag
trustLevel: COMPLETE
properties:
cmHandle:
example: my-cm-handle
type: string
cmHandleProperties:
additionalProperties:
example: my-property
type: string
type: object
publicCmHandleProperties:
additionalProperties:
example: my-property
type: string
type: object
moduleSetTag:
example: my-module-set-tag
type: string
trustLevel:
enum:
- COMPLETE
- NONE
example: COMPLETE
type: string
alternateId:
example: my-alternate-id
type: string
dataProducerIdentifier:
example: my-data-producer-identifier
type: string
required:
- cmHandle
type: object
RestCmHandleProperties:
additionalProperties:
example: my-property
type: string
type: object
UpgradedCmHandles:
example:
cmHandles:
- my-cm-handle1
- my-cm-handle2
- my-cm-handle3
moduleSetTag: my-module-set-tag
properties:
cmHandles:
example:
- my-cm-handle1
- my-cm-handle2
- my-cm-handle3
items:
type: string
type: array
moduleSetTag:
default: ""
example: my-module-set-tag
type: string
required:
- cmHandles
type: object
ErrorMessage:
properties:
status:
type: string
message:
type: string
details:
type: string
title: Error
type: object
DmiPluginRegistrationErrorResponse:
properties:
failedCreatedCmHandles:
items:
$ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
type: array
failedUpdatedCmHandles:
items:
$ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
type: array
failedRemovedCmHandles:
items:
$ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
type: array
failedUpgradeCmHandles:
items:
$ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
type: array
type: object
CmHandlerRegistrationErrorResponse:
properties:
cmHandle:
example: my-cm-handle
type: string
errorCode:
example: "00"
type: string
errorText:
example: Unknown error. <error-details>
type: string
type: object
CmHandleQueryParameters:
example:
cmHandleQueryParameters:
- conditionParameters:
- key: conditionParameters
- key: conditionParameters
conditionName: conditionName
- conditionParameters:
- key: conditionParameters
- key: conditionParameters
conditionName: conditionName
conditions:
- name: name
conditionParameters:
- moduleName: my-module
- moduleName: my-module
- name: name
conditionParameters:
- moduleName: my-module
- moduleName: my-module
properties:
cmHandleQueryParameters:
items:
$ref: '#/components/schemas/ConditionProperties'
type: array
conditions:
deprecated: true
description: "not necessary, it is just for backward compatibility"
items:
$ref: '#/components/schemas/OldConditionProperties'
type: array
title: Cm Handle query parameters for executing cm handle search
type: object
ConditionProperties:
example:
conditionParameters:
- key: conditionParameters
- key: conditionParameters
conditionName: conditionName
properties:
conditionName:
type: string
conditionParameters:
items:
additionalProperties:
type: string
type: object
type: array
OldConditionProperties:
deprecated: true
example:
name: name
conditionParameters:
- moduleName: my-module
- moduleName: my-module
properties:
name:
type: string
conditionParameters:
items:
$ref: '#/components/schemas/ModuleNameAsJsonObject'
type: array
ModuleNameAsJsonObject:
example:
moduleName: my-module
properties:
moduleName:
example: my-module
type: string
securitySchemes:
basicAuth:
scheme: basic
type: http