View operator API service configuration

Check whether the specified operator version has been released, as well as the name, status, and input definitions required to call the service.

HTTP
GET $CLOUDSIGMA_API_BASE/workflow/v2/workitems/catalog/$NODE_ID/api-service?version=$VERSION

Before you call this API

Configure the regional API endpoint and authentication, and select the target workspace.

First View operator list to confirm the operator you want to view and its version.

Request

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

Request parameters

ParameterTypeRequiredDescription
node_idstringRequiredOperator ID. It can be obtained from the [View operator list](../operator-catalog/list-operators.md) response.
versionstringRequiredOperator version.

Successful response

The response returns the service configuration. Only after confirming that the service is enabled can you call service; when calling, the returned service name, version and input definition will be used as is for the request.

The response fields are as follows.

JSON
{
  "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": "ready",
      "method": "POST",
      "path": "/v5/workflow/v2/workitems/catalog/moi:data.sql.process/api-service/invoke",
      "input_schema": "{\"type\":\"object\",\"properties\":{\"sql\":{\"type\":\"string\"}}}"
    }
  }
}
FieldTypeDescription
codestringOK on success.
msgstringOK on success.
data.service.api_service_idstringService ID.
data.service.operator_idintegerPublished custom operator ID.
data.service.node_idstringPublished operator ID.
data.service.versionstringPublished operator version.
data.service.service_namestringThe service name that must be passed in when calling the service.
data.service.statusstringunpublished means it has not been released yet, ready means it can be called, and disabled means it has been deactivated.
data.service.result_modestringThe service result return mode.
data.service.auth_modestringThe authentication mode of the service.
data.service.methodstringThe HTTP method used to call the service.
data.service.pathstringRelative path to the calling service.
data.service.workflow_idstringThe workflow ID associated with the service; returned if there is a value.
data.service.workflow_def_idstringThe workflow definition ID associated with the service; returned if there is a value.
data.service.workflow_version_idstringThe workflow version ID associated with the service; returned if there is a value.
data.service.input_schemastringInput data definition. Fill in the payload of the calling request according to its fields and types.
data.service.output_schemastringOutput data definition; returned if there is a value.
data.service.compute_resource_idstringThe computing resource ID used by the service; returned if there is a value.
data.service.timeout_secondsintegerTimeout for a single call, in seconds; returned if there is a value.
data.service.max_concurrencyintegerThe maximum number of concurrent calls; returned when there is a value.
data.service.rate_limit_per_minintegerMaximum number of calls per minute; returned if there is a value.
data.service.invokeobjectInformation required to call the service; returned if there is a value.
data.service.deploymentobjectService deployment information; returned if there is a value.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "请求参数无效",
  "data": null
}
FieldTypeDescription
codestringError code.
msgstringReadable error message.
datanull`null` in an error response.

Follow-up operations

When the published content needs to be changed, publish the operator API service; when it needs to be deactivated, deactivate the operator API service.

Last updated on