| swagger: '2.0' |
| info: |
| title: '' |
| version: '' |
| basePath: / |
| paths: |
| '/v1/{project}/kie/kv': |
| get: |
| summary: list key values by labels and key |
| operationId: List |
| parameters: |
| - name: project |
| in: path |
| required: true |
| type: string |
| - name: label |
| in: query |
| description: 'label pairs,for example &label=service:order&label=version:1.0.0' |
| type: string |
| - name: wait |
| in: query |
| description: 'wait until any kv changed. for example wait=5s, server will not response until 5 seconds during that time window, if any kv changed, server will return 200 and kv list, otherwise return 304 and empty body' |
| type: string |
| - name: match |
| in: query |
| description: 'match works with label query param, it specifies label match pattern. if it is empty, server will return kv which''s labels partial match the label query param. uf it is exact, server will return kv which''s labels exact match the label query param' |
| type: string |
| - name: revision |
| in: query |
| description: 'each time you query,server will return a number in header X-Kie-Revision. you can record it in client side, use this number as param value. if current revision is greater than it, server will return data' |
| type: string |
| - name: offset |
| in: query |
| description: pagination |
| type: string |
| - name: limit |
| in: query |
| description: pagination |
| type: string |
| consumes: |
| - '*/*' |
| produces: |
| - application/json |
| - text/yaml |
| responses: |
| '200': |
| description: '' |
| schema: |
| $ref: '#/definitions/v1.DocResponseGetKey' |
| headers: |
| X-Kie-Revision: |
| description: 'cluster latest revision number, if key value is changed, it will increase.' |
| type: integer |
| '304': |
| description: empty body |
| '404': |
| description: '' |
| headers: |
| X-Kie-Revision: |
| description: 'cluster latest revision number, if key value is changed, it will increase.' |
| type: integer |
| delete: |
| summary: delete key by kv ID. |
| operationId: Delete |
| parameters: |
| - name: project |
| in: path |
| required: true |
| type: string |
| - name: kv_id |
| in: query |
| required: true |
| type: string |
| consumes: |
| - '*/*' |
| produces: |
| - '*/*' |
| responses: |
| '204': |
| description: Delete success |
| '500': |
| description: Server error |
| '/v1/{project}/kie/kv/{key}': |
| get: |
| summary: get key values by key and labels |
| operationId: GetByKey |
| parameters: |
| - name: project |
| in: path |
| required: true |
| type: string |
| - name: key |
| in: path |
| required: true |
| type: string |
| - name: label |
| in: query |
| description: 'label pairs,for example &label=service:order&label=version:1.0.0' |
| type: string |
| - name: wait |
| in: query |
| description: 'wait until any kv changed. for example wait=5s, server will not response until 5 seconds during that time window, if any kv changed, server will return 200 and kv list, otherwise return 304 and empty body' |
| type: string |
| - name: match |
| in: query |
| description: 'match works with label query param, it specifies label match pattern. if it is empty, server will return kv which''s labels partial match the label query param. uf it is exact, server will return kv which''s labels exact match the label query param' |
| type: string |
| - name: revision |
| in: query |
| description: 'each time you query,server will return a number in header X-Kie-Revision. you can record it in client side, use this number as param value. if current revision is greater than it, server will return data' |
| type: string |
| - name: offset |
| in: query |
| description: pagination |
| type: string |
| - name: limit |
| in: query |
| description: pagination |
| type: string |
| consumes: |
| - '*/*' |
| produces: |
| - application/json |
| - text/yaml |
| responses: |
| '200': |
| description: get key value success |
| schema: |
| $ref: '#/definitions/v1.DocResponseGetKey' |
| headers: |
| X-Kie-Revision: |
| description: 'cluster latest revision number, if key value is changed, it will increase.' |
| type: integer |
| '304': |
| description: empty body |
| '404': |
| description: '' |
| headers: |
| X-Kie-Revision: |
| description: 'cluster latest revision number, if key value is changed, it will increase.' |
| type: integer |
| put: |
| summary: create or update key value |
| operationId: Put |
| parameters: |
| - name: project |
| in: path |
| required: true |
| type: string |
| - name: key |
| in: path |
| required: true |
| type: string |
| - name: body |
| in: body |
| required: true |
| schema: |
| $ref: '#/definitions/v1.KVBody' |
| consumes: |
| - application/json |
| - text/yaml |
| produces: |
| - application/json |
| - text/yaml |
| responses: |
| '200': |
| description: '' |
| schema: |
| $ref: '#/definitions/v1.DocResponseSingleKey' |
| '/v1/{project}/kie/revision/{key_id}': |
| get: |
| summary: get all revisions by key id |
| operationId: GetRevisions |
| parameters: |
| - name: project |
| in: path |
| required: true |
| type: string |
| - name: key_id |
| in: path |
| required: true |
| type: string |
| consumes: |
| - application/json |
| - text/yaml |
| produces: |
| - application/json |
| - text/yaml |
| responses: |
| '200': |
| description: '' |
| schema: |
| type: array |
| items: |
| $ref: '#/definitions/v1.DocResponseSingleKey' |
| definitions: |
| v1.DocResponseGetKey: |
| type: object |
| properties: |
| data: |
| type: array |
| items: |
| $ref: '#/definitions/v1.DocResponseSingleKey' |
| total: |
| type: integer |
| format: int64 |
| v1.DocResponseSingleKey: |
| type: object |
| properties: |
| create_revision: |
| type: integer |
| format: int64 |
| create_time: |
| type: string |
| id: |
| type: string |
| key: |
| type: string |
| label_id: |
| type: string |
| labels: |
| type: object |
| additionalProperties: |
| type: string |
| update_revision: |
| type: integer |
| format: int64 |
| update_time: |
| type: string |
| value: |
| type: string |
| value_type: |
| type: string |
| v1.KVBody: |
| type: object |
| properties: |
| labels: |
| type: object |
| additionalProperties: |
| type: string |
| value: |
| type: string |
| value_type: |
| type: string |