> For the complete documentation index, see [llms.txt](https://docs.nected.ai/nected-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nected.ai/nected-docs/management-api/rules/list-rules-get-all.md).

# List rules (Get all)

Get a paginated list of rules in your workspace, with optional filtering by name.

Use the API reference below to try the endpoint.

## List rules

> Get a paginated list of rules in your workspace with optional filtering by name.\
> \
> The \*\*200\*\* body includes \`paginationInfo\` (\`perPage\`, \`totalPage\`, \`currentPage\`, \`totalRecord\`) and \`data\`: an array of \*\*summary\*\* rows (\`id\`, \`name\`, \`type\`, \`checksum\`, \`version\`, \`status\`, timestamps, \`staticUrl\`, etc.). This is \*\*not\*\* the full rule JSON—use \*\*Get rule by id\*\* for \`customInput\`, \`conditions\`, \`action\`, \`decisionTable\`, etc.\
> \
> Example payload is loaded from \`Rule/Get/GET\_ALL.json\` when you run \`ruby Rule/scripts/build\_openapi.rb\`.

```json
{"openapi":"3.0.3","info":{"title":"Nected Rule API (Dev V1)","version":"1.0"},"tags":[{"name":"Rule","description":"List, create, read, update, test, schedule, and publish rules."}],"servers":[{"url":"https://api.nected.ai","description":"Production"}],"security":[{"DevAuth":[]}],"components":{"securitySchemes":{"DevAuth":{"type":"apiKey","in":"header","name":"Nected-API-Key","description":"Dev API key (`Nected-API-Key` header)"}},"schemas":{"ListRulesResponse":{"type":"object","description":"Success response for GET /dev/v1/rule","properties":{"paginationInfo":{"$ref":"#/components/schemas/PaginationInfo"},"data":{"type":"array","items":{"$ref":"#/components/schemas/RuleListItem"}},"code":{"type":"string"},"message":{"type":"string"}}},"PaginationInfo":{"type":"object","description":"Pagination metadata returned by GET /dev/v1/rule (list rules)","properties":{"perPage":{"type":"integer","description":"Page size (items per page)"},"totalPage":{"type":"integer","description":"Total number of pages"},"currentPage":{"type":"integer","description":"Current page index"},"totalRecord":{"type":"integer","description":"Total records across all pages"}}},"RuleListItem":{"type":"object","description":"Summary row for one rule in the list response (not the full rule document from Get by id)","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["simpleRule","decisionTable","ruleSet"]},"ruleSetPolicy":{"type":"string"},"policy":{"type":"string"},"version":{"type":"string","description":"e.g. draft or published version label"},"status":{"type":"string"},"staticUrl":{"type":"string","format":"uri"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string"},"publishedAt":{"type":"string","nullable":true},"testedAt":{"type":"string","nullable":true},"checksum":{"type":"string"},"isLive":{"type":"boolean"}}},"Response":{"type":"object","description":"Standard API response wrapper","properties":{"code":{"type":"string"},"data":{"description":"Response payload: rule object, array of rules (list), version rows, or execution result — shape varies by endpoint"},"message":{"type":"string"},"pageNo":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"},"totalPages":{"type":"integer"},"paginationInfo":{"$ref":"#/components/schemas/PaginationInfo"}}}}},"paths":{"/dev/v1/rule":{"get":{"operationId":"listRules","tags":["Rule"],"summary":"List rules","description":"Get a paginated list of rules in your workspace with optional filtering by name.\n\nThe **200** body includes `paginationInfo` (`perPage`, `totalPage`, `currentPage`, `totalRecord`) and `data`: an array of **summary** rows (`id`, `name`, `type`, `checksum`, `version`, `status`, timestamps, `staticUrl`, etc.). This is **not** the full rule JSON—use **Get rule by id** for `customInput`, `conditions`, `action`, `decisionTable`, etc.\n\nExample payload is loaded from `Rule/Get/GET_ALL.json` when you run `ruby Rule/scripts/build_openapi.rb`.","parameters":[{"name":"Nected-Branch","in":"header","required":false,"description":"Branch name (optional)","schema":{"type":"string"}},{"name":"pageNo","in":"query","schema":{"type":"integer","default":1},"description":"Page number"},{"name":"pageSize","in":"query","schema":{"type":"integer","default":10},"description":"Items per page"},{"name":"name","in":"query","schema":{"type":"string"},"description":"Search / filter by name"}],"responses":{"200":{"description":"OK — `paginationInfo` + summary `data` rows (see `ListRulesResponse`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRulesResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nected.ai/nected-docs/management-api/rules/list-rules-get-all.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
