diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index cca375e3d..99945c383 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -2296,6 +2296,45 @@ ] } }, + "/api/v1/namespaces/{namespace}/workers/describe/{workerInstanceKey}": { + "get": { + "summary": "DescribeWorker returns information about the specified worker.", + "operationId": "DescribeWorker2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DescribeWorkerResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "Namespace this worker belongs to.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "workerInstanceKey", + "description": "Worker instance key to describe.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "WorkflowService" + ] + } + }, "/api/v1/namespaces/{namespace}/workers/fetch-config": { "post": { "summary": "FetchWorkerConfig returns the worker configuration for a specific worker.", @@ -6037,6 +6076,45 @@ ] } }, + "/namespaces/{namespace}/workers/describe/{workerInstanceKey}": { + "get": { + "summary": "DescribeWorker returns information about the specified worker.", + "operationId": "DescribeWorker", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DescribeWorkerResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "Namespace this worker belongs to.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "workerInstanceKey", + "description": "Worker instance key to describe.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "WorkflowService" + ] + } + }, "/namespaces/{namespace}/workers/fetch-config": { "post": { "summary": "FetchWorkerConfig returns the worker configuration for a specific worker.", @@ -10875,6 +10953,14 @@ } } }, + "v1DescribeWorkerResponse": { + "type": "object", + "properties": { + "workerInfo": { + "$ref": "#/definitions/v1WorkerInfo" + } + } + }, "v1DescribeWorkflowExecutionResponse": { "type": "object", "properties": { diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index e31ac3364..82fa0d4db 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -2087,6 +2087,38 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/workers/describe/{workerInstanceKey}: + get: + tags: + - WorkflowService + description: DescribeWorker returns information about the specified worker. + operationId: DescribeWorker + parameters: + - name: namespace + in: path + description: Namespace this worker belongs to. + required: true + schema: + type: string + - name: workerInstanceKey + in: path + description: Worker instance key to describe. + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DescribeWorkerResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' /api/v1/namespaces/{namespace}/workers/fetch-config: post: tags: @@ -5438,6 +5470,38 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + /namespaces/{namespace}/workers/describe/{workerInstanceKey}: + get: + tags: + - WorkflowService + description: DescribeWorker returns information about the specified worker. + operationId: DescribeWorker + parameters: + - name: namespace + in: path + description: Namespace this worker belongs to. + required: true + schema: + type: string + - name: workerInstanceKey + in: path + description: Worker instance key to describe. + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DescribeWorkerResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' /namespaces/{namespace}/workers/fetch-config: post: tags: @@ -7921,6 +7985,11 @@ components: Only set if `report_task_queue_stats` is set to true in the request. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "by" is used to clarify the key. --) + DescribeWorkerResponse: + type: object + properties: + workerInfo: + $ref: '#/components/schemas/WorkerInfo' DescribeWorkflowExecutionResponse: type: object properties: diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 6492aacb2..d6c342d54 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -2539,3 +2539,15 @@ message UpdateWorkerConfigResponse { // Once we support sending update to a multiple workers - it will be converted into a batch job, and job id will be returned. } } + +message DescribeWorkerRequest { + // Namespace this worker belongs to. + string namespace = 1; + + // Worker instance key to describe. + string worker_instance_key = 2; +} + +message DescribeWorkerResponse { + temporal.api.worker.v1.WorkerInfo worker_info = 1; +} \ No newline at end of file diff --git a/temporal/api/workflowservice/v1/service.proto b/temporal/api/workflowservice/v1/service.proto index cc74230af..4acd6cf15 100644 --- a/temporal/api/workflowservice/v1/service.proto +++ b/temporal/api/workflowservice/v1/service.proto @@ -1235,4 +1235,14 @@ service WorkflowService { } }; } + + // DescribeWorker returns information about the specified worker. + rpc DescribeWorker (DescribeWorkerRequest) returns (DescribeWorkerResponse) { + option (google.api.http) = { + get: "/namespaces/{namespace}/workers/describe/{worker_instance_key}" + additional_bindings { + get: "/api/v1/namespaces/{namespace}/workers/describe/{worker_instance_key}" + } + }; + } }