> For the complete documentation index, see [llms.txt](https://docs.silk.us/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.silk.us/api-reference/endpoints/collection/collection-task-definitions.md).

# Collection task definitions

Collection task definitions are the tasks and monitors that the Collection Data Manager runs, including dynamic tasks. A monitor collects a set of files on a recurring schedule.

Use this endpoint to set up recurring diagnostic collection, add or remove jobs in an existing definition, or change its schedule, priority, or enabled state.

## GET /collect\_manager/collection\_task\_definition

> List collection task definitions

```json
{"openapi":"3.0.3","info":{"title":"Silk RESTful API","version":"9.5.20"},"tags":[{"name":"Collection task definitions","description":"Collection task definitions are the tasks and monitors that the Collection Data Manager runs, including dynamic tasks. A monitor collects a set of files on a recurring schedule.\n\nUse this endpoint to set up recurring diagnostic collection, add or remove jobs in an existing definition, or change its schedule, priority, or enabled state."}],"servers":[{"url":"https://{host-address}/api/v2","description":"Your Silk Data Pod (SDP)","variables":{"host-address":{"default":"sdp.example.com","description":"Management address of your SDP."}}}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic authentication. The server responds only to HTTPS requests. Access to object URLs, operations, and fields depends on the user's role (for example `admin` or `viewer`)."}},"parameters":{"limit":{"name":"__limit","in":"query","schema":{"type":"integer"},"description":"Caps the number of returned entities. Requires a sort parameter when paging."},"offset":{"name":"__offset","in":"query","schema":{"type":"integer"},"description":"Returns results starting from this offset. Requires a sort parameter when paging."},"sort":{"name":"__sort","in":"query","schema":{"type":"string"},"description":"Comma-separated object properties to sort by."},"sort_order":{"name":"__sort_order","in":"query","schema":{"type":"string","enum":["asc","desc"]},"description":"Sort direction."}},"schemas":{"Collection":{"type":"object","properties":{"hits":{"type":"array","items":{},"description":"The matching objects."},"limit":{"type":"integer","description":"Page size."},"offset":{"type":"integer","description":"Offset of the first returned object."},"total":{"type":"integer","description":"Total number of matching objects."}}},"CollectManagerCollectionTaskDefinition":{"type":"object","properties":{"auto_start":{"type":"boolean"},"collect_data_blocks":{"type":"string"},"collect_logs_interval":{"nullable":true},"collect_logs_timeout":{"type":"integer"},"default_collect_logs_interval":{"nullable":true},"default_collect_logs_timeout":{"type":"integer"},"default_description":{"type":"string"},"default_is_enabled":{"type":"boolean"},"default_period":{"type":"integer"},"default_priority":{"type":"integer"},"description":{"type":"string"},"event_type":{"type":"string"},"fetch_next_dnode":{"type":"boolean"},"id":{"type":"integer"},"is_deleted":{"type":"boolean"},"is_enabled":{"type":"boolean"},"name":{"type":"string"},"no_cleanup":{"type":"boolean"},"period":{"type":"integer"},"prepare_data_blocks":{"type":"string"},"priority":{"type":"integer"},"process_data_blocks":{"type":"string"},"send_data_blocks":{"type":"string"},"type":{"type":"string"}}},"Error":{"type":"object","properties":{"message":{"type":"string","description":"Readable description of the error."}}}},"responses":{"Error":{"description":"Error. See the **Errors** page for status codes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/collect_manager/collection_task_definition":{"get":{"tags":["Collection task definitions"],"summary":"List collection task definitions","operationId":"listCollectManagerCollectionTaskDefinition","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/sort_order"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Collection"},{"type":"object","properties":{"hits":{"type":"array","items":{"$ref":"#/components/schemas/CollectManagerCollectionTaskDefinition"}}}}]}}}},"default":{"$ref":"#/components/responses/Error"}}}}}}
```

## POST /collect\_manager/collection\_task\_definition

> Create monitor

```json
{"openapi":"3.0.3","info":{"title":"Silk RESTful API","version":"9.5.20"},"tags":[{"name":"Collection task definitions","description":"Collection task definitions are the tasks and monitors that the Collection Data Manager runs, including dynamic tasks. A monitor collects a set of files on a recurring schedule.\n\nUse this endpoint to set up recurring diagnostic collection, add or remove jobs in an existing definition, or change its schedule, priority, or enabled state."}],"servers":[{"url":"https://{host-address}/api/v2","description":"Your Silk Data Pod (SDP)","variables":{"host-address":{"default":"sdp.example.com","description":"Management address of your SDP."}}}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic authentication. The server responds only to HTTPS requests. Access to object URLs, operations, and fields depends on the user's role (for example `admin` or `viewer`)."}},"schemas":{"CollectManagerCollectionTaskDefinition":{"type":"object","properties":{"auto_start":{"type":"boolean"},"collect_data_blocks":{"type":"string"},"collect_logs_interval":{"nullable":true},"collect_logs_timeout":{"type":"integer"},"default_collect_logs_interval":{"nullable":true},"default_collect_logs_timeout":{"type":"integer"},"default_description":{"type":"string"},"default_is_enabled":{"type":"boolean"},"default_period":{"type":"integer"},"default_priority":{"type":"integer"},"description":{"type":"string"},"event_type":{"type":"string"},"fetch_next_dnode":{"type":"boolean"},"id":{"type":"integer"},"is_deleted":{"type":"boolean"},"is_enabled":{"type":"boolean"},"name":{"type":"string"},"no_cleanup":{"type":"boolean"},"period":{"type":"integer"},"prepare_data_blocks":{"type":"string"},"priority":{"type":"integer"},"process_data_blocks":{"type":"string"},"send_data_blocks":{"type":"string"},"type":{"type":"string"}}},"Error":{"type":"object","properties":{"message":{"type":"string","description":"Readable description of the error."}}}},"responses":{"Error":{"description":"Error. See the **Errors** page for status codes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/collect_manager/collection_task_definition":{"post":{"tags":["Collection task definitions"],"summary":"Create monitor","operationId":"createCollectManagerCollectionTaskDefinition","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectManagerCollectionTaskDefinition"}}}},"default":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Create monitor","properties":{"name":{"type":"string"},"files":{"type":"string"},"period":{"type":"integer"},"nodes":{"type":"string"},"description":{"type":"string"},"priority":{"type":"integer"},"enabled":{"type":"boolean"},"prepare_files_timeout":{"type":"integer"},"collect_files_timeout":{"type":"integer"}},"required":["name","files","period"]}}}}}}}}
```

## GET /collect\_manager/collection\_task\_definition/{id}

> Get a collection task definition

```json
{"openapi":"3.0.3","info":{"title":"Silk RESTful API","version":"9.5.20"},"tags":[{"name":"Collection task definitions","description":"Collection task definitions are the tasks and monitors that the Collection Data Manager runs, including dynamic tasks. A monitor collects a set of files on a recurring schedule.\n\nUse this endpoint to set up recurring diagnostic collection, add or remove jobs in an existing definition, or change its schedule, priority, or enabled state."}],"servers":[{"url":"https://{host-address}/api/v2","description":"Your Silk Data Pod (SDP)","variables":{"host-address":{"default":"sdp.example.com","description":"Management address of your SDP."}}}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic authentication. The server responds only to HTTPS requests. Access to object URLs, operations, and fields depends on the user's role (for example `admin` or `viewer`)."}},"schemas":{"CollectManagerCollectionTaskDefinition":{"type":"object","properties":{"auto_start":{"type":"boolean"},"collect_data_blocks":{"type":"string"},"collect_logs_interval":{"nullable":true},"collect_logs_timeout":{"type":"integer"},"default_collect_logs_interval":{"nullable":true},"default_collect_logs_timeout":{"type":"integer"},"default_description":{"type":"string"},"default_is_enabled":{"type":"boolean"},"default_period":{"type":"integer"},"default_priority":{"type":"integer"},"description":{"type":"string"},"event_type":{"type":"string"},"fetch_next_dnode":{"type":"boolean"},"id":{"type":"integer"},"is_deleted":{"type":"boolean"},"is_enabled":{"type":"boolean"},"name":{"type":"string"},"no_cleanup":{"type":"boolean"},"period":{"type":"integer"},"prepare_data_blocks":{"type":"string"},"priority":{"type":"integer"},"process_data_blocks":{"type":"string"},"send_data_blocks":{"type":"string"},"type":{"type":"string"}}},"Error":{"type":"object","properties":{"message":{"type":"string","description":"Readable description of the error."}}}},"responses":{"Error":{"description":"Error. See the **Errors** page for status codes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/collect_manager/collection_task_definition/{id}":{"get":{"tags":["Collection task definitions"],"summary":"Get a collection task definition","operationId":"getCollectManagerCollectionTaskDefinition","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectManagerCollectionTaskDefinition"}}}},"default":{"$ref":"#/components/responses/Error"}}}}}}
```

## DELETE /collect\_manager/collection\_task\_definition/{id}

> Delete a collection task definition

```json
{"openapi":"3.0.3","info":{"title":"Silk RESTful API","version":"9.5.20"},"tags":[{"name":"Collection task definitions","description":"Collection task definitions are the tasks and monitors that the Collection Data Manager runs, including dynamic tasks. A monitor collects a set of files on a recurring schedule.\n\nUse this endpoint to set up recurring diagnostic collection, add or remove jobs in an existing definition, or change its schedule, priority, or enabled state."}],"servers":[{"url":"https://{host-address}/api/v2","description":"Your Silk Data Pod (SDP)","variables":{"host-address":{"default":"sdp.example.com","description":"Management address of your SDP."}}}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic authentication. The server responds only to HTTPS requests. Access to object URLs, operations, and fields depends on the user's role (for example `admin` or `viewer`)."}},"responses":{"Error":{"description":"Error. See the **Errors** page for status codes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Readable description of the error."}}}}},"paths":{"/collect_manager/collection_task_definition/{id}":{"delete":{"tags":["Collection task definitions"],"summary":"Delete a collection task definition","operationId":"deleteCollectManagerCollectionTaskDefinition","responses":{"204":{"description":"No content"},"default":{"$ref":"#/components/responses/Error"}}}}}}
```

## Update a collection task definition

> \`action\` is one of \`add\` (default), \`remove\`, or \`change\`.

```json
{"openapi":"3.0.3","info":{"title":"Silk RESTful API","version":"9.5.20"},"tags":[{"name":"Collection task definitions","description":"Collection task definitions are the tasks and monitors that the Collection Data Manager runs, including dynamic tasks. A monitor collects a set of files on a recurring schedule.\n\nUse this endpoint to set up recurring diagnostic collection, add or remove jobs in an existing definition, or change its schedule, priority, or enabled state."}],"servers":[{"url":"https://{host-address}/api/v2","description":"Your Silk Data Pod (SDP)","variables":{"host-address":{"default":"sdp.example.com","description":"Management address of your SDP."}}}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic authentication. The server responds only to HTTPS requests. Access to object URLs, operations, and fields depends on the user's role (for example `admin` or `viewer`)."}},"schemas":{"CollectManagerCollectionTaskDefinition":{"type":"object","properties":{"auto_start":{"type":"boolean"},"collect_data_blocks":{"type":"string"},"collect_logs_interval":{"nullable":true},"collect_logs_timeout":{"type":"integer"},"default_collect_logs_interval":{"nullable":true},"default_collect_logs_timeout":{"type":"integer"},"default_description":{"type":"string"},"default_is_enabled":{"type":"boolean"},"default_period":{"type":"integer"},"default_priority":{"type":"integer"},"description":{"type":"string"},"event_type":{"type":"string"},"fetch_next_dnode":{"type":"boolean"},"id":{"type":"integer"},"is_deleted":{"type":"boolean"},"is_enabled":{"type":"boolean"},"name":{"type":"string"},"no_cleanup":{"type":"boolean"},"period":{"type":"integer"},"prepare_data_blocks":{"type":"string"},"priority":{"type":"integer"},"process_data_blocks":{"type":"string"},"send_data_blocks":{"type":"string"},"type":{"type":"string"}}},"Error":{"type":"object","properties":{"message":{"type":"string","description":"Readable description of the error."}}}},"responses":{"Error":{"description":"Error. See the **Errors** page for status codes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/collect_manager/collection_task_definition/{id}":{"patch":{"tags":["Collection task definitions"],"summary":"Update a collection task definition","operationId":"updateCollectManagerCollectionTaskDefinition","description":"`action` is one of `add` (default), `remove`, or `change`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Add job (action: add)","properties":{"action":{"type":"string","enum":["add","remove","change"]},"files":{"type":"string"},"nodes":{"type":"string"},"priority":{"type":"integer"}},"required":["action","files"]},{"type":"object","title":"Remove job (action: remove)","properties":{"action":{"type":"string","enum":["add","remove","change"]}},"required":["action"]},{"type":"object","title":"Change task (action: change)","properties":{"action":{"type":"string","enum":["add","remove","change"]},"period":{"type":"integer"},"priority":{"type":"integer"},"enabled":{"type":"boolean"},"collect_interval":{"type":"integer"},"collect_files_timeout":{"type":"integer"},"description":{"type":"string"}},"required":["action"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectManagerCollectionTaskDefinition"}}}},"default":{"$ref":"#/components/responses/Error"}}}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.silk.us/api-reference/endpoints/collection/collection-task-definitions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
