Disable operator API service

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

POST https://moi.matrixorigin.cn/newmoi/workflow/v2/workitems/catalog/$NODE_ID/api-service/disable?version=$VERSION

Preparation before calling

First View Service Configuration, confirm the service to be deactivated and its operator ID and version. Prepare the personal access token, target workspace ID, operator ID, and version that has access to the target workspace.

Request parameters

node_idstringRequired
The ID of the operator to deactivate the service.
versionstringRequired
Operator version.

Request example

curl -X POST "https://moi.matrixorigin.cn/newmoi/workflow/v2/workitems/catalog/$NODE_ID/api-service/disable?version=$VERSION" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Successful response

The response returns the updated service configuration. The service has been deactivated; the service must be enabled before it can be called again.

The response fields are as follows.

codestring
OK on success.
msgstring
OK on success.
data.service.api_service_idstring
Service ID.
data.service.operator_idinteger
Published custom operator ID.
data.service.node_idstring
Operator ID.
data.service.versionstring
Operator version.
data.service.service_namestring
Service name.
data.service.statusstring
The updated service status; disabled means it cannot be called.
data.service.result_modestring
The result return mode of the service.
data.service.auth_modestring
The authentication mode of the service.
data.service.methodstring
Service calling method; returned if there is a value.
data.service.pathstring
Service call path; returned if there is a value.
data.service.workflow_idstring
The workflow ID associated with the service; returned if there is a value.
data.service.workflow_def_idstring
The workflow definition ID associated with the service; returned if there is a value.
data.service.workflow_version_idstring
The workflow version ID associated with the service; returned if there is a value.
data.service.input_schemastring
The serialized content of the input schema; returned if there is a value.
data.service.output_schemastring
Output the serialized content of schema; return if there is a value.
data.service.compute_resource_idstring
The computing resource ID used by the service; returned if there is a value.
data.service.timeout_secondsinteger
Timeout for a single call, in seconds; returned if there is a value.
data.service.max_concurrencyinteger
The maximum number of concurrent calls; returned when there is a value.
data.service.rate_limit_per_mininteger
Maximum number of calls per minute; returned if there is a value.
data.service.invokeobject
Information required to call the service; returned if there is a value.
data.service.deploymentobject
Service deployment information; returned if there is a value.

Successful response example

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "service": {
      "api_service_id": "api_2e859efcedc1e0efea48b465b2197784",
      "node_id": "moi:data.sql.process",
      "version": "v1",
      "service_name": "operator-api-37f61ebdaa18aa51",
      "status": "disabled"
    }
  }
}

Error response

codestring
Error code.
msgstring
Readable error message.
datanull
`null` in an error response.

Error response example

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

Follow-up operations

After completion View operator API service configuration confirms the current status.

Last updated on