Disable operator API service

Deactivate the published operator API service. After deactivation, the service can no longer be called.

HTTP
POST $CLOUDSIGMA_API_BASE/workflow/v2/workitems/catalog/{node_id}/api-service/disable?version={version}

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First query the operator API service configuration, confirm that the service is currently callable, and obtain the operator ID and version. Prepare personal access token and target workspace ID that can access the target workspace.

Select a custom operator enabled in the current workspace. The same operator name must be uniquely located in the workspace. System operators, disabled operators, or operators with the same name cannot be operated through this interface.

Request parameters

Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID, $NODE_ID, and $VERSION with actual values.

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/workflow/v2/workitems/catalog/$NODE_ID/api-service/disable?version=$VERSION" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Parameter

Type

Required

Description

node_id

string

Yes

The operator ID of the service to be deactivated, located in the request path.

version

string

Yes

operator version, located in the query parameters.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "service": {
      "node_id": "moi:data.sql.process",
      "version": "v1",
      "service_name": "operator-api-37f61ebdaa18aa51",
      "status": "disabled",
      "result_mode": "oneshot",
      "auth_mode": "api_key",
      "method": "POST",
      "path": "/workspaces/ws-001/dynamic-services/invoke",
      "input_schema": "",
      "output_schema": "",
      "api_service_id": "api_2e859efcedc1e0efea48b465b2197784",
      "invoke": {
        "method": "POST",
        "path": "/workspaces/ws-001/dynamic-services/invoke",
        "result_mode": "oneshot",
        "body_example": {
          "service_name": "operator-api-37f61ebdaa18aa51",
          "payload": {
            "sql": "SELECT now()"
          }
        }
      },
      "workflow_id": "api_2e859efcedc1e0efea48b465b2197784",
      "workflow_version_id": "version-example"
    }
  }
}

Field

Type

Description

code

string

OK when the request is processed successfully.

msg

string

Descriptive text for request processing.

data

object

response data.

data.service

object

API service information.

data.service.operator_id

integer

operator ID. Can be omitted if not set.

data.service.node_id

string

operator ID.

data.service.version

string

operator version.

data.service.service_name

string

Service name.

data.service.status

string

Updated service status. disabled means it cannot be called. Values: unpublished, ready, disabled, paused.

data.service.workflow_id

string

workflow ID. Can be omitted if not set.

data.service.workflow_def_id

string

workflow definition ID. Can be omitted if not set.

data.service.workflow_version_id

string

workflow version ID. Can be omitted if not set.

data.service.result_mode

string

Result return method.

data.service.auth_mode

string

Authentication method.

data.service.method

string

The HTTP method used by the call.

data.service.path

string

Service call path. Concatenated after the API base address when requesting.

data.service.input_schema

string

JSON Schema of the input parameters.

data.service.output_schema

string

JSON Schema of the output result.

data.service.timeout_seconds

integer

Call timeout in seconds. Can be omitted if not set.

data.service.max_concurrency

integer

The maximum number of concurrent calls. Can be omitted if not set.

data.service.rate_limit_per_min

integer

Limit on the number of calls per minute. Can be omitted if not set.

data.service.compute_resource_id

string

The computing resource ID used. Can be omitted if not set.

data.service.deployment

object

Deployment information. Can be omitted if not set.

data.service.deployment.service_name

string

Service name.

data.service.deployment.invoke

object

Call configuration. Can be omitted if not set.

data.service.deployment.invoke.method

string

The HTTP method used by the call.

data.service.deployment.invoke.path

string

Service call path. Concatenated after the API base address when requesting.

data.service.deployment.invoke.result_mode

string

Result return method.

data.service.deployment.invoke.body_example

object

Call request body example. Can be omitted if not set.

data.service.deployment.version

object

Deployed workflow version object. Omitted when not deployed or obtained.

data.service.deployment.version.id

string

Object ID. Can be omitted if not set.

data.service.deployment.version.workspace_id

string

The workspace ID to which it belongs. Can be omitted if not set.

data.service.deployment.version.workflow_id

string

workflow ID. Can be omitted if not set.

data.service.deployment.version.version

integer

Current version number. Can be omitted if not set.

data.service.deployment.version.workflow

JSON value

Saved workflow definition. The actual structure varies with version content. Omitted if not set.

data.service.deployment.version.status

string

Current status. Can be omitted if not set. Values: draft, published, deprecated.

data.service.deployment.version.created_by

string

Creator ID. Can be omitted if not set.

data.service.deployment.version.created_at

string

Creation time, in RFC 3339 format. Can be omitted if not set.

data.service.deployment.version.published_at

string

Release time. Can be omitted if not set.

data.service.deployment.version.type

integer

Operation type. Can be omitted if not set. Value: 1, 2.

data.service.deployment.version.input_schema

string

JSON Schema of the input parameters. Can be omitted if not set.

data.service.deployment.version.output_schema

string

JSON Schema of the output result. Can be omitted if not set.

data.service.deployment.version.result_mode

integer

Result return method. Can be omitted if not set. Values: 0, 1, 2.

data.service.deployment.version.description

string

Description. Can be omitted if not set.

data.service.deployment.version.runtime_spec_json

string

JSON string for the run configuration. Can be omitted if not set.

data.service.api_service_id

string

Service ID.

data.service.invoke

object

Call configuration.

data.service.invoke.method

string

The HTTP method used by the call.

data.service.invoke.path

string

Service call path. Concatenated after the API base address when requesting.

data.service.invoke.result_mode

string

Result return method.

data.service.invoke.body_example

object

Call request body example. Can be omitted if not set.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "请求参数无效"
}

Field

Type

Description

code

string

error code.

msg

string

Readable error message.

Last updated on