diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index d9d71f5a4..d0a13c3b3 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -120,169 +120,6 @@ ] } }, - "/api/v1/namespaces/activities/{activityId}/pause": { - "post": { - "summary": "PauseActivityExecution pauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be paused", - "description": "Pausing an activity means:\n- If the activity is currently waiting for a retry or is running and subsequently fails,\n it will not be rescheduled until it is unpaused.\n- If the activity is already paused, calling this method will have no effect.\n- If the activity is running and finishes successfully, the activity will be completed.\n- If the activity is running and finishes with failure:\n * if there is no retry left - the activity will be completed.\n * if there are more retries left - the activity will be paused.\nFor long-running activities:\n- activities in paused state will send a cancellation with \"activity_paused\" set to 'true' in response to 'RecordActivityTaskHeartbeat'.\n- The activity should respond to the cancellation accordingly.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type", - "operationId": "PauseActivityExecution2", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1PauseActivityExecutionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "activityId", - "description": "Pause an activity with this ID. Must be provided for a standalone activity.\nMutually exclusive with workflow_activity_type.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServicePauseActivityExecutionBody" - } - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/api/v1/namespaces/activities/{activityId}/reset": { - "post": { - "summary": "ResetActivityExecution resets the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be reset.", - "description": "Resetting an activity means:\n* number of attempts will be reset to 0.\n* activity timeouts will be reset.\n* if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided:\n it will be scheduled immediately (* see 'jitter' flag),\n\nFlags:\n\n'jitter': the activity will be scheduled at a random time within the jitter duration.\nIf the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided.\n'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset.\n'keep_paused': if the activity is paused, it will remain paused.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type.", - "operationId": "ResetActivityExecution2", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1ResetActivityExecutionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "activityId", - "description": "Reset an activity with this ID. Must be provided for a standalone activity.\nMutually exclusive with workflow_activity_type and all_workflow_activities.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceResetActivityExecutionBody" - } - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/api/v1/namespaces/activities/{activityId}/unpause": { - "post": { - "summary": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be unpaused.", - "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n'reset_attempts': the number of attempts will be reset.\n'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type", - "operationId": "UnpauseActivityExecution2", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1UnpauseActivityExecutionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "activityId", - "description": "Unpause an activity with this ID. Must be provided for a standalone activity.\nMutually exclusive with workflow_activity_type and all_workflow_activities.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceUnpauseActivityExecutionBody" - } - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/api/v1/namespaces/activities/{activityId}/update-options": { - "post": { - "summary": "UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be updated.", - "operationId": "UpdateActivityExecutionOptions2", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1UpdateActivityExecutionOptionsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "activityId", - "description": "Update options for an activity with this ID. Must be provided for a standalone activity.\nMutually exclusive with workflow_activity_type and all_workflow_activities.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceUpdateActivityExecutionOptionsBody" - } - } - ], - "tags": [ - "WorkflowService" - ] - } - }, "/api/v1/namespaces/{namespace}": { "get": { "summary": "DescribeNamespace returns the information and configuration for a registered namespace.", @@ -697,7 +534,7 @@ "/api/v1/namespaces/{namespace}/activities/pause": { "post": { "summary": "PauseActivity pauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be paused", - "description": "Pausing an activity means:\n- If the activity is currently waiting for a retry or is running and subsequently fails,\n it will not be rescheduled until it is unpaused.\n- If the activity is already paused, calling this method will have no effect.\n- If the activity is running and finishes successfully, the activity will be completed.\n- If the activity is running and finishes with failure:\n * if there is no retry left - the activity will be completed.\n * if there are more retries left - the activity will be paused.\nFor long-running activities:\n- activities in paused state will send a cancellation with \"activity_paused\" set to 'true' in response to 'RecordActivityTaskHeartbeat'.\n- The activity should respond to the cancellation accordingly.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nDeprecated. See PauseActivityExecution.", + "description": "Pausing an activity means:\n- If the activity is currently waiting for a retry or is running and subsequently fails,\n it will not be rescheduled until it is unpaused.\n- If the activity is already paused, calling this method will have no effect.\n- If the activity is running and finishes successfully, the activity will be completed.\n- If the activity is running and finishes with failure:\n * if there is no retry left - the activity will be completed.\n * if there are more retries left - the activity will be paused.\nFor long-running activities:\n- activities in paused state will send a cancellation with \"activity_paused\" set to 'true' in response to 'RecordActivityTaskHeartbeat'.\n- The activity should respond to the cancellation accordingly.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nThis API will be deprecated soon and replaced with a newer PauseActivityExecution that is better named and\nstructured to work well for standalone activities.", "operationId": "PauseActivity2", "responses": { "200": { @@ -738,7 +575,7 @@ "/api/v1/namespaces/{namespace}/activities/reset": { "post": { "summary": "ResetActivity resets the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be reset.", - "description": "Resetting an activity means:\n* number of attempts will be reset to 0.\n* activity timeouts will be reset.\n* if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided:\n it will be scheduled immediately (* see 'jitter' flag),\n\nFlags:\n\n'jitter': the activity will be scheduled at a random time within the jitter duration.\nIf the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided.\n'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset.\n'keep_paused': if the activity is paused, it will remain paused.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type.\nDeprecated. See ResetActivityExecution.", + "description": "Resetting an activity means:\n* number of attempts will be reset to 0.\n* activity timeouts will be reset.\n* if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided:\n it will be scheduled immediately (* see 'jitter' flag),\n\nFlags:\n\n'jitter': the activity will be scheduled at a random time within the jitter duration.\nIf the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided.\n'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset.\n'keep_paused': if the activity is paused, it will remain paused.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type.\nThis API will be deprecated soon and replaced with a newer ResetActivityExecution that is better named and\nstructured to work well for standalone activities.", "operationId": "ResetActivity2", "responses": { "200": { @@ -779,7 +616,7 @@ "/api/v1/namespaces/{namespace}/activities/unpause": { "post": { "summary": "UnpauseActivity unpauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be unpaused.", - "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n'reset_attempts': the number of attempts will be reset.\n'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nDeprecated. See UnpauseActivityExecution.", + "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n'reset_attempts': the number of attempts will be reset.\n'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nThis API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and\nstructured to work well for standalone activities.", "operationId": "UnpauseActivity2", "responses": { "200": { @@ -819,7 +656,7 @@ }, "/api/v1/namespaces/{namespace}/activities/update-options": { "post": { - "summary": "UpdateActivityOptions is called by the client to update the options of an activity by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be updated.\nDeprecated. See UpdateActivityExecutionOptions.", + "summary": "UpdateActivityOptions is called by the client to update the options of an activity by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be updated.\nThis API will be deprecated soon and replaced with a newer UpdateActivityExecutionOptions that is better named and\nstructured to work well for standalone activities.", "operationId": "UpdateActivityOptions2", "responses": { "200": { @@ -3893,16 +3730,16 @@ ] } }, - "/api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/pause": { + "/api/v1/namespaces/{namespace}/workflows/{workflowId}/signal-with-start/{signalName}": { "post": { - "summary": "PauseActivityExecution pauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be paused", - "description": "Pausing an activity means:\n- If the activity is currently waiting for a retry or is running and subsequently fails,\n it will not be rescheduled until it is unpaused.\n- If the activity is already paused, calling this method will have no effect.\n- If the activity is running and finishes successfully, the activity will be completed.\n- If the activity is running and finishes with failure:\n * if there is no retry left - the activity will be completed.\n * if there are more retries left - the activity will be paused.\nFor long-running activities:\n- activities in paused state will send a cancellation with \"activity_paused\" set to 'true' in response to 'RecordActivityTaskHeartbeat'.\n- The activity should respond to the cancellation accordingly.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type", - "operationId": "PauseActivityExecution4", + "summary": "SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if\nit isn't yet started.", + "description": "If the workflow is running, a `WORKFLOW_EXECUTION_SIGNALED` event is recorded in the history\nand a workflow task is generated.\n\nIf the workflow is not running or not found, then the workflow is created with\n`WORKFLOW_EXECUTION_STARTED` and `WORKFLOW_EXECUTION_SIGNALED` events in its history, and a\nworkflow task is generated.", + "operationId": "SignalWithStartWorkflowExecution2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1PauseActivityExecutionResponse" + "$ref": "#/definitions/v1SignalWithStartWorkflowExecutionResponse" } }, "default": { @@ -3915,21 +3752,19 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity.", "in": "path", "required": true, "type": "string" }, { "name": "workflowId", - "description": "If provided, pause a workflow activity (or activities) for the given workflow ID.\nIf empty, target a standalone activity.", "in": "path", "required": true, "type": "string" }, { - "name": "activityId", - "description": "Pause an activity with this ID. Must be provided for a standalone activity.\nMutually exclusive with workflow_activity_type.", + "name": "signalName", + "description": "The workflow author-defined name of the signal to send to the workflow", "in": "path", "required": true, "type": "string" @@ -3939,7 +3774,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServicePauseActivityExecutionBody" + "$ref": "#/definitions/WorkflowServiceSignalWithStartWorkflowExecutionBody" } } ], @@ -3948,16 +3783,15 @@ ] } }, - "/api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/reset": { - "post": { - "summary": "ResetActivityExecution resets the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be reset.", - "description": "Resetting an activity means:\n* number of attempts will be reset to 0.\n* activity timeouts will be reset.\n* if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided:\n it will be scheduled immediately (* see 'jitter' flag),\n\nFlags:\n\n'jitter': the activity will be scheduled at a random time within the jitter duration.\nIf the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided.\n'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset.\n'keep_paused': if the activity is paused, it will remain paused.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type.", - "operationId": "ResetActivityExecution4", + "/api/v1/nexus/endpoints": { + "get": { + "summary": "List all Nexus endpoints for the cluster, sorted by ID in ascending order. Set page_token in the request to the\nnext_page_token field of the previous response to get the next page of results. An empty next_page_token\nindicates that there are no more results. During pagination, a newly added service with an ID lexicographically\nearlier than the previous page's last endpoint's ID may be missed.", + "operationId": "ListNexusEndpoints2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ResetActivityExecutionResponse" + "$ref": "#/definitions/v1ListNexusEndpointsResponse" } }, "default": { @@ -3969,50 +3803,40 @@ }, "parameters": [ { - "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity.", - "in": "path", - "required": true, - "type": "string" + "name": "pageSize", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" }, { - "name": "workflowId", - "description": "If provided, reset a workflow activity (or activities) for the given workflow ID.\nIf empty, target a standalone activity.", - "in": "path", - "required": true, - "type": "string" + "name": "nextPageToken", + "description": "To get the next page, pass in `ListNexusEndpointsResponse.next_page_token` from the previous page's\nresponse, the token will be empty if there's no other page.\nNote: the last page may be empty if the total number of endpoints registered is a multiple of the page size.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" }, { - "name": "activityId", - "description": "Reset an activity with this ID. Must be provided for a standalone activity.\nMutually exclusive with workflow_activity_type and all_workflow_activities.", - "in": "path", - "required": true, + "name": "name", + "description": "Name of the incoming endpoint to filter on - optional. Specifying this will result in zero or one results.", + "in": "query", + "required": false, "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceResetActivityExecutionBody" - } } ], "tags": [ - "WorkflowService" + "OperatorService" ] - } - }, - "/api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/unpause": { + }, "post": { - "summary": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be unpaused.", - "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n'reset_attempts': the number of attempts will be reset.\n'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type", - "operationId": "UnpauseActivityExecution4", + "summary": "Create a Nexus endpoint. This will fail if an endpoint with the same name is already registered with a status of\nALREADY_EXISTS.\nReturns the created endpoint with its initial version. You may use this version for subsequent updates.", + "operationId": "CreateNexusEndpoint2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UnpauseActivityExecutionResponse" + "$ref": "#/definitions/v1CreateNexusEndpointResponse" } }, "default": { @@ -4023,50 +3847,29 @@ } }, "parameters": [ - { - "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "workflowId", - "description": "If provided, unpause a workflow activity (or activities) for the given workflow ID.\nIf empty, target a standalone activity.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "activityId", - "description": "Unpause an activity with this ID. Must be provided for a standalone activity.\nMutually exclusive with workflow_activity_type and all_workflow_activities.", - "in": "path", - "required": true, - "type": "string" - }, { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceUnpauseActivityExecutionBody" + "$ref": "#/definitions/v1CreateNexusEndpointRequest" } } ], "tags": [ - "WorkflowService" + "OperatorService" ] } }, - "/api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/update-options": { - "post": { - "summary": "UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be updated.", - "operationId": "UpdateActivityExecutionOptions4", + "/api/v1/nexus/endpoints/{id}": { + "get": { + "summary": "Get a registered Nexus endpoint by ID. The returned version can be used for optimistic updates.", + "operationId": "GetNexusEndpoint2", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UpdateActivityExecutionOptionsResponse" + "$ref": "#/definitions/v1GetNexusEndpointResponse" } }, "default": { @@ -4078,223 +3881,38 @@ }, "parameters": [ { - "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity", + "name": "id", + "description": "Server-generated unique endpoint ID.", "in": "path", "required": true, "type": "string" + } + ], + "tags": [ + "OperatorService" + ] + }, + "delete": { + "summary": "Delete an incoming Nexus service by ID.", + "operationId": "DeleteNexusEndpoint2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DeleteNexusEndpointResponse" + } }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ { - "name": "workflowId", - "description": "If provided, update options for a workflow activity (or activities) for the given workflow ID. If empty, target a\nstandalone activity.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "activityId", - "description": "Update options for an activity with this ID. Must be provided for a standalone activity.\nMutually exclusive with workflow_activity_type and all_workflow_activities.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceUpdateActivityExecutionOptionsBody" - } - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/api/v1/namespaces/{namespace}/workflows/{workflowId}/signal-with-start/{signalName}": { - "post": { - "summary": "SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if\nit isn't yet started.", - "description": "If the workflow is running, a `WORKFLOW_EXECUTION_SIGNALED` event is recorded in the history\nand a workflow task is generated.\n\nIf the workflow is not running or not found, then the workflow is created with\n`WORKFLOW_EXECUTION_STARTED` and `WORKFLOW_EXECUTION_SIGNALED` events in its history, and a\nworkflow task is generated.", - "operationId": "SignalWithStartWorkflowExecution2", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1SignalWithStartWorkflowExecutionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "workflowId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "signalName", - "description": "The workflow author-defined name of the signal to send to the workflow", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceSignalWithStartWorkflowExecutionBody" - } - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/api/v1/nexus/endpoints": { - "get": { - "summary": "List all Nexus endpoints for the cluster, sorted by ID in ascending order. Set page_token in the request to the\nnext_page_token field of the previous response to get the next page of results. An empty next_page_token\nindicates that there are no more results. During pagination, a newly added service with an ID lexicographically\nearlier than the previous page's last endpoint's ID may be missed.", - "operationId": "ListNexusEndpoints2", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1ListNexusEndpointsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "pageSize", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "nextPageToken", - "description": "To get the next page, pass in `ListNexusEndpointsResponse.next_page_token` from the previous page's\nresponse, the token will be empty if there's no other page.\nNote: the last page may be empty if the total number of endpoints registered is a multiple of the page size.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "name", - "description": "Name of the incoming endpoint to filter on - optional. Specifying this will result in zero or one results.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "OperatorService" - ] - }, - "post": { - "summary": "Create a Nexus endpoint. This will fail if an endpoint with the same name is already registered with a status of\nALREADY_EXISTS.\nReturns the created endpoint with its initial version. You may use this version for subsequent updates.", - "operationId": "CreateNexusEndpoint2", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1CreateNexusEndpointResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1CreateNexusEndpointRequest" - } - } - ], - "tags": [ - "OperatorService" - ] - } - }, - "/api/v1/nexus/endpoints/{id}": { - "get": { - "summary": "Get a registered Nexus endpoint by ID. The returned version can be used for optimistic updates.", - "operationId": "GetNexusEndpoint2", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1GetNexusEndpointResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "description": "Server-generated unique endpoint ID.", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "OperatorService" - ] - }, - "delete": { - "summary": "Delete an incoming Nexus service by ID.", - "operationId": "DeleteNexusEndpoint2", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1DeleteNexusEndpointResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "description": "Server-generated unique endpoint ID.", + "name": "id", + "description": "Server-generated unique endpoint ID.", "in": "path", "required": true, "type": "string" @@ -4647,182 +4265,30 @@ } } }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1CreateNexusEndpointRequest" - } - } - ], - "tags": [ - "OperatorService" - ] - } - }, - "/cluster/nexus/endpoints/{id}": { - "get": { - "summary": "Get a registered Nexus endpoint by ID. The returned version can be used for optimistic updates.", - "operationId": "GetNexusEndpoint", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1GetNexusEndpointResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "description": "Server-generated unique endpoint ID.", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "OperatorService" - ] - }, - "delete": { - "summary": "Delete an incoming Nexus service by ID.", - "operationId": "DeleteNexusEndpoint", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1DeleteNexusEndpointResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "description": "Server-generated unique endpoint ID.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "version", - "description": "Data version for this endpoint. Must match current version.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - } - ], - "tags": [ - "OperatorService" - ] - } - }, - "/cluster/nexus/endpoints/{id}/update": { - "post": { - "summary": "Optimistically update a Nexus endpoint based on provided version as obtained via the `GetNexusEndpoint` or\n`ListNexusEndpointResponse` APIs. This will fail with a status of FAILED_PRECONDITION if the version does not\nmatch.\nReturns the updated endpoint with its updated version. You may use this version for subsequent updates. You don't\nneed to increment the version yourself. The server will increment the version for you after each update.", - "operationId": "UpdateNexusEndpoint", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1UpdateNexusEndpointResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "description": "Server-generated unique endpoint ID.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/OperatorServiceUpdateNexusEndpointBody" - } - } - ], - "tags": [ - "OperatorService" - ] - } - }, - "/namespaces/activities/{activityId}/pause": { - "post": { - "summary": "PauseActivityExecution pauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be paused", - "description": "Pausing an activity means:\n- If the activity is currently waiting for a retry or is running and subsequently fails,\n it will not be rescheduled until it is unpaused.\n- If the activity is already paused, calling this method will have no effect.\n- If the activity is running and finishes successfully, the activity will be completed.\n- If the activity is running and finishes with failure:\n * if there is no retry left - the activity will be completed.\n * if there are more retries left - the activity will be paused.\nFor long-running activities:\n- activities in paused state will send a cancellation with \"activity_paused\" set to 'true' in response to 'RecordActivityTaskHeartbeat'.\n- The activity should respond to the cancellation accordingly.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type", - "operationId": "PauseActivityExecution", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1PauseActivityExecutionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "activityId", - "description": "Pause an activity with this ID. Must be provided for a standalone activity.\nMutually exclusive with workflow_activity_type.", - "in": "path", - "required": true, - "type": "string" - }, + "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServicePauseActivityExecutionBody" + "$ref": "#/definitions/v1CreateNexusEndpointRequest" } } ], "tags": [ - "WorkflowService" + "OperatorService" ] } }, - "/namespaces/activities/{activityId}/reset": { - "post": { - "summary": "ResetActivityExecution resets the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be reset.", - "description": "Resetting an activity means:\n* number of attempts will be reset to 0.\n* activity timeouts will be reset.\n* if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided:\n it will be scheduled immediately (* see 'jitter' flag),\n\nFlags:\n\n'jitter': the activity will be scheduled at a random time within the jitter duration.\nIf the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided.\n'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset.\n'keep_paused': if the activity is paused, it will remain paused.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type.", - "operationId": "ResetActivityExecution", + "/cluster/nexus/endpoints/{id}": { + "get": { + "summary": "Get a registered Nexus endpoint by ID. The returned version can be used for optimistic updates.", + "operationId": "GetNexusEndpoint", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ResetActivityExecutionResponse" + "$ref": "#/definitions/v1GetNexusEndpointResponse" } }, "default": { @@ -4834,36 +4300,25 @@ }, "parameters": [ { - "name": "activityId", - "description": "Reset an activity with this ID. Must be provided for a standalone activity.\nMutually exclusive with workflow_activity_type and all_workflow_activities.", + "name": "id", + "description": "Server-generated unique endpoint ID.", "in": "path", "required": true, "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceResetActivityExecutionBody" - } } ], "tags": [ - "WorkflowService" + "OperatorService" ] - } - }, - "/namespaces/activities/{activityId}/unpause": { - "post": { - "summary": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be unpaused.", - "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n'reset_attempts': the number of attempts will be reset.\n'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type", - "operationId": "UnpauseActivityExecution", + }, + "delete": { + "summary": "Delete an incoming Nexus service by ID.", + "operationId": "DeleteNexusEndpoint", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UnpauseActivityExecutionResponse" + "$ref": "#/definitions/v1DeleteNexusEndpointResponse" } }, "default": { @@ -4875,35 +4330,35 @@ }, "parameters": [ { - "name": "activityId", - "description": "Unpause an activity with this ID. Must be provided for a standalone activity.\nMutually exclusive with workflow_activity_type and all_workflow_activities.", + "name": "id", + "description": "Server-generated unique endpoint ID.", "in": "path", "required": true, "type": "string" }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceUnpauseActivityExecutionBody" - } + "name": "version", + "description": "Data version for this endpoint. Must match current version.", + "in": "query", + "required": false, + "type": "string", + "format": "int64" } ], "tags": [ - "WorkflowService" + "OperatorService" ] } }, - "/namespaces/activities/{activityId}/update-options": { + "/cluster/nexus/endpoints/{id}/update": { "post": { - "summary": "UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be updated.", - "operationId": "UpdateActivityExecutionOptions", + "summary": "Optimistically update a Nexus endpoint based on provided version as obtained via the `GetNexusEndpoint` or\n`ListNexusEndpointResponse` APIs. This will fail with a status of FAILED_PRECONDITION if the version does not\nmatch.\nReturns the updated endpoint with its updated version. You may use this version for subsequent updates. You don't\nneed to increment the version yourself. The server will increment the version for you after each update.", + "operationId": "UpdateNexusEndpoint", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UpdateActivityExecutionOptionsResponse" + "$ref": "#/definitions/v1UpdateNexusEndpointResponse" } }, "default": { @@ -4915,8 +4370,8 @@ }, "parameters": [ { - "name": "activityId", - "description": "Update options for an activity with this ID. Must be provided for a standalone activity.\nMutually exclusive with workflow_activity_type and all_workflow_activities.", + "name": "id", + "description": "Server-generated unique endpoint ID.", "in": "path", "required": true, "type": "string" @@ -4926,12 +4381,12 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceUpdateActivityExecutionOptionsBody" + "$ref": "#/definitions/OperatorServiceUpdateNexusEndpointBody" } } ], "tags": [ - "WorkflowService" + "OperatorService" ] } }, @@ -5312,7 +4767,7 @@ "/namespaces/{namespace}/activities/pause": { "post": { "summary": "PauseActivity pauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be paused", - "description": "Pausing an activity means:\n- If the activity is currently waiting for a retry or is running and subsequently fails,\n it will not be rescheduled until it is unpaused.\n- If the activity is already paused, calling this method will have no effect.\n- If the activity is running and finishes successfully, the activity will be completed.\n- If the activity is running and finishes with failure:\n * if there is no retry left - the activity will be completed.\n * if there are more retries left - the activity will be paused.\nFor long-running activities:\n- activities in paused state will send a cancellation with \"activity_paused\" set to 'true' in response to 'RecordActivityTaskHeartbeat'.\n- The activity should respond to the cancellation accordingly.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nDeprecated. See PauseActivityExecution.", + "description": "Pausing an activity means:\n- If the activity is currently waiting for a retry or is running and subsequently fails,\n it will not be rescheduled until it is unpaused.\n- If the activity is already paused, calling this method will have no effect.\n- If the activity is running and finishes successfully, the activity will be completed.\n- If the activity is running and finishes with failure:\n * if there is no retry left - the activity will be completed.\n * if there are more retries left - the activity will be paused.\nFor long-running activities:\n- activities in paused state will send a cancellation with \"activity_paused\" set to 'true' in response to 'RecordActivityTaskHeartbeat'.\n- The activity should respond to the cancellation accordingly.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nThis API will be deprecated soon and replaced with a newer PauseActivityExecution that is better named and\nstructured to work well for standalone activities.", "operationId": "PauseActivity", "responses": { "200": { @@ -5353,7 +4808,7 @@ "/namespaces/{namespace}/activities/reset": { "post": { "summary": "ResetActivity resets the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be reset.", - "description": "Resetting an activity means:\n* number of attempts will be reset to 0.\n* activity timeouts will be reset.\n* if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided:\n it will be scheduled immediately (* see 'jitter' flag),\n\nFlags:\n\n'jitter': the activity will be scheduled at a random time within the jitter duration.\nIf the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided.\n'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset.\n'keep_paused': if the activity is paused, it will remain paused.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type.\nDeprecated. See ResetActivityExecution.", + "description": "Resetting an activity means:\n* number of attempts will be reset to 0.\n* activity timeouts will be reset.\n* if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided:\n it will be scheduled immediately (* see 'jitter' flag),\n\nFlags:\n\n'jitter': the activity will be scheduled at a random time within the jitter duration.\nIf the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided.\n'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset.\n'keep_paused': if the activity is paused, it will remain paused.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type.\nThis API will be deprecated soon and replaced with a newer ResetActivityExecution that is better named and\nstructured to work well for standalone activities.", "operationId": "ResetActivity", "responses": { "200": { @@ -5394,7 +4849,7 @@ "/namespaces/{namespace}/activities/unpause": { "post": { "summary": "UnpauseActivity unpauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be unpaused.", - "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n'reset_attempts': the number of attempts will be reset.\n'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nDeprecated. See UnpauseActivityExecution.", + "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n'reset_attempts': the number of attempts will be reset.\n'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nThis API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and\nstructured to work well for standalone activities.", "operationId": "UnpauseActivity", "responses": { "200": { @@ -5434,7 +4889,7 @@ }, "/namespaces/{namespace}/activities/update-options": { "post": { - "summary": "UpdateActivityOptions is called by the client to update the options of an activity by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be updated.\nDeprecated. See UpdateActivityExecutionOptions.", + "summary": "UpdateActivityOptions is called by the client to update the options of an activity by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be updated.\nThis API will be deprecated soon and replaced with a newer UpdateActivityExecutionOptions that is better named and\nstructured to work well for standalone activities.", "operationId": "UpdateActivityOptions", "responses": { "200": { @@ -7950,215 +7405,15 @@ ] } }, - "/namespaces/{namespace}/workflows/{execution.workflowId}/history-reverse": { - "get": { - "summary": "GetWorkflowExecutionHistoryReverse returns the history of specified workflow execution in reverse\norder (starting from last event). Fails with`NotFound` if the specified workflow execution is\nunknown to the service.", - "operationId": "GetWorkflowExecutionHistoryReverse", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1GetWorkflowExecutionHistoryReverseResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "execution.workflowId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "execution.runId", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "maximumPageSize", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "nextPageToken", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/namespaces/{namespace}/workflows/{execution.workflowId}/query/{query.queryType}": { - "post": { - "summary": "QueryWorkflow requests a query be executed for a specified workflow execution.", - "operationId": "QueryWorkflow", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1QueryWorkflowResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "execution.workflowId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "query.queryType", - "description": "The workflow-author-defined identifier of the query. Typically a function name.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceQueryWorkflowBody" - } - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/namespaces/{namespace}/workflows/{execution.workflowId}/trigger-rule": { - "post": { - "summary": "TriggerWorkflowRule allows to:\n * trigger existing rule for a specific workflow execution;\n * trigger rule for a specific workflow execution without creating a rule;\nThis is useful for one-off operations.", - "operationId": "TriggerWorkflowRule", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1TriggerWorkflowRuleResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "execution.workflowId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceTriggerWorkflowRuleBody" - } - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/namespaces/{namespace}/workflows/{workflowExecution.workflowId}/cancel": { - "post": { - "summary": "RequestCancelWorkflowExecution is called by workers when they want to request cancellation of\na workflow execution.", - "description": "This results in a new `WORKFLOW_EXECUTION_CANCEL_REQUESTED` event being written to the\nworkflow history and a new workflow task created for the workflow. It returns success if the requested\nworkflow is already closed. It fails with 'NotFound' if the requested workflow doesn't exist.", - "operationId": "RequestCancelWorkflowExecution", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1RequestCancelWorkflowExecutionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "workflowExecution.workflowId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceRequestCancelWorkflowExecutionBody" - } - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/namespaces/{namespace}/workflows/{workflowExecution.workflowId}/reset": { - "post": { - "summary": "ResetWorkflowExecution will reset an existing workflow execution to a specified\n`WORKFLOW_TASK_COMPLETED` event (exclusive). It will immediately terminate the current\nexecution instance. \"Exclusive\" means the identified completed event itself is not replayed\nin the reset history; the preceding `WORKFLOW_TASK_STARTED` event remains and will be marked as failed\nimmediately, and a new workflow task will be scheduled to retry it.", - "operationId": "ResetWorkflowExecution", + "/namespaces/{namespace}/workflows/{execution.workflowId}/history-reverse": { + "get": { + "summary": "GetWorkflowExecutionHistoryReverse returns the history of specified workflow execution in reverse\norder (starting from last event). Fails with`NotFound` if the specified workflow execution is\nunknown to the service.", + "operationId": "GetWorkflowExecutionHistoryReverse", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ResetWorkflowExecutionResponse" + "$ref": "#/definitions/v1GetWorkflowExecutionHistoryReverseResponse" } }, "default": { @@ -8176,18 +7431,30 @@ "type": "string" }, { - "name": "workflowExecution.workflowId", + "name": "execution.workflowId", "in": "path", "required": true, "type": "string" }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WorkflowServiceResetWorkflowExecutionBody" - } + "name": "execution.runId", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "maximumPageSize", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "nextPageToken", + "in": "query", + "required": false, + "type": "string", + "format": "byte" } ], "tags": [ @@ -8195,16 +7462,15 @@ ] } }, - "/namespaces/{namespace}/workflows/{workflowExecution.workflowId}/signal/{signalName}": { + "/namespaces/{namespace}/workflows/{execution.workflowId}/query/{query.queryType}": { "post": { - "summary": "SignalWorkflowExecution is used to send a signal to a running workflow execution.", - "description": "This results in a `WORKFLOW_EXECUTION_SIGNALED` event recorded in the history and a workflow\ntask being created for the execution.", - "operationId": "SignalWorkflowExecution", + "summary": "QueryWorkflow requests a query be executed for a specified workflow execution.", + "operationId": "QueryWorkflow", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1SignalWorkflowExecutionResponse" + "$ref": "#/definitions/v1QueryWorkflowResponse" } }, "default": { @@ -8222,14 +7488,14 @@ "type": "string" }, { - "name": "workflowExecution.workflowId", + "name": "execution.workflowId", "in": "path", "required": true, "type": "string" }, { - "name": "signalName", - "description": "The workflow author-defined name of the signal to send to the workflow", + "name": "query.queryType", + "description": "The workflow-author-defined identifier of the query. Typically a function name.", "in": "path", "required": true, "type": "string" @@ -8239,7 +7505,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceSignalWorkflowExecutionBody" + "$ref": "#/definitions/WorkflowServiceQueryWorkflowBody" } } ], @@ -8248,15 +7514,15 @@ ] } }, - "/namespaces/{namespace}/workflows/{workflowExecution.workflowId}/terminate": { + "/namespaces/{namespace}/workflows/{execution.workflowId}/trigger-rule": { "post": { - "summary": "TerminateWorkflowExecution terminates an existing workflow execution by recording a\n`WORKFLOW_EXECUTION_TERMINATED` event in the history and immediately terminating the\nexecution instance.", - "operationId": "TerminateWorkflowExecution", + "summary": "TriggerWorkflowRule allows to:\n * trigger existing rule for a specific workflow execution;\n * trigger rule for a specific workflow execution without creating a rule;\nThis is useful for one-off operations.", + "operationId": "TriggerWorkflowRule", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1TerminateWorkflowExecutionResponse" + "$ref": "#/definitions/v1TriggerWorkflowRuleResponse" } }, "default": { @@ -8274,7 +7540,7 @@ "type": "string" }, { - "name": "workflowExecution.workflowId", + "name": "execution.workflowId", "in": "path", "required": true, "type": "string" @@ -8284,7 +7550,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceTerminateWorkflowExecutionBody" + "$ref": "#/definitions/WorkflowServiceTriggerWorkflowRuleBody" } } ], @@ -8293,15 +7559,16 @@ ] } }, - "/namespaces/{namespace}/workflows/{workflowExecution.workflowId}/update-options": { + "/namespaces/{namespace}/workflows/{workflowExecution.workflowId}/cancel": { "post": { - "summary": "UpdateWorkflowExecutionOptions partially updates the WorkflowExecutionOptions of an existing workflow execution.", - "operationId": "UpdateWorkflowExecutionOptions", + "summary": "RequestCancelWorkflowExecution is called by workers when they want to request cancellation of\na workflow execution.", + "description": "This results in a new `WORKFLOW_EXECUTION_CANCEL_REQUESTED` event being written to the\nworkflow history and a new workflow task created for the workflow. It returns success if the requested\nworkflow is already closed. It fails with 'NotFound' if the requested workflow doesn't exist.", + "operationId": "RequestCancelWorkflowExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UpdateWorkflowExecutionOptionsResponse" + "$ref": "#/definitions/v1RequestCancelWorkflowExecutionResponse" } }, "default": { @@ -8314,7 +7581,6 @@ "parameters": [ { "name": "namespace", - "description": "The namespace name of the target Workflow.", "in": "path", "required": true, "type": "string" @@ -8330,7 +7596,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceUpdateWorkflowExecutionOptionsBody" + "$ref": "#/definitions/WorkflowServiceRequestCancelWorkflowExecutionBody" } } ], @@ -8339,15 +7605,15 @@ ] } }, - "/namespaces/{namespace}/workflows/{workflowExecution.workflowId}/update/{request.input.name}": { + "/namespaces/{namespace}/workflows/{workflowExecution.workflowId}/reset": { "post": { - "summary": "Invokes the specified Update function on user Workflow code.", - "operationId": "UpdateWorkflowExecution", + "summary": "ResetWorkflowExecution will reset an existing workflow execution to a specified\n`WORKFLOW_TASK_COMPLETED` event (exclusive). It will immediately terminate the current\nexecution instance. \"Exclusive\" means the identified completed event itself is not replayed\nin the reset history; the preceding `WORKFLOW_TASK_STARTED` event remains and will be marked as failed\nimmediately, and a new workflow task will be scheduled to retry it.", + "operationId": "ResetWorkflowExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UpdateWorkflowExecutionResponse" + "$ref": "#/definitions/v1ResetWorkflowExecutionResponse" } }, "default": { @@ -8360,7 +7626,6 @@ "parameters": [ { "name": "namespace", - "description": "The namespace name of the target Workflow.", "in": "path", "required": true, "type": "string" @@ -8371,19 +7636,12 @@ "required": true, "type": "string" }, - { - "name": "request.input.name", - "description": "The name of the Update handler to invoke on the target Workflow.", - "in": "path", - "required": true, - "type": "string" - }, { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceUpdateWorkflowExecutionBody" + "$ref": "#/definitions/WorkflowServiceResetWorkflowExecutionBody" } } ], @@ -8392,16 +7650,16 @@ ] } }, - "/namespaces/{namespace}/workflows/{workflowId}": { + "/namespaces/{namespace}/workflows/{workflowExecution.workflowId}/signal/{signalName}": { "post": { - "summary": "StartWorkflowExecution starts a new workflow execution.", - "description": "It will create the execution with a `WORKFLOW_EXECUTION_STARTED` event in its history and\nalso schedule the first workflow task. Returns `WorkflowExecutionAlreadyStarted`, if an\ninstance already exists with same workflow id.", - "operationId": "StartWorkflowExecution", + "summary": "SignalWorkflowExecution is used to send a signal to a running workflow execution.", + "description": "This results in a `WORKFLOW_EXECUTION_SIGNALED` event recorded in the history and a workflow\ntask being created for the execution.", + "operationId": "SignalWorkflowExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1StartWorkflowExecutionResponse" + "$ref": "#/definitions/v1SignalWorkflowExecutionResponse" } }, "default": { @@ -8419,7 +7677,14 @@ "type": "string" }, { - "name": "workflowId", + "name": "workflowExecution.workflowId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "signalName", + "description": "The workflow author-defined name of the signal to send to the workflow", "in": "path", "required": true, "type": "string" @@ -8429,7 +7694,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceStartWorkflowExecutionBody" + "$ref": "#/definitions/WorkflowServiceSignalWorkflowExecutionBody" } } ], @@ -8438,16 +7703,15 @@ ] } }, - "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/pause": { + "/namespaces/{namespace}/workflows/{workflowExecution.workflowId}/terminate": { "post": { - "summary": "PauseActivityExecution pauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be paused", - "description": "Pausing an activity means:\n- If the activity is currently waiting for a retry or is running and subsequently fails,\n it will not be rescheduled until it is unpaused.\n- If the activity is already paused, calling this method will have no effect.\n- If the activity is running and finishes successfully, the activity will be completed.\n- If the activity is running and finishes with failure:\n * if there is no retry left - the activity will be completed.\n * if there are more retries left - the activity will be paused.\nFor long-running activities:\n- activities in paused state will send a cancellation with \"activity_paused\" set to 'true' in response to 'RecordActivityTaskHeartbeat'.\n- The activity should respond to the cancellation accordingly.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type", - "operationId": "PauseActivityExecution3", + "summary": "TerminateWorkflowExecution terminates an existing workflow execution by recording a\n`WORKFLOW_EXECUTION_TERMINATED` event in the history and immediately terminating the\nexecution instance.", + "operationId": "TerminateWorkflowExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1PauseActivityExecutionResponse" + "$ref": "#/definitions/v1TerminateWorkflowExecutionResponse" } }, "default": { @@ -8460,21 +7724,12 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "workflowId", - "description": "If provided, pause a workflow activity (or activities) for the given workflow ID.\nIf empty, target a standalone activity.", "in": "path", "required": true, "type": "string" }, { - "name": "activityId", - "description": "Pause an activity with this ID. Must be provided for a standalone activity.\nMutually exclusive with workflow_activity_type.", + "name": "workflowExecution.workflowId", "in": "path", "required": true, "type": "string" @@ -8484,7 +7739,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServicePauseActivityExecutionBody" + "$ref": "#/definitions/WorkflowServiceTerminateWorkflowExecutionBody" } } ], @@ -8493,16 +7748,15 @@ ] } }, - "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/reset": { + "/namespaces/{namespace}/workflows/{workflowExecution.workflowId}/update-options": { "post": { - "summary": "ResetActivityExecution resets the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be reset.", - "description": "Resetting an activity means:\n* number of attempts will be reset to 0.\n* activity timeouts will be reset.\n* if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided:\n it will be scheduled immediately (* see 'jitter' flag),\n\nFlags:\n\n'jitter': the activity will be scheduled at a random time within the jitter duration.\nIf the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided.\n'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset.\n'keep_paused': if the activity is paused, it will remain paused.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type.", - "operationId": "ResetActivityExecution3", + "summary": "UpdateWorkflowExecutionOptions partially updates the WorkflowExecutionOptions of an existing workflow execution.", + "operationId": "UpdateWorkflowExecutionOptions", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ResetActivityExecutionResponse" + "$ref": "#/definitions/v1UpdateWorkflowExecutionOptionsResponse" } }, "default": { @@ -8515,21 +7769,13 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "workflowId", - "description": "If provided, reset a workflow activity (or activities) for the given workflow ID.\nIf empty, target a standalone activity.", + "description": "The namespace name of the target Workflow.", "in": "path", "required": true, "type": "string" }, { - "name": "activityId", - "description": "Reset an activity with this ID. Must be provided for a standalone activity.\nMutually exclusive with workflow_activity_type and all_workflow_activities.", + "name": "workflowExecution.workflowId", "in": "path", "required": true, "type": "string" @@ -8539,7 +7785,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceResetActivityExecutionBody" + "$ref": "#/definitions/WorkflowServiceUpdateWorkflowExecutionOptionsBody" } } ], @@ -8548,16 +7794,15 @@ ] } }, - "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/unpause": { + "/namespaces/{namespace}/workflows/{workflowExecution.workflowId}/update/{request.input.name}": { "post": { - "summary": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be unpaused.", - "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n'reset_attempts': the number of attempts will be reset.\n'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type", - "operationId": "UnpauseActivityExecution3", + "summary": "Invokes the specified Update function on user Workflow code.", + "operationId": "UpdateWorkflowExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UnpauseActivityExecutionResponse" + "$ref": "#/definitions/v1UpdateWorkflowExecutionResponse" } }, "default": { @@ -8570,21 +7815,20 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity.", + "description": "The namespace name of the target Workflow.", "in": "path", "required": true, "type": "string" }, { - "name": "workflowId", - "description": "If provided, unpause a workflow activity (or activities) for the given workflow ID.\nIf empty, target a standalone activity.", + "name": "workflowExecution.workflowId", "in": "path", "required": true, "type": "string" }, { - "name": "activityId", - "description": "Unpause an activity with this ID. Must be provided for a standalone activity.\nMutually exclusive with workflow_activity_type and all_workflow_activities.", + "name": "request.input.name", + "description": "The name of the Update handler to invoke on the target Workflow.", "in": "path", "required": true, "type": "string" @@ -8594,7 +7838,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceUnpauseActivityExecutionBody" + "$ref": "#/definitions/WorkflowServiceUpdateWorkflowExecutionBody" } } ], @@ -8603,15 +7847,16 @@ ] } }, - "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/update-options": { + "/namespaces/{namespace}/workflows/{workflowId}": { "post": { - "summary": "UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be updated.", - "operationId": "UpdateActivityExecutionOptions3", + "summary": "StartWorkflowExecution starts a new workflow execution.", + "description": "It will create the execution with a `WORKFLOW_EXECUTION_STARTED` event in its history and\nalso schedule the first workflow task. Returns `WorkflowExecutionAlreadyStarted`, if an\ninstance already exists with same workflow id.", + "operationId": "StartWorkflowExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UpdateActivityExecutionOptionsResponse" + "$ref": "#/definitions/v1StartWorkflowExecutionResponse" } }, "default": { @@ -8624,21 +7869,12 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity", "in": "path", "required": true, "type": "string" }, { "name": "workflowId", - "description": "If provided, update options for a workflow activity (or activities) for the given workflow ID. If empty, target a\nstandalone activity.", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "activityId", - "description": "Update options for an activity with this ID. Must be provided for a standalone activity.\nMutually exclusive with workflow_activity_type and all_workflow_activities.", "in": "path", "required": true, "type": "string" @@ -8648,7 +7884,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceUpdateActivityExecutionOptionsBody" + "$ref": "#/definitions/WorkflowServiceStartWorkflowExecutionBody" } } ], @@ -9057,6 +8293,19 @@ } } }, + "PauseInfoManual": { + "type": "object", + "properties": { + "identity": { + "type": "string", + "description": "The identity of the actor that paused the activity." + }, + "reason": { + "type": "string", + "description": "Reason for pausing the activity." + } + } + }, "PauseInfoRule": { "type": "object", "properties": { @@ -9074,6 +8323,24 @@ } } }, + "PendingActivityInfoPauseInfo": { + "type": "object", + "properties": { + "pauseTime": { + "type": "string", + "format": "date-time", + "description": "The time when the activity was paused." + }, + "manual": { + "$ref": "#/definitions/PauseInfoManual", + "title": "activity was paused by the manual intervention" + }, + "rule": { + "$ref": "#/definitions/PauseInfoRule", + "title": "activity was paused by the rule" + } + } + }, "PostResetOperationSignalWorkflow": { "type": "object", "properties": { @@ -9552,28 +8819,6 @@ "type": "string", "description": "Reason to pause the activity." } - }, - "description": "Deprecated. See PauseActivityExecutionRequest." - }, - "WorkflowServicePauseActivityExecutionBody": { - "type": "object", - "properties": { - "runId": { - "type": "string", - "description": "Run ID of the workflow or standalone activity." - }, - "identity": { - "type": "string", - "description": "The identity of the client who initiated this request." - }, - "workflowActivityType": { - "type": "string", - "description": "Pause all pending activities of this type.\nOnly available if workflow_id is provided.\nMutually exclusive with activity_id.\n\nNote: Experimental - the behavior of pausing by activity type might change or be removed in a future release." - }, - "reason": { - "type": "string", - "description": "Reason to pause the activity." - } } }, "WorkflowServicePauseWorkflowExecutionBody": { @@ -9752,62 +8997,24 @@ "type": "object", "properties": { "execution": { - "$ref": "#/definitions/v1WorkflowExecution", - "title": "Execution info of the workflow which scheduled this activity" - }, - "identity": { - "type": "string", - "description": "The identity of the client who initiated this request." - }, - "id": { - "type": "string", - "description": "Only activity with this ID will be reset." - }, - "type": { - "type": "string", - "description": "Reset all running activities with of this type." - }, - "matchAll": { - "type": "boolean", - "description": "Reset all running activities." - }, - "resetHeartbeat": { - "type": "boolean", - "description": "Indicates that activity should reset heartbeat details.\nThis flag will be applied only to the new instance of the activity." - }, - "keepPaused": { - "type": "boolean", - "title": "If activity is paused, it will remain paused after reset" - }, - "jitter": { - "type": "string", - "title": "If set, and activity is in backoff, the activity will start at a random time within the specified jitter duration.\n(unless it is paused and keep_paused is set)" - }, - "restoreOriginalOptions": { - "type": "boolean", - "description": "If set, the activity options will be restored to the defaults.\nDefault options are then options activity was created with.\nThey are part of the first SCHEDULE event." - } - }, - "description": "NOTE: keep in sync with temporal.api.batch.v1.BatchOperationResetActivities\nDeprecated. See ResetActivityExecutionRequest." - }, - "WorkflowServiceResetActivityExecutionBody": { - "type": "object", - "properties": { - "runId": { - "type": "string", - "description": "Run ID of the workflow or standalone activity." + "$ref": "#/definitions/v1WorkflowExecution", + "title": "Execution info of the workflow which scheduled this activity" }, "identity": { "type": "string", "description": "The identity of the client who initiated this request." }, - "workflowActivityType": { + "id": { + "type": "string", + "description": "Only activity with this ID will be reset." + }, + "type": { "type": "string", - "description": "Reset all pending workflow activities of this type.\nOnly available if workflow_id is provided.\nMutually exclusive with activity_id and all_workflow_activities.\n\nNote: Experimental - the behavior of resetting by activity type may change or be removed in a future release." + "description": "Reset all running activities with of this type." }, - "allWorkflowActivities": { + "matchAll": { "type": "boolean", - "description": "Reset all pending workflow activities.\nOnly available if workflow_id is provided.\nMutually exclusive with activity_id and workflow_activity_type.\n\nNote: Experimental - the behavior of resetting all activities may change or be removed in a future release." + "description": "Reset all running activities." }, "resetHeartbeat": { "type": "boolean", @@ -9823,10 +9030,10 @@ }, "restoreOriginalOptions": { "type": "boolean", - "description": "If set, the activity options will be restored to the defaults.\nDefault options are then options activity was originally created with.\nFor workflow activities the original options are restored from first ActivityTaskScheduled event." + "description": "If set, the activity options will be restored to the defaults.\nDefault options are then options activity was created with.\nThey are part of the first SCHEDULE event." } }, - "title": "TODO: update batch\nNOTE: keep in sync with temporal.api.batch.v1.BatchOperationResetActivities" + "title": "NOTE: keep in sync with temporal.api.batch.v1.BatchOperationResetActivities" }, "WorkflowServiceResetWorkflowExecutionBody": { "type": "object", @@ -10355,10 +9562,6 @@ "$ref": "#/definitions/v1ActivityIdConflictPolicy", "description": "Defines how to resolve an activity id conflict with a *running* activity.\nThe default policy is ACTIVITY_ID_CONFLICT_POLICY_FAIL." }, - "memo": { - "$ref": "#/definitions/v1Memo", - "description": "Arbitrary structured data that can be attached to the activity execution and made available via the list and\ndescribe APIs." - }, "searchAttributes": { "$ref": "#/definitions/v1SearchAttributes", "description": "Search attributes for indexing." @@ -10367,37 +9570,13 @@ "$ref": "#/definitions/v1Header", "description": "Header for context propagation and tracing purposes." }, - "requestEagerExecution": { - "type": "boolean", - "description": "Request to get the first activity task inline in the response bypassing matching service and worker polling.\nIf set to `true` the caller is expected to have a worker available and capable of processing the task.\nThe returned task will be marked as started and is expected to be completed by the specified\n`schedule_to_close_timeout`." - }, - "completionCallbacks": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1Callback" - }, - "description": "Callbacks to be called by the server when this activity reaches a terminal status.\nCallback addresses must be whitelisted in the server's dynamic configuration." - }, "userMetadata": { "$ref": "#/definitions/v1UserMetadata", "description": "Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity." }, - "links": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/apicommonv1Link" - }, - "description": "Links to be associated with the activity." - }, - "onConflictOptions": { - "$ref": "#/definitions/apiactivityv1OnConflictOptions", - "description": "Defines actions to be done to the existing running activity when ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING is used. If not\nset or empty, it won't do anything to the existing running activity." - }, "priority": { "$ref": "#/definitions/v1Priority", - "title": "Priority metadata" + "description": "Priority metadata." } } }, @@ -10552,7 +9731,7 @@ "description": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.\nTo unset the override after the workflow is running, use UpdateWorkflowExecutionOptions." }, "onConflictOptions": { - "$ref": "#/definitions/apiworkflowv1OnConflictOptions", + "$ref": "#/definitions/v1OnConflictOptions", "description": "Defines actions to be done to the existing running workflow when the conflict policy\nWORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING is used. If not set (ie., nil value) or set to a\nempty object (ie., all options with default value), it won't do anything to the existing\nrunning workflow. If set, it will add a history event to the running workflow." }, "priority": { @@ -10692,42 +9871,7 @@ "type": "string", "description": "If set, the activity will start at a random time within the specified jitter duration." } - }, - "description": "Deprecated. See UnpauseActivityExecutionRequest." - }, - "WorkflowServiceUnpauseActivityExecutionBody": { - "type": "object", - "properties": { - "runId": { - "type": "string", - "description": "Run ID of the workflow or standalone activity." - }, - "identity": { - "type": "string", - "description": "The identity of the client who initiated this request." - }, - "workflowActivityType": { - "type": "string", - "description": "Unpause all currently paused workflow activities of this type.\nOnly available if workflow_id is provided.\nMutually exclusive with activity_id and all_workflow_activities.\n\nNote: Experimental - the behavior of unpausing by activity type may change or be removed in a future release." - }, - "allWorkflowActivities": { - "type": "boolean", - "description": "Unpause all paused workflow activities.\nOnly available if workflow_id is provided.\nMutually exclusive with activity_id and workflow_activity_type.\n\nNote: Experimental - the behavior of unpausing all activities may change or be removed in a future release." - }, - "resetAttempts": { - "type": "boolean", - "description": "Providing this flag will also reset the number of attempts." - }, - "resetHeartbeat": { - "type": "boolean", - "description": "Providing this flag will also reset the heartbeat details." - }, - "jitter": { - "type": "string", - "description": "If set, the activity will start at a random time within the specified jitter duration." - } - }, - "title": "TODO: update batch" + } }, "WorkflowServiceUnpauseWorkflowExecutionBody": { "type": "object", @@ -10750,51 +9894,6 @@ } } }, - "WorkflowServiceUpdateActivityExecutionOptionsBody": { - "type": "object", - "properties": { - "runId": { - "type": "string", - "description": "Run ID of the workflow or standalone activity." - }, - "identity": { - "type": "string", - "title": "The identity of the client who initiated this request" - }, - "workflowActivityType": { - "type": "string", - "description": "Update all pending workflow activities of this type.\nOnly available if workflow_id is provided.\nMutually exclusive with activity_id and all_workflow_activities.\n\nNote: Experimental - the behavior of updating by activity type may change or be removed in a future release." - }, - "allWorkflowActivities": { - "type": "boolean", - "description": "Update all pending workflow activities.\nOnly available if workflow_id is provided.\nMutually exclusive with activity_id and workflow_activity_type.\n\nNote: Experimental - the behavior of updating all activities may change or be removed in a future release." - }, - "restoreOriginal": { - "type": "boolean", - "description": "If set, the activity options will be restored to the options the activity was originally\ncreated with. For workflow activities the original options are restored from first\nActivityTaskScheduled event. Mutually exclusive with the activity options fields below." - }, - "taskQueue": { - "$ref": "#/definitions/v1TaskQueue", - "description": "Activity options. Mutually exclusive with restore_original." - }, - "scheduleToCloseTimeout": { - "type": "string" - }, - "scheduleToStartTimeout": { - "type": "string" - }, - "startToCloseTimeout": { - "type": "string" - }, - "heartbeatTimeout": { - "type": "string" - }, - "retryPolicy": { - "$ref": "#/definitions/v1RetryPolicy" - } - }, - "title": "TODO: update batch\nNOTE: keep in sync with temporal.api.batch.v1.BatchOperationUpdateActivityOptions" - }, "WorkflowServiceUpdateActivityOptionsBody": { "type": "object", "properties": { @@ -10831,7 +9930,7 @@ "description": "If set, the activity options will be restored to the default.\nDefault options are then options activity was created with.\nThey are part of the first SCHEDULE event.\nThis flag cannot be combined with any other option; if you supply\nrestore_original together with other options, the request will be rejected." } }, - "description": "NOTE: keep in sync with temporal.api.batch.v1.BatchOperationUpdateActivityOptions\nDeprecated. Use UpdateActivityExecutionOptionsRequest." + "title": "NOTE: keep in sync with temporal.api.batch.v1.BatchOperationUpdateActivityOptions" }, "WorkflowServiceUpdateNamespaceBody": { "type": "object", @@ -11048,24 +10147,6 @@ }, "description": "Keep the parameters in sync with:\n - temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions.\n - temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions." }, - "apiactivityv1OnConflictOptions": { - "type": "object", - "properties": { - "attachRequestId": { - "type": "boolean", - "description": "Attaches the request ID to the running activity." - }, - "attachCompletionCallbacks": { - "type": "boolean", - "description": "Attaches the completion callbacks to the running activity." - }, - "attachLinks": { - "type": "boolean", - "description": "Attaches the links to the running activity." - } - }, - "description": "When StartActivityExecution uses the ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING and there is already an existing running\nactivity, OnConflictOptions defines actions to be taken on the existing running activity, updating its state." - }, "apicommonv1Link": { "type": "object", "properties": { @@ -11217,24 +10298,6 @@ }, "description": "The client request that triggers a Workflow Update." }, - "apiworkflowv1OnConflictOptions": { - "type": "object", - "properties": { - "attachRequestId": { - "type": "boolean", - "description": "Attaches the request ID to the running workflow." - }, - "attachCompletionCallbacks": { - "type": "boolean", - "description": "Attaches the completion callbacks to the running workflow." - }, - "attachLinks": { - "type": "boolean", - "description": "Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event." - } - }, - "description": "When StartWorkflowExecution uses the conflict policy WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING and\nthere is already an existing running workflow, OnConflictOptions defines actions to be taken on\nthe existing running workflow. In this case, it will create a WorkflowExecutionOptionsUpdatedEvent\nhistory event in the running workflow with the changes requested in this object." - }, "protobufAny": { "type": "object", "properties": { @@ -11304,7 +10367,7 @@ "attempt": { "type": "integer", "format": "int32", - "description": "The attempt this activity is currently on.\nIncremented each time a new attempt is started.\nTODO: Confirm if this is on scheduled or started." + "description": "The attempt this activity is currently on.\nIncremented each time a new attempt is started.\nTODO(dandavison): Confirm if this is on scheduled or started." }, "maximumAttempts": { "type": "integer", @@ -11364,68 +10427,17 @@ "header": { "$ref": "#/definitions/v1Header" }, - "eagerExecutionRequested": { - "type": "boolean", - "description": "Whether the activity was started with a request_eager_execution flag set to `true`, indicating that the first\ntask was delivered inline in the start response, bypassing matching." - }, - "completionCallbacks": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1Callback" - }, - "description": "Callbacks to be called by the server when this activity reaches a terminal status.\nCallback addresses must be whitelisted in the server's dynamic configuration." - }, "userMetadata": { "$ref": "#/definitions/v1UserMetadata", "description": "Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity." }, - "links": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/apicommonv1Link" - }, - "description": "Links to be associated with the activity." - }, "canceledReason": { "type": "string", "description": "Set if activity cancelation was requested." - }, - "pauseInfo": { - "$ref": "#/definitions/v1ActivityExecutionInfoPauseInfo" } }, "description": "Information about a standalone activity." }, - "v1ActivityExecutionInfoPauseInfo": { - "type": "object", - "properties": { - "pauseTime": { - "type": "string", - "format": "date-time", - "description": "The time when the activity was paused." - }, - "manual": { - "$ref": "#/definitions/v1ActivityExecutionInfoPauseInfoManual", - "description": "The activity was paused by direct API invocation." - } - }, - "title": "TODO: Move this to a common package?" - }, - "v1ActivityExecutionInfoPauseInfoManual": { - "type": "object", - "properties": { - "identity": { - "type": "string", - "description": "The identity of the actor that paused the activity." - }, - "reason": { - "type": "string", - "description": "Reason for pausing the activity." - } - } - }, "v1ActivityExecutionListInfo": { "type": "object", "properties": { @@ -11528,11 +10540,10 @@ "enum": [ "ACTIVITY_ID_CONFLICT_POLICY_UNSPECIFIED", "ACTIVITY_ID_CONFLICT_POLICY_FAIL", - "ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING", - "ACTIVITY_ID_CONFLICT_POLICY_TERMINATE_EXISTING" + "ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING" ], "default": "ACTIVITY_ID_CONFLICT_POLICY_UNSPECIFIED", - "description": "Defines what to do when trying to start an activity with the same ID as a *running* activity.\nNote that it is *never* valid to have two running instances of the same activity ID.\n\nSee `ActivityIdReusePolicy` for handling activity ID duplication with a *closed* activity.\n\n - ACTIVITY_ID_CONFLICT_POLICY_FAIL: Don't start a new activity; instead return `ActivityExecutionAlreadyStarted` error.\n - ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING: Don't start a new activity; instead return a handle for the running activity.\n - ACTIVITY_ID_CONFLICT_POLICY_TERMINATE_EXISTING: Terminate the running activity before starting a new one." + "description": "Defines what to do when trying to start an activity with the same ID as a *running* activity.\nNote that it is *never* valid to have two running instances of the same activity ID.\n\nSee `ActivityIdReusePolicy` for handling activity ID duplication with a *closed* activity.\n\n - ACTIVITY_ID_CONFLICT_POLICY_FAIL: Don't start a new activity; instead return `ActivityExecutionAlreadyStarted` error.\n - ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING: Don't start a new activity; instead return a handle for the running activity." }, "v1ActivityIdReusePolicy": { "type": "string", @@ -15094,6 +14105,24 @@ }, "description": "Nexus operation timed out." }, + "v1OnConflictOptions": { + "type": "object", + "properties": { + "attachRequestId": { + "type": "boolean", + "description": "Attaches the request ID to the running workflow." + }, + "attachCompletionCallbacks": { + "type": "boolean", + "description": "Attaches the completion callbacks to the running workflow." + }, + "attachLinks": { + "type": "boolean", + "description": "Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event." + } + }, + "description": "When StartWorkflowExecution uses the conflict policy WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING and\nthere is already an existing running workflow, OnConflictOptions defines actions to be taken on\nthe existing running workflow. In this case, it will create a WorkflowExecutionOptionsUpdatedEvent\nhistory event in the running workflow with the changes requested in this object." + }, "v1Outcome": { "type": "object", "properties": { @@ -15121,12 +14150,8 @@ "v1PatchScheduleResponse": { "type": "object" }, - "v1PauseActivityExecutionResponse": { - "type": "object" - }, "v1PauseActivityResponse": { - "type": "object", - "description": "Deprecated. See PauseActivityExecutionResponse." + "type": "object" }, "v1PauseWorkflowExecutionResponse": { "type": "object", @@ -15241,7 +14266,7 @@ "title": "Priority metadata" }, "pauseInfo": { - "$ref": "#/definitions/v1PendingActivityInfoPauseInfo" + "$ref": "#/definitions/PendingActivityInfoPauseInfo" }, "activityOptions": { "$ref": "#/definitions/v1ActivityOptions", @@ -15249,37 +14274,6 @@ } } }, - "v1PendingActivityInfoPauseInfo": { - "type": "object", - "properties": { - "pauseTime": { - "type": "string", - "format": "date-time", - "description": "The time when the activity was paused." - }, - "manual": { - "$ref": "#/definitions/v1PendingActivityInfoPauseInfoManual", - "title": "activity was paused by the manual intervention" - }, - "rule": { - "$ref": "#/definitions/PauseInfoRule", - "title": "activity was paused by the rule" - } - } - }, - "v1PendingActivityInfoPauseInfoManual": { - "type": "object", - "properties": { - "identity": { - "type": "string", - "description": "The identity of the actor that paused the activity." - }, - "reason": { - "type": "string", - "description": "Reason for pausing the activity." - } - } - }, "v1PendingActivityState": { "type": "string", "enum": [ @@ -16103,12 +15097,8 @@ }, "description": "RequestIdInfo contains details of a request ID." }, - "v1ResetActivityExecutionResponse": { - "type": "object" - }, "v1ResetActivityResponse": { - "type": "object", - "description": "Deprecated. See ResetActivityExecutionResponse." + "type": "object" }, "v1ResetOptions": { "type": "object", @@ -17097,14 +16087,6 @@ "started": { "type": "boolean", "description": "If true, a new activity was started." - }, - "eagerTask": { - "$ref": "#/definitions/v1PollActivityTaskQueueResponse", - "description": "When `request_eager_execution` is set on the `StartActivityExecutionRequest`, the server will return the first\nactivity task to be eagerly executed.\nThe caller is expected to have a worker available to process the task." - }, - "link": { - "$ref": "#/definitions/apicommonv1Link", - "description": "Link to the activity." } } }, @@ -17486,7 +16468,7 @@ "description": "If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.\nTo unset the override after the workflow is running, use UpdateWorkflowExecutionOptions." }, "onConflictOptions": { - "$ref": "#/definitions/apiworkflowv1OnConflictOptions", + "$ref": "#/definitions/v1OnConflictOptions", "description": "Defines actions to be done to the existing running workflow when the conflict policy\nWORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING is used. If not set (ie., nil value) or set to a\nempty object (ie., all options with default value), it won't do anything to the existing\nrunning workflow. If set, it will add a history event to the running workflow." }, "priority": { @@ -18002,12 +16984,8 @@ } } }, - "v1UnpauseActivityExecutionResponse": { - "type": "object" - }, "v1UnpauseActivityResponse": { - "type": "object", - "description": "Deprecated. See UnpauseActivityExecutionResponse." + "type": "object" }, "v1UnpauseWorkflowExecutionResponse": { "type": "object", @@ -18025,30 +17003,6 @@ } } }, - "v1UpdateActivityExecutionOptionsResponse": { - "type": "object", - "properties": { - "taskQueue": { - "$ref": "#/definitions/v1TaskQueue", - "description": "Activity options after the update." - }, - "scheduleToCloseTimeout": { - "type": "string" - }, - "scheduleToStartTimeout": { - "type": "string" - }, - "startToCloseTimeout": { - "type": "string" - }, - "heartbeatTimeout": { - "type": "string" - }, - "retryPolicy": { - "$ref": "#/definitions/v1RetryPolicy" - } - } - }, "v1UpdateActivityOptionsResponse": { "type": "object", "properties": { @@ -18056,8 +17010,7 @@ "$ref": "#/definitions/v1ActivityOptions", "title": "Activity options after an update" } - }, - "description": "Deprecated. See UpdateActivityExecutionOptionsResponse." + } }, "v1UpdateAdmittedEventOrigin": { "type": "string", diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index d77162c19..d42c34400 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -93,190 +93,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /api/v1/namespaces/activities/{activityId}/pause: - post: - tags: - - WorkflowService - description: |- - PauseActivityExecution pauses the execution of an activity specified by its ID or type. - If there are multiple pending activities of the provided type - all of them will be paused - - Pausing an activity means: - - If the activity is currently waiting for a retry or is running and subsequently fails, - it will not be rescheduled until it is unpaused. - - If the activity is already paused, calling this method will have no effect. - - If the activity is running and finishes successfully, the activity will be completed. - - If the activity is running and finishes with failure: - * if there is no retry left - the activity will be completed. - * if there are more retries left - the activity will be paused. - For long-running activities: - - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. - - The activity should respond to the cancellation accordingly. - - Returns a `NotFound` error if there is no pending activity with the provided ID or type - operationId: PauseActivityExecution - parameters: - - name: activityId - in: path - description: |- - Pause an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PauseActivityExecutionRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/PauseActivityExecutionResponse' - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /api/v1/namespaces/activities/{activityId}/reset: - post: - tags: - - WorkflowService - description: |- - ResetActivityExecution resets the execution of an activity specified by its ID or type. - If there are multiple pending activities of the provided type - all of them will be reset. - - Resetting an activity means: - * number of attempts will be reset to 0. - * activity timeouts will be reset. - * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: - it will be scheduled immediately (* see 'jitter' flag), - - Flags: - - 'jitter': the activity will be scheduled at a random time within the jitter duration. - If the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided. - 'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset. - 'keep_paused': if the activity is paused, it will remain paused. - - Returns a `NotFound` error if there is no pending activity with the provided ID or type. - operationId: ResetActivityExecution - parameters: - - name: activityId - in: path - description: |- - Reset an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type and all_workflow_activities. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ResetActivityExecutionRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ResetActivityExecutionResponse' - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /api/v1/namespaces/activities/{activityId}/unpause: - post: - tags: - - WorkflowService - description: |- - UnpauseActivityExecution unpauses the execution of an activity specified by its ID or type. - If there are multiple pending activities of the provided type - all of them will be unpaused. - - If activity is not paused, this call will have no effect. - If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). - Once the activity is unpaused, all timeout timers will be regenerated. - - Flags: - 'jitter': the activity will be scheduled at a random time within the jitter duration. - 'reset_attempts': the number of attempts will be reset. - 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. - - Returns a `NotFound` error if there is no pending activity with the provided ID or type - operationId: UnpauseActivityExecution - parameters: - - name: activityId - in: path - description: |- - Unpause an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type and all_workflow_activities. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UnpauseActivityExecutionRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/UnpauseActivityExecutionResponse' - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /api/v1/namespaces/activities/{activityId}/update-options: - post: - tags: - - WorkflowService - description: |- - UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID or type. - If there are multiple pending activities of the provided type - all of them will be updated. - operationId: UpdateActivityExecutionOptions - parameters: - - name: activityId - in: path - description: |- - Update options for an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type and all_workflow_activities. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateActivityExecutionOptionsRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateActivityExecutionOptionsResponse' - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' /api/v1/namespaces/{namespace}: get: tags: @@ -663,7 +479,8 @@ paths: - The activity should respond to the cancellation accordingly. Returns a `NotFound` error if there is no pending activity with the provided ID or type - Deprecated. See PauseActivityExecution. + This API will be deprecated soon and replaced with a newer PauseActivityExecution that is better named and + structured to work well for standalone activities. operationId: PauseActivity parameters: - name: namespace @@ -713,7 +530,8 @@ paths: 'keep_paused': if the activity is paused, it will remain paused. Returns a `NotFound` error if there is no pending activity with the provided ID or type. - Deprecated. See ResetActivityExecution. + This API will be deprecated soon and replaced with a newer ResetActivityExecution that is better named and + structured to work well for standalone activities. operationId: ResetActivity parameters: - name: namespace @@ -759,7 +577,8 @@ paths: 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. Returns a `NotFound` error if there is no pending activity with the provided ID or type - Deprecated. See UnpauseActivityExecution. + This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and + structured to work well for standalone activities. operationId: UnpauseActivity parameters: - name: namespace @@ -794,7 +613,8 @@ paths: description: |- UpdateActivityOptions is called by the client to update the options of an activity by its ID or type. If there are multiple pending activities of the provided type - all of them will be updated. - Deprecated. See UpdateActivityExecutionOptions. + This API will be deprecated soon and replaced with a newer UpdateActivityExecutionOptions that is better named and + structured to work well for standalone activities. operationId: UpdateActivityOptions parameters: - name: namespace @@ -3262,48 +3082,38 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/pause: + /api/v1/namespaces/{namespace}/workflows/{workflowId}/signal-with-start/{signalName}: post: tags: - WorkflowService description: |- - PauseActivityExecution pauses the execution of an activity specified by its ID or type. - If there are multiple pending activities of the provided type - all of them will be paused + SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if + it isn't yet started. - Pausing an activity means: - - If the activity is currently waiting for a retry or is running and subsequently fails, - it will not be rescheduled until it is unpaused. - - If the activity is already paused, calling this method will have no effect. - - If the activity is running and finishes successfully, the activity will be completed. - - If the activity is running and finishes with failure: - * if there is no retry left - the activity will be completed. - * if there are more retries left - the activity will be paused. - For long-running activities: - - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. - - The activity should respond to the cancellation accordingly. + If the workflow is running, a `WORKFLOW_EXECUTION_SIGNALED` event is recorded in the history + and a workflow task is generated. - Returns a `NotFound` error if there is no pending activity with the provided ID or type - operationId: PauseActivityExecution + If the workflow is not running or not found, then the workflow is created with + `WORKFLOW_EXECUTION_STARTED` and `WORKFLOW_EXECUTION_SIGNALED` events in its history, and a + workflow task is generated. + + (-- api-linter: core::0136::prepositions=disabled + aip.dev/not-precedent: "With" is used to indicate combined operation. --) + operationId: SignalWithStartWorkflowExecution parameters: - name: namespace in: path - description: Namespace of the workflow which scheduled this activity. required: true schema: type: string - name: workflowId in: path - description: |- - If provided, pause a workflow activity (or activities) for the given workflow ID. - If empty, target a standalone activity. required: true schema: type: string - - name: activityId + - name: signalName in: path - description: |- - Pause an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type. + description: The workflow author-defined name of the signal to send to the workflow required: true schema: type: string @@ -3311,7 +3121,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PauseActivityExecutionRequest' + $ref: '#/components/schemas/SignalWithStartWorkflowExecutionRequest' required: true responses: "200": @@ -3319,56 +3129,33 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PauseActivityExecutionResponse' + $ref: '#/components/schemas/SignalWithStartWorkflowExecutionResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/reset: + /api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/cancel: post: tags: - WorkflowService description: |- - ResetActivityExecution resets the execution of an activity specified by its ID or type. - If there are multiple pending activities of the provided type - all of them will be reset. - - Resetting an activity means: - * number of attempts will be reset to 0. - * activity timeouts will be reset. - * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: - it will be scheduled immediately (* see 'jitter' flag), - - Flags: - - 'jitter': the activity will be scheduled at a random time within the jitter duration. - If the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided. - 'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset. - 'keep_paused': if the activity is paused, it will remain paused. + RequestCancelWorkflowExecution is called by workers when they want to request cancellation of + a workflow execution. - Returns a `NotFound` error if there is no pending activity with the provided ID or type. - operationId: ResetActivityExecution + This results in a new `WORKFLOW_EXECUTION_CANCEL_REQUESTED` event being written to the + workflow history and a new workflow task created for the workflow. It returns success if the requested + workflow is already closed. It fails with 'NotFound' if the requested workflow doesn't exist. + operationId: RequestCancelWorkflowExecution parameters: - name: namespace in: path - description: Namespace of the workflow which scheduled this activity. - required: true - schema: - type: string - - name: workflowId - in: path - description: |- - If provided, reset a workflow activity (or activities) for the given workflow ID. - If empty, target a standalone activity. required: true schema: type: string - - name: activityId + - name: workflow_execution.workflow_id in: path - description: |- - Reset an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type and all_workflow_activities. required: true schema: type: string @@ -3376,7 +3163,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ResetActivityExecutionRequest' + $ref: '#/components/schemas/RequestCancelWorkflowExecutionRequest' required: true responses: "200": @@ -3384,52 +3171,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ResetActivityExecutionResponse' + $ref: '#/components/schemas/RequestCancelWorkflowExecutionResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/unpause: + /api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/reset: post: tags: - WorkflowService description: |- - UnpauseActivityExecution unpauses the execution of an activity specified by its ID or type. - If there are multiple pending activities of the provided type - all of them will be unpaused. - - If activity is not paused, this call will have no effect. - If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). - Once the activity is unpaused, all timeout timers will be regenerated. - - Flags: - 'jitter': the activity will be scheduled at a random time within the jitter duration. - 'reset_attempts': the number of attempts will be reset. - 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. - - Returns a `NotFound` error if there is no pending activity with the provided ID or type - operationId: UnpauseActivityExecution + ResetWorkflowExecution will reset an existing workflow execution to a specified + `WORKFLOW_TASK_COMPLETED` event (exclusive). It will immediately terminate the current + execution instance. "Exclusive" means the identified completed event itself is not replayed + in the reset history; the preceding `WORKFLOW_TASK_STARTED` event remains and will be marked as failed + immediately, and a new workflow task will be scheduled to retry it. + operationId: ResetWorkflowExecution parameters: - name: namespace in: path - description: Namespace of the workflow which scheduled this activity. - required: true - schema: - type: string - - name: workflowId - in: path - description: |- - If provided, unpause a workflow activity (or activities) for the given workflow ID. - If empty, target a standalone activity. required: true schema: type: string - - name: activityId + - name: workflow_execution.workflow_id in: path - description: |- - Unpause an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type and all_workflow_activities. required: true schema: type: string @@ -3437,7 +3204,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnpauseActivityExecutionRequest' + $ref: '#/components/schemas/ResetWorkflowExecutionRequest' required: true responses: "200": @@ -3445,201 +3212,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnpauseActivityExecutionResponse' + $ref: '#/components/schemas/ResetWorkflowExecutionResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/update-options: - post: - tags: - - WorkflowService - description: |- - UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID or type. - If there are multiple pending activities of the provided type - all of them will be updated. - operationId: UpdateActivityExecutionOptions - parameters: - - name: namespace - in: path - description: Namespace of the workflow which scheduled this activity - required: true - schema: - type: string - - name: workflowId - in: path - description: |- - If provided, update options for a workflow activity (or activities) for the given workflow ID. If empty, target a - standalone activity. - required: true - schema: - type: string - - name: activityId - in: path - description: |- - Update options for an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type and all_workflow_activities. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateActivityExecutionOptionsRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateActivityExecutionOptionsResponse' - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /api/v1/namespaces/{namespace}/workflows/{workflowId}/signal-with-start/{signalName}: - post: - tags: - - WorkflowService - description: |- - SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if - it isn't yet started. - - If the workflow is running, a `WORKFLOW_EXECUTION_SIGNALED` event is recorded in the history - and a workflow task is generated. - - If the workflow is not running or not found, then the workflow is created with - `WORKFLOW_EXECUTION_STARTED` and `WORKFLOW_EXECUTION_SIGNALED` events in its history, and a - workflow task is generated. - - (-- api-linter: core::0136::prepositions=disabled - aip.dev/not-precedent: "With" is used to indicate combined operation. --) - operationId: SignalWithStartWorkflowExecution - parameters: - - name: namespace - in: path - required: true - schema: - type: string - - name: workflowId - in: path - required: true - schema: - type: string - - name: signalName - in: path - description: The workflow author-defined name of the signal to send to the workflow - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SignalWithStartWorkflowExecutionRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/SignalWithStartWorkflowExecutionResponse' - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/cancel: - post: - tags: - - WorkflowService - description: |- - RequestCancelWorkflowExecution is called by workers when they want to request cancellation of - a workflow execution. - - This results in a new `WORKFLOW_EXECUTION_CANCEL_REQUESTED` event being written to the - workflow history and a new workflow task created for the workflow. It returns success if the requested - workflow is already closed. It fails with 'NotFound' if the requested workflow doesn't exist. - operationId: RequestCancelWorkflowExecution - parameters: - - name: namespace - in: path - required: true - schema: - type: string - - name: workflow_execution.workflow_id - in: path - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RequestCancelWorkflowExecutionRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/RequestCancelWorkflowExecutionResponse' - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/reset: - post: - tags: - - WorkflowService - description: |- - ResetWorkflowExecution will reset an existing workflow execution to a specified - `WORKFLOW_TASK_COMPLETED` event (exclusive). It will immediately terminate the current - execution instance. "Exclusive" means the identified completed event itself is not replayed - in the reset history; the preceding `WORKFLOW_TASK_STARTED` event remains and will be marked as failed - immediately, and a new workflow task will be scheduled to retry it. - operationId: ResetWorkflowExecution - parameters: - - name: namespace - in: path - required: true - schema: - type: string - - name: workflow_execution.workflow_id - in: path - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ResetWorkflowExecutionRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ResetWorkflowExecutionResponse' - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/signal/{signalName}: + /api/v1/namespaces/{namespace}/workflows/{workflow_execution.workflow_id}/signal/{signalName}: post: tags: - WorkflowService @@ -4328,190 +3908,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/activities/{activityId}/pause: - post: - tags: - - WorkflowService - description: |- - PauseActivityExecution pauses the execution of an activity specified by its ID or type. - If there are multiple pending activities of the provided type - all of them will be paused - - Pausing an activity means: - - If the activity is currently waiting for a retry or is running and subsequently fails, - it will not be rescheduled until it is unpaused. - - If the activity is already paused, calling this method will have no effect. - - If the activity is running and finishes successfully, the activity will be completed. - - If the activity is running and finishes with failure: - * if there is no retry left - the activity will be completed. - * if there are more retries left - the activity will be paused. - For long-running activities: - - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. - - The activity should respond to the cancellation accordingly. - - Returns a `NotFound` error if there is no pending activity with the provided ID or type - operationId: PauseActivityExecution - parameters: - - name: activityId - in: path - description: |- - Pause an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PauseActivityExecutionRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/PauseActivityExecutionResponse' - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /namespaces/activities/{activityId}/reset: - post: - tags: - - WorkflowService - description: |- - ResetActivityExecution resets the execution of an activity specified by its ID or type. - If there are multiple pending activities of the provided type - all of them will be reset. - - Resetting an activity means: - * number of attempts will be reset to 0. - * activity timeouts will be reset. - * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: - it will be scheduled immediately (* see 'jitter' flag), - - Flags: - - 'jitter': the activity will be scheduled at a random time within the jitter duration. - If the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided. - 'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset. - 'keep_paused': if the activity is paused, it will remain paused. - - Returns a `NotFound` error if there is no pending activity with the provided ID or type. - operationId: ResetActivityExecution - parameters: - - name: activityId - in: path - description: |- - Reset an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type and all_workflow_activities. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ResetActivityExecutionRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ResetActivityExecutionResponse' - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /namespaces/activities/{activityId}/unpause: - post: - tags: - - WorkflowService - description: |- - UnpauseActivityExecution unpauses the execution of an activity specified by its ID or type. - If there are multiple pending activities of the provided type - all of them will be unpaused. - - If activity is not paused, this call will have no effect. - If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). - Once the activity is unpaused, all timeout timers will be regenerated. - - Flags: - 'jitter': the activity will be scheduled at a random time within the jitter duration. - 'reset_attempts': the number of attempts will be reset. - 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. - - Returns a `NotFound` error if there is no pending activity with the provided ID or type - operationId: UnpauseActivityExecution - parameters: - - name: activityId - in: path - description: |- - Unpause an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type and all_workflow_activities. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UnpauseActivityExecutionRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/UnpauseActivityExecutionResponse' - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /namespaces/activities/{activityId}/update-options: - post: - tags: - - WorkflowService - description: |- - UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID or type. - If there are multiple pending activities of the provided type - all of them will be updated. - operationId: UpdateActivityExecutionOptions - parameters: - - name: activityId - in: path - description: |- - Update options for an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type and all_workflow_activities. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateActivityExecutionOptionsRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateActivityExecutionOptionsResponse' - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' /namespaces/{namespace}/activities: get: tags: @@ -4869,7 +4265,8 @@ paths: - The activity should respond to the cancellation accordingly. Returns a `NotFound` error if there is no pending activity with the provided ID or type - Deprecated. See PauseActivityExecution. + This API will be deprecated soon and replaced with a newer PauseActivityExecution that is better named and + structured to work well for standalone activities. operationId: PauseActivity parameters: - name: namespace @@ -4919,7 +4316,8 @@ paths: 'keep_paused': if the activity is paused, it will remain paused. Returns a `NotFound` error if there is no pending activity with the provided ID or type. - Deprecated. See ResetActivityExecution. + This API will be deprecated soon and replaced with a newer ResetActivityExecution that is better named and + structured to work well for standalone activities. operationId: ResetActivity parameters: - name: namespace @@ -4965,7 +4363,8 @@ paths: 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. Returns a `NotFound` error if there is no pending activity with the provided ID or type - Deprecated. See UnpauseActivityExecution. + This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and + structured to work well for standalone activities. operationId: UnpauseActivity parameters: - name: namespace @@ -5000,7 +4399,8 @@ paths: description: |- UpdateActivityOptions is called by the client to update the options of an activity by its ID or type. If there are multiple pending activities of the provided type - all of them will be updated. - Deprecated. See UpdateActivityExecutionOptions. + This API will be deprecated soon and replaced with a newer UpdateActivityExecutionOptions that is better named and + structured to work well for standalone activities. operationId: UpdateActivityOptions parameters: - name: namespace @@ -7237,286 +6637,76 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse: - get: - tags: - - WorkflowService - description: |- - GetWorkflowExecutionHistoryReverse returns the history of specified workflow execution in reverse - order (starting from last event). Fails with`NotFound` if the specified workflow execution is - unknown to the service. - operationId: GetWorkflowExecutionHistoryReverse - parameters: - - name: namespace - in: path - required: true - schema: - type: string - - name: execution.workflow_id - in: path - required: true - schema: - type: string - - name: execution.workflowId - in: query - schema: - type: string - - name: execution.runId - in: query - schema: - type: string - - name: maximumPageSize - in: query - schema: - type: integer - format: int32 - - name: nextPageToken - in: query - schema: - type: string - format: bytes - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/GetWorkflowExecutionHistoryReverseResponse' - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /namespaces/{namespace}/workflows/{execution.workflow_id}/query/{query.query_type}: - post: - tags: - - WorkflowService - description: QueryWorkflow requests a query be executed for a specified workflow execution. - operationId: QueryWorkflow - parameters: - - name: namespace - in: path - required: true - schema: - type: string - - name: execution.workflow_id - in: path - required: true - schema: - type: string - - name: query.query_type - in: path - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/QueryWorkflowRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/QueryWorkflowResponse' - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /namespaces/{namespace}/workflows/{execution.workflow_id}/trigger-rule: - post: - tags: - - WorkflowService - description: |- - TriggerWorkflowRule allows to: - * trigger existing rule for a specific workflow execution; - * trigger rule for a specific workflow execution without creating a rule; - This is useful for one-off operations. - operationId: TriggerWorkflowRule - parameters: - - name: namespace - in: path - required: true - schema: - type: string - - name: execution.workflow_id - in: path - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TriggerWorkflowRuleRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/TriggerWorkflowRuleResponse' - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /namespaces/{namespace}/workflows/{workflowId}: - post: - tags: - - WorkflowService - description: |- - StartWorkflowExecution starts a new workflow execution. - - It will create the execution with a `WORKFLOW_EXECUTION_STARTED` event in its history and - also schedule the first workflow task. Returns `WorkflowExecutionAlreadyStarted`, if an - instance already exists with same workflow id. - operationId: StartWorkflowExecution - parameters: - - name: namespace - in: path - required: true - schema: - type: string - - name: workflowId - in: path - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StartWorkflowExecutionRequest' - required: true - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StartWorkflowExecutionResponse' - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/pause: - post: + /namespaces/{namespace}/workflows/{execution.workflow_id}/history-reverse: + get: tags: - WorkflowService description: |- - PauseActivityExecution pauses the execution of an activity specified by its ID or type. - If there are multiple pending activities of the provided type - all of them will be paused - - Pausing an activity means: - - If the activity is currently waiting for a retry or is running and subsequently fails, - it will not be rescheduled until it is unpaused. - - If the activity is already paused, calling this method will have no effect. - - If the activity is running and finishes successfully, the activity will be completed. - - If the activity is running and finishes with failure: - * if there is no retry left - the activity will be completed. - * if there are more retries left - the activity will be paused. - For long-running activities: - - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. - - The activity should respond to the cancellation accordingly. - - Returns a `NotFound` error if there is no pending activity with the provided ID or type - operationId: PauseActivityExecution + GetWorkflowExecutionHistoryReverse returns the history of specified workflow execution in reverse + order (starting from last event). Fails with`NotFound` if the specified workflow execution is + unknown to the service. + operationId: GetWorkflowExecutionHistoryReverse parameters: - name: namespace in: path - description: Namespace of the workflow which scheduled this activity. required: true schema: type: string - - name: workflowId + - name: execution.workflow_id in: path - description: |- - If provided, pause a workflow activity (or activities) for the given workflow ID. - If empty, target a standalone activity. required: true schema: type: string - - name: activityId - in: path - description: |- - Pause an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type. - required: true + - name: execution.workflowId + in: query schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PauseActivityExecutionRequest' - required: true + - name: execution.runId + in: query + schema: + type: string + - name: maximumPageSize + in: query + schema: + type: integer + format: int32 + - name: nextPageToken + in: query + schema: + type: string + format: bytes responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/PauseActivityExecutionResponse' + $ref: '#/components/schemas/GetWorkflowExecutionHistoryReverseResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/reset: + /namespaces/{namespace}/workflows/{execution.workflow_id}/query/{query.query_type}: post: tags: - WorkflowService - description: |- - ResetActivityExecution resets the execution of an activity specified by its ID or type. - If there are multiple pending activities of the provided type - all of them will be reset. - - Resetting an activity means: - * number of attempts will be reset to 0. - * activity timeouts will be reset. - * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: - it will be scheduled immediately (* see 'jitter' flag), - - Flags: - - 'jitter': the activity will be scheduled at a random time within the jitter duration. - If the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided. - 'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset. - 'keep_paused': if the activity is paused, it will remain paused. - - Returns a `NotFound` error if there is no pending activity with the provided ID or type. - operationId: ResetActivityExecution + description: QueryWorkflow requests a query be executed for a specified workflow execution. + operationId: QueryWorkflow parameters: - name: namespace in: path - description: Namespace of the workflow which scheduled this activity. required: true schema: type: string - - name: workflowId + - name: execution.workflow_id in: path - description: |- - If provided, reset a workflow activity (or activities) for the given workflow ID. - If empty, target a standalone activity. required: true schema: type: string - - name: activityId + - name: query.query_type in: path - description: |- - Reset an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type and all_workflow_activities. required: true schema: type: string @@ -7524,7 +6714,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ResetActivityExecutionRequest' + $ref: '#/components/schemas/QueryWorkflowRequest' required: true responses: "200": @@ -7532,52 +6722,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ResetActivityExecutionResponse' + $ref: '#/components/schemas/QueryWorkflowResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/unpause: + /namespaces/{namespace}/workflows/{execution.workflow_id}/trigger-rule: post: tags: - WorkflowService description: |- - UnpauseActivityExecution unpauses the execution of an activity specified by its ID or type. - If there are multiple pending activities of the provided type - all of them will be unpaused. - - If activity is not paused, this call will have no effect. - If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). - Once the activity is unpaused, all timeout timers will be regenerated. - - Flags: - 'jitter': the activity will be scheduled at a random time within the jitter duration. - 'reset_attempts': the number of attempts will be reset. - 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. - - Returns a `NotFound` error if there is no pending activity with the provided ID or type - operationId: UnpauseActivityExecution + TriggerWorkflowRule allows to: + * trigger existing rule for a specific workflow execution; + * trigger rule for a specific workflow execution without creating a rule; + This is useful for one-off operations. + operationId: TriggerWorkflowRule parameters: - name: namespace in: path - description: Namespace of the workflow which scheduled this activity. - required: true - schema: - type: string - - name: workflowId - in: path - description: |- - If provided, unpause a workflow activity (or activities) for the given workflow ID. - If empty, target a standalone activity. required: true schema: type: string - - name: activityId + - name: execution.workflow_id in: path - description: |- - Unpause an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type and all_workflow_activities. required: true schema: type: string @@ -7585,7 +6754,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnpauseActivityExecutionRequest' + $ref: '#/components/schemas/TriggerWorkflowRuleRequest' required: true responses: "200": @@ -7593,41 +6762,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UnpauseActivityExecutionResponse' + $ref: '#/components/schemas/TriggerWorkflowRuleResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/update-options: + /namespaces/{namespace}/workflows/{workflowId}: post: tags: - WorkflowService description: |- - UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID or type. - If there are multiple pending activities of the provided type - all of them will be updated. - operationId: UpdateActivityExecutionOptions + StartWorkflowExecution starts a new workflow execution. + + It will create the execution with a `WORKFLOW_EXECUTION_STARTED` event in its history and + also schedule the first workflow task. Returns `WorkflowExecutionAlreadyStarted`, if an + instance already exists with same workflow id. + operationId: StartWorkflowExecution parameters: - name: namespace in: path - description: Namespace of the workflow which scheduled this activity required: true schema: type: string - name: workflowId in: path - description: |- - If provided, update options for a workflow activity (or activities) for the given workflow ID. If empty, target a - standalone activity. - required: true - schema: - type: string - - name: activityId - in: path - description: |- - Update options for an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type and all_workflow_activities. required: true schema: type: string @@ -7635,7 +6795,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateActivityExecutionOptionsRequest' + $ref: '#/components/schemas/StartWorkflowExecutionRequest' required: true responses: "200": @@ -7643,7 +6803,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateActivityExecutionOptionsResponse' + $ref: '#/components/schemas/StartWorkflowExecutionResponse' default: description: Default error response content: @@ -8113,7 +7273,7 @@ components: description: |- The attempt this activity is currently on. Incremented each time a new attempt is started. - TODO: Confirm if this is on scheduled or started. + TODO(dandavison): Confirm if this is on scheduled or started. format: int32 maximumAttempts: type: integer @@ -8173,45 +7333,14 @@ components: $ref: '#/components/schemas/SearchAttributes' header: $ref: '#/components/schemas/Header' - eagerExecutionRequested: - type: boolean - description: |- - Whether the activity was started with a request_eager_execution flag set to `true`, indicating that the first - task was delivered inline in the start response, bypassing matching. - completionCallbacks: - type: array - items: - $ref: '#/components/schemas/Callback' - description: |- - Callbacks to be called by the server when this activity reaches a terminal status. - Callback addresses must be whitelisted in the server's dynamic configuration. userMetadata: allOf: - $ref: '#/components/schemas/UserMetadata' description: Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity. - links: - type: array - items: - $ref: '#/components/schemas/Link' - description: Links to be associated with the activity. canceledReason: type: string description: Set if activity cancelation was requested. - pauseInfo: - $ref: '#/components/schemas/ActivityExecutionInfo_PauseInfo' description: Information about a standalone activity. - ActivityExecutionInfo_PauseInfo: - type: object - properties: - pauseTime: - type: string - description: The time when the activity was paused. - format: date-time - manual: - allOf: - - $ref: '#/components/schemas/PauseInfo_Manual' - description: The activity was paused by direct API invocation. - description: 'TODO: Move this to a common package?' ActivityExecutionListInfo: type: object properties: @@ -11453,16 +10582,18 @@ components: properties: attachRequestId: type: boolean - description: Attaches the request ID to the running activity. + description: Attaches the request ID to the running workflow. attachCompletionCallbacks: type: boolean - description: Attaches the completion callbacks to the running activity. + description: Attaches the completion callbacks to the running workflow. attachLinks: type: boolean - description: Attaches the links to the running activity. + description: Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event. description: |- - When StartActivityExecution uses the ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING and there is already an existing running - activity, OnConflictOptions defines actions to be taken on the existing running activity, updating its state. + When StartWorkflowExecution uses the conflict policy WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING and + there is already an existing running workflow, OnConflictOptions defines actions to be taken on + the existing running workflow. In this case, it will create a WorkflowExecutionOptionsUpdatedEvent + history event in the running workflow with the changes requested in this object. Outcome: type: object properties: @@ -11491,42 +10622,6 @@ components: PatchScheduleResponse: type: object properties: {} - PauseActivityExecutionRequest: - type: object - properties: - namespace: - type: string - description: Namespace of the workflow which scheduled this activity. - workflowId: - type: string - description: |- - If provided, pause a workflow activity (or activities) for the given workflow ID. - If empty, target a standalone activity. - activityId: - type: string - description: |- - Pause an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type. - runId: - type: string - description: Run ID of the workflow or standalone activity. - identity: - type: string - description: The identity of the client who initiated this request. - workflowActivityType: - type: string - description: |- - Pause all pending activities of this type. - Only available if workflow_id is provided. - Mutually exclusive with activity_id. - - Note: Experimental - the behavior of pausing by activity type might change or be removed in a future release. - reason: - type: string - description: Reason to pause the activity. - PauseActivityExecutionResponse: - type: object - properties: {} PauseActivityRequest: type: object properties: @@ -11551,11 +10646,9 @@ components: reason: type: string description: Reason to pause the activity. - description: Deprecated. See PauseActivityExecutionRequest. PauseActivityResponse: type: object properties: {} - description: Deprecated. See PauseActivityExecutionResponse. PauseInfo_Manual: type: object properties: @@ -11810,153 +10903,59 @@ components: - $ref: '#/components/schemas/Failure' description: The last attempt's failure, if any. nextAttemptScheduleTime: - type: string - description: The time when the next attempt is scheduled. - format: date-time - cancellationInfo: - $ref: '#/components/schemas/NexusOperationCancellationInfo' - scheduledEventId: - type: string - description: |- - The event ID of the NexusOperationScheduled event. Can be used to correlate an operation in the - DescribeWorkflowExecution response with workflow history. - blockedReason: - type: string - description: If the state is BLOCKED, blocked reason provides additional information. - operationToken: - type: string - description: Operation token. Only set for asynchronous operations after a successful StartOperation call. - description: PendingNexusOperationInfo contains the state of a pending Nexus operation. - PendingWorkflowTaskInfo: - type: object - properties: - state: - enum: - - PENDING_WORKFLOW_TASK_STATE_UNSPECIFIED - - PENDING_WORKFLOW_TASK_STATE_SCHEDULED - - PENDING_WORKFLOW_TASK_STATE_STARTED - type: string - format: enum - scheduledTime: - type: string - format: date-time - originalScheduledTime: - type: string - description: |- - original_scheduled_time is the scheduled time of the first workflow task during workflow task heartbeat. - Heartbeat workflow task is done by RespondWorkflowTaskComplete with ForceCreateNewWorkflowTask == true and no command - In this case, OriginalScheduledTime won't change. Then when current time - original_scheduled_time exceeds - some threshold, the workflow task will be forced timeout. - format: date-time - startedTime: - type: string - format: date-time - attempt: - type: integer - format: int32 - PluginInfo: - type: object - properties: - name: - type: string - description: The name of the plugin, required. - version: - type: string - description: The version of the plugin, may be empty. - PollActivityTaskQueueResponse: - type: object - properties: - taskToken: - type: string - description: A unique identifier for this task - format: bytes - workflowNamespace: - type: string - description: The namespace the workflow which requested this activity lives in - workflowType: - allOf: - - $ref: '#/components/schemas/WorkflowType' - description: Type of the requesting workflow - workflowExecution: - allOf: - - $ref: '#/components/schemas/WorkflowExecution' - description: Execution info of the requesting workflow - activityType: - $ref: '#/components/schemas/ActivityType' - activityId: - type: string - description: |- - The autogenerated or user specified identifier of this activity. Can be used to complete the - activity via `RespondActivityTaskCompletedById`. May be re-used as long as the last usage - has resolved, but unique IDs for every activity invocation is a good idea. - Note that only a workflow activity ID may be autogenerated. - header: - allOf: - - $ref: '#/components/schemas/Header' - description: |- - Headers specified by the scheduling workflow. Commonly used to propagate contextual info - from the workflow to its activities. For example, tracing contexts. - input: - allOf: - - $ref: '#/components/schemas/Payloads' - description: Arguments to the activity invocation - heartbeatDetails: - allOf: - - $ref: '#/components/schemas/Payloads' + type: string + description: The time when the next attempt is scheduled. + format: date-time + cancellationInfo: + $ref: '#/components/schemas/NexusOperationCancellationInfo' + scheduledEventId: + type: string description: |- - Details of the last heartbeat that was recorded for this activity as of the time this task - was delivered. + The event ID of the NexusOperationScheduled event. Can be used to correlate an operation in the + DescribeWorkflowExecution response with workflow history. + blockedReason: + type: string + description: If the state is BLOCKED, blocked reason provides additional information. + operationToken: + type: string + description: Operation token. Only set for asynchronous operations after a successful StartOperation call. + description: PendingNexusOperationInfo contains the state of a pending Nexus operation. + PendingWorkflowTaskInfo: + type: object + properties: + state: + enum: + - PENDING_WORKFLOW_TASK_STATE_UNSPECIFIED + - PENDING_WORKFLOW_TASK_STATE_SCHEDULED + - PENDING_WORKFLOW_TASK_STATE_STARTED + type: string + format: enum scheduledTime: type: string - description: When was this task first scheduled format: date-time - currentAttemptScheduledTime: + originalScheduledTime: type: string - description: When was this task attempt scheduled + description: |- + original_scheduled_time is the scheduled time of the first workflow task during workflow task heartbeat. + Heartbeat workflow task is done by RespondWorkflowTaskComplete with ForceCreateNewWorkflowTask == true and no command + In this case, OriginalScheduledTime won't change. Then when current time - original_scheduled_time exceeds + some threshold, the workflow task will be forced timeout. format: date-time startedTime: type: string - description: When was this task started (this attempt) format: date-time attempt: type: integer - description: Starting at 1, the number of attempts to perform this activity format: int32 - scheduleToCloseTimeout: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ - type: string - description: |- - First scheduled -> final result reported timeout - - (-- api-linter: core::0140::prepositions=disabled - aip.dev/not-precedent: "to" is used to indicate interval. --) - startToCloseTimeout: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + PluginInfo: + type: object + properties: + name: type: string - description: |- - Current attempt start -> final result reported timeout - - (-- api-linter: core::0140::prepositions=disabled - aip.dev/not-precedent: "to" is used to indicate interval. --) - heartbeatTimeout: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + description: The name of the plugin, required. + version: type: string - description: Window within which the activity must report a heartbeat, or be timed out. - retryPolicy: - allOf: - - $ref: '#/components/schemas/RetryPolicy' - description: |- - This is the retry policy the service uses which may be different from the one provided - (or not) during activity scheduling. The service can override the provided one if some - values are not specified or exceed configured system limits. - pollerScalingDecision: - allOf: - - $ref: '#/components/schemas/PollerScalingDecision' - description: Server-advised information the SDK may use to adjust its poller count. - priority: - allOf: - - $ref: '#/components/schemas/Priority' - description: Priority metadata + description: The version of the plugin, may be empty. PollWorkflowTaskQueueResponse: type: object properties: @@ -12653,70 +11652,6 @@ components: Indicate if the request is still buffered. If so, the event ID is not known and its value will be an invalid event ID. description: RequestIdInfo contains details of a request ID. - ResetActivityExecutionRequest: - type: object - properties: - namespace: - type: string - description: Namespace of the workflow which scheduled this activity. - workflowId: - type: string - description: |- - If provided, reset a workflow activity (or activities) for the given workflow ID. - If empty, target a standalone activity. - activityId: - type: string - description: |- - Reset an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type and all_workflow_activities. - runId: - type: string - description: Run ID of the workflow or standalone activity. - identity: - type: string - description: The identity of the client who initiated this request. - workflowActivityType: - type: string - description: |- - Reset all pending workflow activities of this type. - Only available if workflow_id is provided. - Mutually exclusive with activity_id and all_workflow_activities. - - Note: Experimental - the behavior of resetting by activity type may change or be removed in a future release. - allWorkflowActivities: - type: boolean - description: |- - Reset all pending workflow activities. - Only available if workflow_id is provided. - Mutually exclusive with activity_id and workflow_activity_type. - - Note: Experimental - the behavior of resetting all activities may change or be removed in a future release. - resetHeartbeat: - type: boolean - description: |- - Indicates that activity should reset heartbeat details. - This flag will be applied only to the new instance of the activity. - keepPaused: - type: boolean - description: If activity is paused, it will remain paused after reset - jitter: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ - type: string - description: |- - If set, and activity is in backoff, the activity will start at a random time within the specified jitter duration. - (unless it is paused and keep_paused is set) - restoreOriginalOptions: - type: boolean - description: |- - If set, the activity options will be restored to the defaults. - Default options are then options activity was originally created with. - For workflow activities the original options are restored from first ActivityTaskScheduled event. - description: |- - TODO: update batch - NOTE: keep in sync with temporal.api.batch.v1.BatchOperationResetActivities - ResetActivityExecutionResponse: - type: object - properties: {} ResetActivityRequest: type: object properties: @@ -12759,13 +11694,10 @@ components: If set, the activity options will be restored to the defaults. Default options are then options activity was created with. They are part of the first SCHEDULE event. - description: |- - NOTE: keep in sync with temporal.api.batch.v1.BatchOperationResetActivities - Deprecated. See ResetActivityExecutionRequest. + description: 'NOTE: keep in sync with temporal.api.batch.v1.BatchOperationResetActivities' ResetActivityResponse: type: object properties: {} - description: Deprecated. See ResetActivityExecutionResponse. ResetOptions: type: object properties: @@ -14126,18 +13058,11 @@ components: - ACTIVITY_ID_CONFLICT_POLICY_UNSPECIFIED - ACTIVITY_ID_CONFLICT_POLICY_FAIL - ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING - - ACTIVITY_ID_CONFLICT_POLICY_TERMINATE_EXISTING type: string description: |- Defines how to resolve an activity id conflict with a *running* activity. The default policy is ACTIVITY_ID_CONFLICT_POLICY_FAIL. format: enum - memo: - allOf: - - $ref: '#/components/schemas/Memo' - description: |- - Arbitrary structured data that can be attached to the activity execution and made available via the list and - describe APIs. searchAttributes: allOf: - $ref: '#/components/schemas/SearchAttributes' @@ -14146,39 +13071,14 @@ components: allOf: - $ref: '#/components/schemas/Header' description: Header for context propagation and tracing purposes. - requestEagerExecution: - type: boolean - description: |- - Request to get the first activity task inline in the response bypassing matching service and worker polling. - If set to `true` the caller is expected to have a worker available and capable of processing the task. - The returned task will be marked as started and is expected to be completed by the specified - `schedule_to_close_timeout`. - completionCallbacks: - type: array - items: - $ref: '#/components/schemas/Callback' - description: |- - Callbacks to be called by the server when this activity reaches a terminal status. - Callback addresses must be whitelisted in the server's dynamic configuration. userMetadata: allOf: - $ref: '#/components/schemas/UserMetadata' description: Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity. - links: - type: array - items: - $ref: '#/components/schemas/Link' - description: Links to be associated with the activity. - onConflictOptions: - allOf: - - $ref: '#/components/schemas/OnConflictOptions' - description: |- - Defines actions to be done to the existing running activity when ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING is used. If not - set or empty, it won't do anything to the existing running activity. priority: allOf: - $ref: '#/components/schemas/Priority' - description: Priority metadata + description: Priority metadata. StartActivityExecutionResponse: type: object properties: @@ -14188,17 +13088,6 @@ components: started: type: boolean description: If true, a new activity was started. - eagerTask: - allOf: - - $ref: '#/components/schemas/PollActivityTaskQueueResponse' - description: |- - When `request_eager_execution` is set on the `StartActivityExecutionRequest`, the server will return the first - activity task to be eagerly executed. - The caller is expected to have a worker available to process the task. - link: - allOf: - - $ref: '#/components/schemas/Link' - description: Link to the activity. StartBatchOperationRequest: type: object properties: @@ -15009,58 +13898,6 @@ components: applied: type: boolean description: True is the rule was applied, based on the rule conditions (predicate/visibility_query). - UnpauseActivityExecutionRequest: - type: object - properties: - namespace: - type: string - description: Namespace of the workflow which scheduled this activity. - workflowId: - type: string - description: |- - If provided, unpause a workflow activity (or activities) for the given workflow ID. - If empty, target a standalone activity. - activityId: - type: string - description: |- - Unpause an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type and all_workflow_activities. - runId: - type: string - description: Run ID of the workflow or standalone activity. - identity: - type: string - description: The identity of the client who initiated this request. - workflowActivityType: - type: string - description: |- - Unpause all currently paused workflow activities of this type. - Only available if workflow_id is provided. - Mutually exclusive with activity_id and all_workflow_activities. - - Note: Experimental - the behavior of unpausing by activity type may change or be removed in a future release. - allWorkflowActivities: - type: boolean - description: |- - Unpause all paused workflow activities. - Only available if workflow_id is provided. - Mutually exclusive with activity_id and workflow_activity_type. - - Note: Experimental - the behavior of unpausing all activities may change or be removed in a future release. - resetAttempts: - type: boolean - description: Providing this flag will also reset the number of attempts. - resetHeartbeat: - type: boolean - description: Providing this flag will also reset the heartbeat details. - jitter: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ - type: string - description: If set, the activity will start at a random time within the specified jitter duration. - description: 'TODO: update batch' - UnpauseActivityExecutionResponse: - type: object - properties: {} UnpauseActivityRequest: type: object properties: @@ -15093,11 +13930,9 @@ components: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string description: If set, the activity will start at a random time within the specified jitter duration. - description: Deprecated. See UnpauseActivityExecutionRequest. UnpauseActivityResponse: type: object properties: {} - description: Deprecated. See UnpauseActivityExecutionResponse. UnpauseWorkflowExecutionRequest: type: object properties: @@ -15123,110 +13958,6 @@ components: type: object properties: {} description: Response to a successful UnpauseWorkflowExecution request. - UpdateActivityExecutionOptionsRequest: - type: object - properties: - namespace: - type: string - description: Namespace of the workflow which scheduled this activity - workflowId: - type: string - description: |- - If provided, update options for a workflow activity (or activities) for the given workflow ID. If empty, target a - standalone activity. - activityId: - type: string - description: |- - Update options for an activity with this ID. Must be provided for a standalone activity. - Mutually exclusive with workflow_activity_type and all_workflow_activities. - runId: - type: string - description: Run ID of the workflow or standalone activity. - identity: - type: string - description: The identity of the client who initiated this request - workflowActivityType: - type: string - description: |- - Update all pending workflow activities of this type. - Only available if workflow_id is provided. - Mutually exclusive with activity_id and all_workflow_activities. - - Note: Experimental - the behavior of updating by activity type may change or be removed in a future release. - allWorkflowActivities: - type: boolean - description: |- - Update all pending workflow activities. - Only available if workflow_id is provided. - Mutually exclusive with activity_id and workflow_activity_type. - - Note: Experimental - the behavior of updating all activities may change or be removed in a future release. - restoreOriginal: - type: boolean - description: |- - If set, the activity options will be restored to the options the activity was originally - created with. For workflow activities the original options are restored from first - ActivityTaskScheduled event. Mutually exclusive with the activity options fields below. - taskQueue: - allOf: - - $ref: '#/components/schemas/TaskQueue' - description: Activity options. Mutually exclusive with restore_original. - scheduleToCloseTimeout: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ - type: string - description: |- - (-- api-linter: core::0140::prepositions=disabled - aip.dev/not-precedent: "to" is used to indicate interval. --) - scheduleToStartTimeout: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ - type: string - description: |- - (-- api-linter: core::0140::prepositions=disabled - aip.dev/not-precedent: "to" is used to indicate interval. --) - startToCloseTimeout: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ - type: string - description: |- - (-- api-linter: core::0140::prepositions=disabled - aip.dev/not-precedent: "to" is used to indicate interval. --) - heartbeatTimeout: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ - type: string - retryPolicy: - $ref: '#/components/schemas/RetryPolicy' - description: |- - TODO: update batch - NOTE: keep in sync with temporal.api.batch.v1.BatchOperationUpdateActivityOptions - UpdateActivityExecutionOptionsResponse: - type: object - properties: - taskQueue: - allOf: - - $ref: '#/components/schemas/TaskQueue' - description: Activity options after the update. - scheduleToCloseTimeout: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ - type: string - description: |- - (-- api-linter: core::0140::prepositions=disabled - aip.dev/not-precedent: "to" is used to indicate interval. --) - scheduleToStartTimeout: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ - type: string - description: |- - (-- api-linter: core::0140::prepositions=disabled - aip.dev/not-precedent: "to" is used to indicate interval. --) - startToCloseTimeout: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ - type: string - description: |- - (-- api-linter: core::0140::prepositions=disabled - aip.dev/not-precedent: "to" is used to indicate interval. --) - heartbeatTimeout: - pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ - type: string - retryPolicy: - $ref: '#/components/schemas/RetryPolicy' UpdateActivityOptionsRequest: type: object properties: @@ -15265,9 +13996,7 @@ components: They are part of the first SCHEDULE event. This flag cannot be combined with any other option; if you supply restore_original together with other options, the request will be rejected. - description: |- - NOTE: keep in sync with temporal.api.batch.v1.BatchOperationUpdateActivityOptions - Deprecated. Use UpdateActivityExecutionOptionsRequest. + description: 'NOTE: keep in sync with temporal.api.batch.v1.BatchOperationUpdateActivityOptions' UpdateActivityOptionsResponse: type: object properties: @@ -15275,7 +14004,6 @@ components: allOf: - $ref: '#/components/schemas/ActivityOptions' description: Activity options after an update - description: Deprecated. See UpdateActivityExecutionOptionsResponse. UpdateDeploymentMetadata: type: object properties: diff --git a/temporal/api/activity/v1/message.proto b/temporal/api/activity/v1/message.proto index d3062297a..394bb6b94 100644 --- a/temporal/api/activity/v1/message.proto +++ b/temporal/api/activity/v1/message.proto @@ -20,17 +20,6 @@ import "temporal/api/failure/v1/message.proto"; import "temporal/api/taskqueue/v1/message.proto"; import "temporal/api/sdk/v1/user_metadata.proto"; -// When StartActivityExecution uses the ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING and there is already an existing running -// activity, OnConflictOptions defines actions to be taken on the existing running activity, updating its state. -message OnConflictOptions { - // Attaches the request ID to the running activity. - bool attach_request_id = 1; - // Attaches the completion callbacks to the running activity. - bool attach_completion_callbacks = 2; - // Attaches the links to the running activity. - bool attach_links = 3; -} - message ActivityOptions { temporal.api.taskqueue.v1.TaskQueue task_queue = 1; @@ -81,7 +70,7 @@ message ActivityExecutionInfo { google.protobuf.Timestamp last_started_time = 8; // The attempt this activity is currently on. // Incremented each time a new attempt is started. - // TODO: Confirm if this is on scheduled or started. + // TODO(dandavison): Confirm if this is on scheduled or started. int32 attempt = 9; int32 maximum_attempts = 10; // Time the activity was originally scheduled via a StartActivityExecution request. @@ -122,40 +111,11 @@ message ActivityExecutionInfo { temporal.api.common.v1.SearchAttributes search_attributes = 22; temporal.api.common.v1.Header header = 23; - // Whether the activity was started with a request_eager_execution flag set to `true`, indicating that the first - // task was delivered inline in the start response, bypassing matching. - bool eager_execution_requested = 24; - - // Callbacks to be called by the server when this activity reaches a terminal status. - // Callback addresses must be whitelisted in the server's dynamic configuration. - repeated temporal.api.common.v1.Callback completion_callbacks = 25; // Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity. - temporal.api.sdk.v1.UserMetadata user_metadata = 26; - // Links to be associated with the activity. - repeated temporal.api.common.v1.Link links = 27; + temporal.api.sdk.v1.UserMetadata user_metadata = 24; // Set if activity cancelation was requested. - string canceled_reason = 28; - - // TODO: Move this to a common package? - message PauseInfo { - // The time when the activity was paused. - google.protobuf.Timestamp pause_time = 1; - - message Manual { - // The identity of the actor that paused the activity. - string identity = 1; - // Reason for pausing the activity. - string reason = 2; - } - - oneof paused_by { - // The activity was paused by direct API invocation. - Manual manual = 2; - } - } - - PauseInfo pause_info = 29; + string canceled_reason = 25; } // Limited activity information returned in the list response. @@ -193,6 +153,4 @@ message ActivityExecutionListInfo { // The difference between close time and scheduled time. // This field is only populated if the activity is closed. google.protobuf.Duration execution_duration = 12; - - // TODO: pause_info } diff --git a/temporal/api/enums/v1/activity.proto b/temporal/api/enums/v1/activity.proto index 50cb114b2..8a6e09f3e 100644 --- a/temporal/api/enums/v1/activity.proto +++ b/temporal/api/enums/v1/activity.proto @@ -65,6 +65,4 @@ enum ActivityIdConflictPolicy { ACTIVITY_ID_CONFLICT_POLICY_FAIL = 1; // Don't start a new activity; instead return a handle for the running activity. ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING = 2; - // Terminate the running activity before starting a new one. - ACTIVITY_ID_CONFLICT_POLICY_TERMINATE_EXISTING = 3; } diff --git a/temporal/api/errordetails/v1/message.proto b/temporal/api/errordetails/v1/message.proto index 315d30c57..c01e90e2c 100644 --- a/temporal/api/errordetails/v1/message.proto +++ b/temporal/api/errordetails/v1/message.proto @@ -121,3 +121,11 @@ message MultiOperationExecutionFailure { repeated google.protobuf.Any details = 3; } } + +// An error indicating that an activity execution failed to start. Returned when there is an existing activity with the +// given activity ID, and the given ID reuse and conflict policies do not permit starting a new one or attaching to an +// existing one. +message ActivityExecutionAlreadyStartedFailure { + string start_request_id = 1; + string run_id = 2; +} diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index ccf1844fb..d18f1868c 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -1889,7 +1889,6 @@ message ExecuteMultiOperationResponse { } // NOTE: keep in sync with temporal.api.batch.v1.BatchOperationUpdateActivityOptions -// Deprecated. Use UpdateActivityExecutionOptionsRequest. message UpdateActivityOptionsRequest { // Namespace of the workflow which scheduled this activity string namespace = 1; @@ -1923,13 +1922,11 @@ message UpdateActivityOptionsRequest { bool restore_original = 8; } -// Deprecated. See UpdateActivityExecutionOptionsResponse. message UpdateActivityOptionsResponse { // Activity options after an update temporal.api.activity.v1.ActivityOptions activity_options = 1; } -// Deprecated. See PauseActivityExecutionRequest. message PauseActivityRequest { // Namespace of the workflow which scheduled this activity. string namespace = 1; @@ -1952,11 +1949,9 @@ message PauseActivityRequest { string reason = 6; } -// Deprecated. See PauseActivityExecutionResponse. message PauseActivityResponse { } -// Deprecated. See UnpauseActivityExecutionRequest. message UnpauseActivityRequest { // Namespace of the workflow which scheduled this activity. string namespace = 1; @@ -1986,12 +1981,10 @@ message UnpauseActivityRequest { google.protobuf.Duration jitter = 9; } -// Deprecated. See UnpauseActivityExecutionResponse. message UnpauseActivityResponse { } // NOTE: keep in sync with temporal.api.batch.v1.BatchOperationResetActivities -// Deprecated. See ResetActivityExecutionRequest. message ResetActivityRequest { // Namespace of the workflow which scheduled this activity. string namespace = 1; @@ -2029,7 +2022,6 @@ message ResetActivityRequest { } -// Deprecated. See ResetActivityExecutionResponse. message ResetActivityResponse { } @@ -2713,30 +2705,14 @@ message StartActivityExecutionRequest { // The default policy is ACTIVITY_ID_CONFLICT_POLICY_FAIL. temporal.api.enums.v1.ActivityIdConflictPolicy id_conflict_policy = 14; - // Arbitrary structured data that can be attached to the activity execution and made available via the list and - // describe APIs. - temporal.api.common.v1.Memo memo = 15; // Search attributes for indexing. - temporal.api.common.v1.SearchAttributes search_attributes = 16; + temporal.api.common.v1.SearchAttributes search_attributes = 15; // Header for context propagation and tracing purposes. - temporal.api.common.v1.Header header = 17; - // Request to get the first activity task inline in the response bypassing matching service and worker polling. - // If set to `true` the caller is expected to have a worker available and capable of processing the task. - // The returned task will be marked as started and is expected to be completed by the specified - // `schedule_to_close_timeout`. - bool request_eager_execution = 18; - // Callbacks to be called by the server when this activity reaches a terminal status. - // Callback addresses must be whitelisted in the server's dynamic configuration. - repeated temporal.api.common.v1.Callback completion_callbacks = 19; + temporal.api.common.v1.Header header = 16; // Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity. - temporal.api.sdk.v1.UserMetadata user_metadata = 20; - // Links to be associated with the activity. - repeated temporal.api.common.v1.Link links = 21; - // Defines actions to be done to the existing running activity when ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING is used. If not - // set or empty, it won't do anything to the existing running activity. - temporal.api.activity.v1.OnConflictOptions on_conflict_options = 22; - // Priority metadata - temporal.api.common.v1.Priority priority = 23; + temporal.api.sdk.v1.UserMetadata user_metadata = 17; + // Priority metadata. + temporal.api.common.v1.Priority priority = 18; } message StartActivityExecutionResponse { @@ -2744,12 +2720,6 @@ message StartActivityExecutionResponse { string run_id = 1; // If true, a new activity was started. bool started = 2; - // When `request_eager_execution` is set on the `StartActivityExecutionRequest`, the server will return the first - // activity task to be eagerly executed. - // The caller is expected to have a worker available to process the task. - PollActivityTaskQueueResponse eager_task = 3; - // Link to the activity. - temporal.api.common.v1.Link link = 4; } message DescribeActivityExecutionRequest { @@ -2812,10 +2782,6 @@ message GetActivityExecutionOutcomeResponse { } } - - - - message ListActivityExecutionsRequest { string namespace = 1; // Max number of executions to return per page. @@ -2896,195 +2862,3 @@ message DeleteActivityExecutionRequest { message DeleteActivityExecutionResponse { } - -// TODO: update batch -// NOTE: keep in sync with temporal.api.batch.v1.BatchOperationUpdateActivityOptions -message UpdateActivityExecutionOptionsRequest { - // Namespace of the workflow which scheduled this activity - string namespace = 1; - - // If provided, update options for a workflow activity (or activities) for the given workflow ID. If empty, target a - // standalone activity. - string workflow_id = 2; - // Update options for an activity with this ID. Must be provided for a standalone activity. - // Mutually exclusive with workflow_activity_type and all_workflow_activities. - string activity_id = 3; - // Run ID of the workflow or standalone activity. - string run_id = 4; - - // The identity of the client who initiated this request - string identity = 5; - - // Update all pending workflow activities of this type. - // Only available if workflow_id is provided. - // Mutually exclusive with activity_id and all_workflow_activities. - // - // Note: Experimental - the behavior of updating by activity type may change or be removed in a future release. - string workflow_activity_type = 6; - // Update all pending workflow activities. - // Only available if workflow_id is provided. - // Mutually exclusive with activity_id and workflow_activity_type. - // - // Note: Experimental - the behavior of updating all activities may change or be removed in a future release. - bool all_workflow_activities = 7; - - // If set, the activity options will be restored to the options the activity was originally - // created with. For workflow activities the original options are restored from first - // ActivityTaskScheduled event. Mutually exclusive with the activity options fields below. - bool restore_original = 8; - - // Activity options. Mutually exclusive with restore_original. - temporal.api.taskqueue.v1.TaskQueue task_queue = 9; - // (-- api-linter: core::0140::prepositions=disabled - // aip.dev/not-precedent: "to" is used to indicate interval. --) - google.protobuf.Duration schedule_to_close_timeout = 10; - // (-- api-linter: core::0140::prepositions=disabled - // aip.dev/not-precedent: "to" is used to indicate interval. --) - google.protobuf.Duration schedule_to_start_timeout = 11; - // (-- api-linter: core::0140::prepositions=disabled - // aip.dev/not-precedent: "to" is used to indicate interval. --) - google.protobuf.Duration start_to_close_timeout = 12; - google.protobuf.Duration heartbeat_timeout = 13; - temporal.api.common.v1.RetryPolicy retry_policy = 14; -} - -message UpdateActivityExecutionOptionsResponse { - // Activity options after the update. - temporal.api.taskqueue.v1.TaskQueue task_queue = 1; - // (-- api-linter: core::0140::prepositions=disabled - // aip.dev/not-precedent: "to" is used to indicate interval. --) - google.protobuf.Duration schedule_to_close_timeout = 2; - // (-- api-linter: core::0140::prepositions=disabled - // aip.dev/not-precedent: "to" is used to indicate interval. --) - google.protobuf.Duration schedule_to_start_timeout = 3; - // (-- api-linter: core::0140::prepositions=disabled - // aip.dev/not-precedent: "to" is used to indicate interval. --) - google.protobuf.Duration start_to_close_timeout = 4; - google.protobuf.Duration heartbeat_timeout = 5; - temporal.api.common.v1.RetryPolicy retry_policy = 6; -} - -message PauseActivityExecutionRequest { - // Namespace of the workflow which scheduled this activity. - string namespace = 1; - - // If provided, pause a workflow activity (or activities) for the given workflow ID. - // If empty, target a standalone activity. - string workflow_id = 2; - // Pause an activity with this ID. Must be provided for a standalone activity. - // Mutually exclusive with workflow_activity_type. - string activity_id = 3; - // Run ID of the workflow or standalone activity. - string run_id = 4; - - // The identity of the client who initiated this request. - string identity = 5; - - // Pause all pending activities of this type. - // Only available if workflow_id is provided. - // Mutually exclusive with activity_id. - // - // Note: Experimental - the behavior of pausing by activity type might change or be removed in a future release. - string workflow_activity_type = 6; - - // Reason to pause the activity. - string reason = 7; -} - -message PauseActivityExecutionResponse { -} - -// TODO: update batch -message UnpauseActivityExecutionRequest { - // Namespace of the workflow which scheduled this activity. - string namespace = 1; - - // If provided, unpause a workflow activity (or activities) for the given workflow ID. - // If empty, target a standalone activity. - string workflow_id = 2; - // Unpause an activity with this ID. Must be provided for a standalone activity. - // Mutually exclusive with workflow_activity_type and all_workflow_activities. - string activity_id = 3; - // Run ID of the workflow or standalone activity. - string run_id = 4; - - // The identity of the client who initiated this request. - string identity = 5; - - // Unpause all currently paused workflow activities of this type. - // Only available if workflow_id is provided. - // Mutually exclusive with activity_id and all_workflow_activities. - // - // Note: Experimental - the behavior of unpausing by activity type may change or be removed in a future release. - string workflow_activity_type = 6; - // Unpause all paused workflow activities. - // Only available if workflow_id is provided. - // Mutually exclusive with activity_id and workflow_activity_type. - // - // Note: Experimental - the behavior of unpausing all activities may change or be removed in a future release. - bool all_workflow_activities = 7; - - // Providing this flag will also reset the number of attempts. - bool reset_attempts = 8; - - // Providing this flag will also reset the heartbeat details. - bool reset_heartbeat = 9; - - // If set, the activity will start at a random time within the specified jitter duration. - google.protobuf.Duration jitter = 10; -} - -message UnpauseActivityExecutionResponse { -} - -// TODO: update batch -// NOTE: keep in sync with temporal.api.batch.v1.BatchOperationResetActivities -message ResetActivityExecutionRequest { - // Namespace of the workflow which scheduled this activity. - string namespace = 1; - - // If provided, reset a workflow activity (or activities) for the given workflow ID. - // If empty, target a standalone activity. - string workflow_id = 2; - // Reset an activity with this ID. Must be provided for a standalone activity. - // Mutually exclusive with workflow_activity_type and all_workflow_activities. - string activity_id = 3; - // Run ID of the workflow or standalone activity. - string run_id = 4; - - // The identity of the client who initiated this request. - string identity = 5; - - // Reset all pending workflow activities of this type. - // Only available if workflow_id is provided. - // Mutually exclusive with activity_id and all_workflow_activities. - // - // Note: Experimental - the behavior of resetting by activity type may change or be removed in a future release. - string workflow_activity_type = 6; - // Reset all pending workflow activities. - // Only available if workflow_id is provided. - // Mutually exclusive with activity_id and workflow_activity_type. - // - // Note: Experimental - the behavior of resetting all activities may change or be removed in a future release. - bool all_workflow_activities = 7; - - // Indicates that activity should reset heartbeat details. - // This flag will be applied only to the new instance of the activity. - bool reset_heartbeat = 8; - - // If activity is paused, it will remain paused after reset - bool keep_paused = 9; - - // If set, and activity is in backoff, the activity will start at a random time within the specified jitter duration. - // (unless it is paused and keep_paused is set) - google.protobuf.Duration jitter = 10; - - // If set, the activity options will be restored to the defaults. - // Default options are then options activity was originally created with. - // For workflow activities the original options are restored from first ActivityTaskScheduled event. - bool restore_original_options = 11; - -} - -message ResetActivityExecutionResponse { -} diff --git a/temporal/api/workflowservice/v1/service.proto b/temporal/api/workflowservice/v1/service.proto index 79b12ba81..4f940c350 100644 --- a/temporal/api/workflowservice/v1/service.proto +++ b/temporal/api/workflowservice/v1/service.proto @@ -1022,30 +1022,10 @@ service WorkflowService { rpc RespondNexusTaskFailed(RespondNexusTaskFailedRequest) returns (RespondNexusTaskFailedResponse) { } - // UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID or type. - // If there are multiple pending activities of the provided type - all of them will be updated. - rpc UpdateActivityExecutionOptions (UpdateActivityExecutionOptionsRequest) returns (UpdateActivityExecutionOptionsResponse) { - option (google.api.http) = { - post: "/namespaces/activities/{activity_id}/update-options" - body: "*" - additional_bindings { - post: "/api/v1/namespaces/activities/{activity_id}/update-options" - body: "*" - } - additional_bindings { - post: "/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/update-options" - body: "*" - } - additional_bindings { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/update-options" - body: "*" - } - }; - } - // UpdateActivityOptions is called by the client to update the options of an activity by its ID or type. // If there are multiple pending activities of the provided type - all of them will be updated. - // Deprecated. See UpdateActivityExecutionOptions. + // This API will be deprecated soon and replaced with a newer UpdateActivityExecutionOptions that is better named and + // structured to work well for standalone activities. rpc UpdateActivityOptions (UpdateActivityOptionsRequest) returns (UpdateActivityOptionsResponse) { option (google.api.http) = { post: "/namespaces/{namespace}/activities/update-options" @@ -1069,41 +1049,6 @@ service WorkflowService { }; } - // PauseActivityExecution pauses the execution of an activity specified by its ID or type. - // If there are multiple pending activities of the provided type - all of them will be paused - // - // Pausing an activity means: - // - If the activity is currently waiting for a retry or is running and subsequently fails, - // it will not be rescheduled until it is unpaused. - // - If the activity is already paused, calling this method will have no effect. - // - If the activity is running and finishes successfully, the activity will be completed. - // - If the activity is running and finishes with failure: - // * if there is no retry left - the activity will be completed. - // * if there are more retries left - the activity will be paused. - // For long-running activities: - // - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. - // - The activity should respond to the cancellation accordingly. - // - // Returns a `NotFound` error if there is no pending activity with the provided ID or type - rpc PauseActivityExecution (PauseActivityExecutionRequest) returns (PauseActivityExecutionResponse) { - option (google.api.http) = { - post: "/namespaces/activities/{activity_id}/pause" - body: "*" - additional_bindings { - post: "/api/v1/namespaces/activities/{activity_id}/pause" - body: "*" - } - additional_bindings { - post: "/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/pause" - body: "*" - } - additional_bindings { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/pause" - body: "*" - } - }; - } - // PauseActivity pauses the execution of an activity specified by its ID or type. // If there are multiple pending activities of the provided type - all of them will be paused // @@ -1120,7 +1065,8 @@ service WorkflowService { // - The activity should respond to the cancellation accordingly. // // Returns a `NotFound` error if there is no pending activity with the provided ID or type - // Deprecated. See PauseActivityExecution. + // This API will be deprecated soon and replaced with a newer PauseActivityExecution that is better named and + // structured to work well for standalone activities. rpc PauseActivity (PauseActivityRequest) returns (PauseActivityResponse) { option (google.api.http) = { post: "/namespaces/{namespace}/activities/pause" @@ -1132,38 +1078,6 @@ service WorkflowService { }; } - // UnpauseActivityExecution unpauses the execution of an activity specified by its ID or type. - // If there are multiple pending activities of the provided type - all of them will be unpaused. - // - // If activity is not paused, this call will have no effect. - // If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). - // Once the activity is unpaused, all timeout timers will be regenerated. - // - // Flags: - // 'jitter': the activity will be scheduled at a random time within the jitter duration. - // 'reset_attempts': the number of attempts will be reset. - // 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. - // - // Returns a `NotFound` error if there is no pending activity with the provided ID or type - rpc UnpauseActivityExecution (UnpauseActivityExecutionRequest) returns (UnpauseActivityExecutionResponse) { - option (google.api.http) = { - post: "/namespaces/activities/{activity_id}/unpause" - body: "*" - additional_bindings { - post: "/api/v1/namespaces/activities/{activity_id}/unpause" - body: "*" - } - additional_bindings { - post: "/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/unpause" - body: "*" - } - additional_bindings { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/unpause" - body: "*" - } - }; - } - // UnpauseActivity unpauses the execution of an activity specified by its ID or type. // If there are multiple pending activities of the provided type - all of them will be unpaused. // @@ -1177,7 +1091,8 @@ service WorkflowService { // 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. // // Returns a `NotFound` error if there is no pending activity with the provided ID or type - // Deprecated. See UnpauseActivityExecution. + // This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and + // structured to work well for standalone activities. rpc UnpauseActivity (UnpauseActivityRequest) returns (UnpauseActivityResponse) { option (google.api.http) = { post: "/namespaces/{namespace}/activities/unpause" @@ -1189,42 +1104,6 @@ service WorkflowService { }; } - // ResetActivityExecution resets the execution of an activity specified by its ID or type. - // If there are multiple pending activities of the provided type - all of them will be reset. - // - // Resetting an activity means: - // * number of attempts will be reset to 0. - // * activity timeouts will be reset. - // * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: - // it will be scheduled immediately (* see 'jitter' flag), - // - // Flags: - // - // 'jitter': the activity will be scheduled at a random time within the jitter duration. - // If the activity currently paused it will be unpaused, unless 'keep_paused' flag is provided. - // 'reset_heartbeats': the activity heartbeat timer and heartbeats will be reset. - // 'keep_paused': if the activity is paused, it will remain paused. - // - // Returns a `NotFound` error if there is no pending activity with the provided ID or type. - rpc ResetActivityExecution (ResetActivityExecutionRequest) returns (ResetActivityExecutionResponse) { - option (google.api.http) = { - post: "/namespaces/activities/{activity_id}/reset" - body: "*" - additional_bindings { - post: "/api/v1/namespaces/activities/{activity_id}/reset" - body: "*" - } - additional_bindings { - post: "/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/reset" - body: "*" - } - additional_bindings { - post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/reset" - body: "*" - } - }; - } - // ResetActivity resets the execution of an activity specified by its ID or type. // If there are multiple pending activities of the provided type - all of them will be reset. // @@ -1242,7 +1121,8 @@ service WorkflowService { // 'keep_paused': if the activity is paused, it will remain paused. // // Returns a `NotFound` error if there is no pending activity with the provided ID or type. - // Deprecated. See ResetActivityExecution. + // This API will be deprecated soon and replaced with a newer ResetActivityExecution that is better named and + // structured to work well for standalone activities. rpc ResetActivity (ResetActivityRequest) returns (ResetActivityResponse) { option (google.api.http) = { post: "/namespaces/{namespace}/activities/reset"