# View custom operator list

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

View the custom operators that can be read in the current workspace. The returned operator ID can be used to view, modify, test run, or delete the operator.

```text
GET https://moi.matrixorigin.cn/newmoi/workflow/v2/custom-operators
```

## Preparation before calling

Prepare a personal access token and target workspace ID that has access to the target workspace.


## Request parameters

::::{div} mo-api-split
:::{div} mo-api-split-main

```{raw} html
<dl class="mo-api-fields">

</dl>
```

:::
:::{div} mo-api-split-aside

```{raw} html
<p class="mo-api-example-label">Request example</p>
```

```bash
curl "https://moi.matrixorigin.cn/newmoi/workflow/v2/custom-operators?page_size=20&enabled=true" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"
```

:::
::::

## Successful response

The response returns a custom operator that meets the conditions. When the response contains the next page token, use it as the `page_token` for the next request; if it is not returned, it means that the reading has been completed.


The response fields are as follows.

In this document, `[]` after a type denotes an array. In a field path, `[]` denotes each item in an array; for example, `items[].name` is the `name` field of each item in the `items` array.

::::{div} mo-api-split
:::{div} mo-api-split-main

```{raw} html
<dl class="mo-api-fields">
  <div class="mo-api-field"><dt><code>code</code><span class="mo-api-field__type">string</span></dt><dd>OK on success.</dd></div>
  <div class="mo-api-field"><dt><code>msg</code><span class="mo-api-field__type">string</span></dt><dd>OK on success.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[]</code><span class="mo-api-field__type">array</span></dt><dd>Custom operator list.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].id</code><span class="mo-api-field__type">integer</span></dt><dd>Custom operator ID, used for subsequent operations.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].node_id</code><span class="mo-api-field__type">string</span></dt><dd>Operator ID in the workflow.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].name</code><span class="mo-api-field__type">string</span></dt><dd>Operator name.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].identifier</code><span class="mo-api-field__type">string</span></dt><dd>Operator ID.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].description</code><span class="mo-api-field__type">string</span></dt><dd>Operator description; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].handler</code><span class="mo-api-field__type">string</span></dt><dd>Processing function; returns if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].version</code><span class="mo-api-field__type">string</span></dt><dd>Operator version; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].isolation_level</code><span class="mo-api-field__type">string</span></dt><dd>Isolation configuration; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].language</code><span class="mo-api-field__type">integer</span></dt><dd>Implements the numerical encoding of the language; returns if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].kind</code><span class="mo-api-field__type">integer</span></dt><dd>Numeric encoding of the operator type; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].source_file_id</code><span class="mo-api-field__type">string</span></dt><dd>Source file ID; returned when created using a source file.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].input_schema</code><span class="mo-api-field__type">string</span></dt><dd>Enter the defined serialization content; return if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].output_schema</code><span class="mo-api-field__type">string</span></dt><dd>Output the defined serialized content; return if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].binding_config</code><span class="mo-api-field__type">string</span></dt><dd>The serialized content of the binding configuration; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].created_by</code><span class="mo-api-field__type">string</span></dt><dd>Creator ID; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].updated_by</code><span class="mo-api-field__type">string</span></dt><dd>Last updater ID; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].created_at</code><span class="mo-api-field__type">integer</span></dt><dd>Creation timestamp; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].updated_at</code><span class="mo-api-field__type">integer</span></dt><dd>Last updated timestamp; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].base_node_id</code><span class="mo-api-field__type">string</span></dt><dd>The basic operator associated with the built-in binding type; returned when there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].base_node_version</code><span class="mo-api-field__type">string</span></dt><dd>The basic operator version associated with the built-in binding type; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].catalog_id</code><span class="mo-api-field__type">integer</span></dt><dd>The associated Catalog ID; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].database_id</code><span class="mo-api-field__type">integer</span></dt><dd>The associated database ID; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.items[].enabled</code><span class="mo-api-field__type">boolean</span></dt><dd>Whether the operator is enabled.</dd></div>
  <div class="mo-api-field"><dt><code>data.total</code><span class="mo-api-field__type">integer</span></dt><dd>The total number of items that match the filter conditions.</dd></div>
  <div class="mo-api-field"><dt><code>data.next_page_token</code><span class="mo-api-field__type">string</span></dt><dd>Next page mark; does not return if there is no next page.</dd></div>
</dl>
```

:::
:::{div} mo-api-split-aside

```{raw} html
<p class="mo-api-example-label">Successful response example</p>
```

```json
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "items": [
      {
        "id": 123,
        "node_id": "moi:custom.operator:workspace:text_counter",
        "name": "文本计数",
        "identifier": "text_counter",
        "version": "v1",
        "enabled": true
      }
    ],
    "total": 1
  }
}
```

:::
::::

## Error response

::::{div} mo-api-split
:::{div} mo-api-split-main

```{raw} html
<dl class="mo-api-fields">
  <div class="mo-api-field"><dt><code>code</code><span class="mo-api-field__type">string</span></dt><dd>Error code.</dd></div>
  <div class="mo-api-field"><dt><code>msg</code><span class="mo-api-field__type">string</span></dt><dd>Readable error message.</dd></div>
  <div class="mo-api-field"><dt><code>data</code><span class="mo-api-field__type">null</span></dt><dd>`null` in an error response.</dd></div>
</dl>
```

:::
:::{div} mo-api-split-aside

```{raw} html
<p class="mo-api-example-label">Error response example</p>
```

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

:::
::::

## Follow-up operations

[Query custom operator details](get-custom-operator.md).
