diff options
Diffstat (limited to 'cps/cps-rest/docs/api/swagger/openapi.yml')
-rw-r--r-- | cps/cps-rest/docs/api/swagger/openapi.yml | 402 |
1 files changed, 402 insertions, 0 deletions
diff --git a/cps/cps-rest/docs/api/swagger/openapi.yml b/cps/cps-rest/docs/api/swagger/openapi.yml new file mode 100644 index 000000000..1f9019a63 --- /dev/null +++ b/cps/cps-rest/docs/api/swagger/openapi.yml @@ -0,0 +1,402 @@ +openapi: 3.0.1 +info: + title: CPS API + description: Configuration Persistence Service API + version: "1.0" +servers: + - url: //localhost:8088/ +tags: + - name: cps-resource + description: cps Resource +paths: + /v1/dataspaces/{dataspace-name}/: + delete: + tags: + - cps-resource + summary: Delete the given dataspace + operationId: deleteDataspace + parameters: + - name: dataspace-name + in: path + description: dataspace-name + required: true + schema: + type: integer + format: int32 + responses: + 200: + description: OK + content: + application/json: + schema: + type: object + 204: + description: No Content + content: {} + 401: + description: Unauthorized + content: {} + 403: + description: Forbidden + content: {} + /v1/dataspaces/{dataspace-name}/anchors: + get: + tags: + - cps-resource + summary: Read all anchors, given a dataspace + operationId: getAnchors + parameters: + - name: dataspace-name + in: path + description: dataspace-name + required: true + schema: + type: integer + format: int32 + responses: + 200: + description: OK + content: + application/json: + schema: + type: object + 401: + description: Unauthorized + content: {} + 403: + description: Forbidden + content: {} + 404: + description: Not Found + content: {} + post: + tags: + - cps-resource + summary: Create a new anchor in the given dataspace + operationId: createAnchor + parameters: + - name: dataspace-name + in: path + description: dataspace-name + required: true + schema: + type: integer + format: int32 + requestBody: + content: + multipart/form-data: + schema: + required: + - file + properties: + file: + type: string + description: file + format: binary + required: true + responses: + 200: + description: OK + content: + application/json: + schema: + type: object + 201: + description: Created + content: {} + 401: + description: Unauthorized + content: {} + 403: + description: Forbidden + content: {} + 404: + description: Not Found + content: {} + /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}: + get: + tags: + - cps-resource + summary: Read an anchor given a anchor and a dataspace + operationId: getAnchor + parameters: + - name: dataspace-name + in: path + description: dataspace-name + required: true + schema: + type: integer + format: int32 + - name: anchor-name + in: path + description: anchor-name + required: true + schema: + type: integer + format: int32 + responses: + 200: + description: OK + content: + application/json: + schema: + type: object + 401: + description: Unauthorized + content: {} + 403: + description: Forbidden + content: {} + 404: + description: Not Found + content: {} + delete: + tags: + - cps-resource + summary: Delete an anchor given a anchor and a dataspace + operationId: deleteAnchor + parameters: + - name: dataspace-name + in: path + description: dataspace-name + required: true + schema: + type: integer + format: int32 + - name: anchor-name + in: path + description: anchor-name + required: true + schema: + type: integer + format: int32 + responses: + 200: + description: OK + content: + application/json: + schema: + type: object + 204: + description: No Content + content: {} + 401: + description: Unauthorized + content: {} + 403: + description: Forbidden + content: {} + /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes: + get: + tags: + - cps-resource + summary: Get a node given an anchor for the given dataspace + operationId: getNodeByDataspaceAndAnchor + parameters: + - name: dataspaceName + in: path + description: dataspaceName + required: true + schema: + type: integer + format: int32 + - name: anchorpoint + in: path + description: anchorpoint + required: true + schema: + type: integer + format: int32 + requestBody: + description: xpath + content: + application/json: + schema: + type: string + required: true + responses: + 200: + description: OK + content: + application/json: + schema: + type: object + 401: + description: Unauthorized + content: {} + 403: + description: Forbidden + content: {} + 404: + description: Not Found + content: {} + x-codegen-request-body-name: xpath + /v1/dataspaces/{dataspace-name}/modules: + get: + tags: + - cps-resource + summary: Read all yang modules in the store + operationId: getModule + parameters: + - name: dataspaceName + in: path + description: dataspaceName + required: true + schema: + type: integer + format: int32 + - name: namespace-name + in: query + description: namespace-name + schema: + type: integer + format: int32 + - name: revision + in: query + description: revision + schema: + type: integer + format: int32 + responses: + 200: + description: OK + content: + application/json: + schema: + type: object + 401: + description: Unauthorized + content: {} + 403: + description: Forbidden + content: {} + 404: + description: Not Found + content: {} + post: + tags: + - cps-resource + summary: Create modules for the given dataspace + operationId: createModules + parameters: + - name: dataspace-name + in: path + description: dataspace-name + required: true + schema: + type: integer + format: int32 + requestBody: + content: + multipart/form-data: + schema: + required: + - file + properties: + file: + type: string + description: file + format: binary + required: true + responses: + 200: + description: OK + content: + application/json: + schema: + type: object + 201: + description: Created + content: {} + 401: + description: Unauthorized + content: {} + 403: + description: Forbidden + content: {} + 404: + description: Not Found + content: {} + /v1/dataspaces/{dataspace-name}/nodes: + get: + tags: + - cps-resource + summary: Get all nodes for a given dataspace using an xpath or schema node identifier + operationId: getNode + parameters: + - name: dataspaceName + in: path + description: dataspaceName + required: true + schema: + type: integer + format: int32 + requestBody: + description: requestBody + content: + application/json: + schema: + type: string + required: true + responses: + 200: + description: OK + content: + application/json: + schema: + type: object + 401: + description: Unauthorized + content: {} + 403: + description: Forbidden + content: {} + 404: + description: Not Found + content: {} + x-codegen-request-body-name: requestBody + post: + tags: + - cps-resource + summary: Create a node for a given anchor for the given dataspace + operationId: createNode + parameters: + - name: dataspace-name + in: path + description: dataspace-name + required: true + schema: + type: integer + format: int32 + requestBody: + content: + multipart/form-data: + schema: + required: + - file + properties: + file: + type: string + description: file + format: binary + required: true + responses: + 200: + description: OK + content: + application/json: + schema: + type: object + 201: + description: Created + content: {} + 401: + description: Unauthorized + content: {} + 403: + description: Forbidden + content: {} + 404: + description: Not Found + content: {} +components: {} |