| swagger: '2.0' |
| info: |
| title: '' |
| version: '' |
| basePath: / |
| paths: |
| /v1/health: |
| get: |
| summary: health check return version and revision |
| operationId: HealthCheck |
| consumes: |
| - application/json |
| - text/yaml |
| produces: |
| - application/json |
| - text/yaml |
| responses: |
| '200': |
| description: '' |
| schema: |
| $ref: '#/definitions/DocHealthCheck' |
| '/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: key |
| in: query |
| 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: limit |
| in: query |
| description: pagination |
| type: string |
| - name: offset |
| in: query |
| description: pagination |
| type: string |
| consumes: |
| - '*/*' |
| produces: |
| - application/json |
| - text/yaml |
| responses: |
| '200': |
| description: '' |
| schema: |
| $ref: '#/definitions/DocResponseGetKey' |
| headers: |
| X-Kie-Revision: |
| description: 'cluster latest revision number, if key value is changed, it will increase.' |
| type: integer |
| '304': |
| description: empty body |
| post: |
| summary: create a key value |
| operationId: Post |
| parameters: |
| - name: project |
| in: path |
| required: true |
| type: string |
| - name: Content-Type |
| in: header |
| description: 'used to indicate the media type of the resource, the value can be application/json or text/yaml' |
| required: true |
| type: string |
| - name: body |
| in: body |
| required: true |
| schema: |
| $ref: '#/definitions/v1.KVCreateBody' |
| consumes: |
| - application/json |
| - text/yaml |
| produces: |
| - application/json |
| - text/yaml |
| responses: |
| '200': |
| description: '' |
| schema: |
| $ref: '#/definitions/DocResponseSingleKey' |
| delete: |
| summary: delete keys. |
| operationId: DeleteList |
| parameters: |
| - name: project |
| in: path |
| required: true |
| type: string |
| - name: Content-Type |
| in: header |
| description: 'used to indicate the media type of the resource, the value only can be application/json' |
| required: true |
| type: string |
| - name: body |
| in: body |
| required: true |
| schema: |
| $ref: '#/definitions/v1.DeleteBody' |
| consumes: |
| - application/json |
| produces: |
| - application/json |
| responses: |
| '204': |
| description: delete success |
| '500': |
| description: server error |
| '/v1/{project}/kie/kv/{kv_id}': |
| get: |
| summary: get key values by kv_id |
| operationId: Get |
| parameters: |
| - name: project |
| in: path |
| required: true |
| type: string |
| - name: kv_id |
| in: path |
| required: true |
| type: string |
| consumes: |
| - '*/*' |
| produces: |
| - application/json |
| - text/yaml |
| responses: |
| '200': |
| description: get key value success |
| schema: |
| $ref: '#/definitions/DocResponseSingleKey' |
| headers: |
| X-Kie-Revision: |
| description: 'cluster latest revision number, if key value is changed, it will increase.' |
| type: integer |
| '404': |
| description: key value not found |
| put: |
| summary: update a key value |
| operationId: Put |
| parameters: |
| - name: project |
| in: path |
| required: true |
| type: string |
| - name: kv_id |
| in: path |
| required: true |
| type: string |
| - name: Content-Type |
| in: header |
| description: 'used to indicate the media type of the resource, the value can be application/json or text/yaml' |
| required: true |
| type: string |
| - name: body |
| in: body |
| required: true |
| schema: |
| $ref: '#/definitions/v1.KVUpdateBody' |
| consumes: |
| - application/json |
| - text/yaml |
| produces: |
| - application/json |
| - text/yaml |
| responses: |
| '200': |
| description: '' |
| schema: |
| $ref: '#/definitions/DocResponseSingleKey' |
| delete: |
| summary: delete key by kv ID. |
| operationId: Delete |
| parameters: |
| - name: project |
| in: path |
| required: true |
| type: string |
| - name: kv_id |
| in: path |
| required: true |
| type: string |
| consumes: |
| - '*/*' |
| produces: |
| - '*/*' |
| responses: |
| '204': |
| description: delete success |
| '404': |
| description: no key value found for deletion |
| '500': |
| description: server error |
| '/v1/{project}/kie/revision/{kv_id}': |
| get: |
| summary: get all revisions by key id |
| operationId: GetRevisions |
| parameters: |
| - name: project |
| in: path |
| required: true |
| type: string |
| - name: kv_id |
| in: path |
| required: true |
| type: string |
| consumes: |
| - application/json |
| - text/yaml |
| produces: |
| - application/json |
| - text/yaml |
| responses: |
| '200': |
| description: '' |
| schema: |
| $ref: '#/definitions/DocResponseGetKey' |
| '/v1/{project}/kie/track': |
| get: |
| summary: get polling tracks of clients of kie server |
| operationId: GetPollingData |
| parameters: |
| - name: project |
| in: path |
| required: true |
| type: string |
| - name: sessionId |
| in: query |
| description: sessionId is the Unique identification of the client |
| type: string |
| - name: ip |
| in: query |
| description: client ip |
| type: string |
| - name: urlPath |
| in: query |
| description: address of the call |
| type: string |
| - name: userAgent |
| in: query |
| description: user agent of the call |
| type: string |
| consumes: |
| - application/json |
| - text/yaml |
| produces: |
| - application/json |
| - text/yaml |
| responses: |
| '200': |
| description: 'true' |
| schema: |
| type: array |
| items: |
| $ref: '#/definitions/PollingDataResponse' |
| definitions: |
| DocHealthCheck: |
| type: object |
| properties: |
| revision: |
| type: string |
| timestamp: |
| type: integer |
| format: int64 |
| version: |
| type: string |
| DocResponseGetKey: |
| type: object |
| properties: |
| data: |
| type: array |
| items: |
| $ref: '#/definitions/DocResponseSingleKey' |
| total: |
| type: integer |
| format: int64 |
| DocResponseSingleKey: |
| type: object |
| properties: |
| create_revision: |
| type: integer |
| format: int64 |
| create_time: |
| type: string |
| id: |
| type: string |
| key: |
| type: string |
| label_format: |
| 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 |
| PollingDataResponse: |
| type: object |
| properties: |
| data: |
| type: array |
| items: |
| $ref: '#/definitions/PollingDetail' |
| total: |
| type: integer |
| format: int32 |
| PollingDetail: |
| type: object |
| properties: |
| domain: |
| type: string |
| id: |
| type: string |
| ip: |
| type: string |
| params: |
| type: object |
| additionalProperties: |
| type: 'string' |
| response_body: |
| type: 'string' |
| response_code: |
| type: integer |
| format: int32 |
| response_header: |
| type: object |
| additionalProperties: |
| type: string |
| session_id: |
| type: string |
| url_path: |
| type: string |
| user_agent: |
| type: string |
| v1.DeleteBody: |
| type: object |
| properties: |
| ids: |
| type: array |
| items: |
| type: string |
| v1.KVCreateBody: |
| type: object |
| properties: |
| key: |
| type: string |
| labels: |
| type: object |
| additionalProperties: |
| type: string |
| status: |
| type: string |
| value: |
| type: string |
| value_type: |
| type: string |
| v1.KVUpdateBody: |
| type: object |
| properties: |
| status: |
| type: string |
| value: |
| type: string |