Summary
Gets a page of template documents.
Description
Gets a page of template documents.
Route
GET /automation-studio/templates
Roles
Parameters
Name | Type | Required | Description |
---|---|---|---|
queryParameters | object | yes | Parameters for filtering, paginating, projecting, and sorting template documents. |
{ "queryParameters": { "limit": 25, "skip": 50, "order": 1, "sort": "name", "include": "name", "exclude": "_id,description", "in": "do", "not-in": "occaecat consequat ullamco pariatur", "equals": "consectetur sint reprehenderit aliqua", "contains": "culpa", "starts-with": "non Excepteur pariatur", "ends-with": "id deserunt sunt velit enim" } }
{ "type": "object", "properties": { "queryParameters": { "title": "queryParameters", "type": "object", "properties": { "limit": { "type": "integer", "description": "Number of results to return. Used for pagination.", "default": 25, "minimum": 0, "examples": [ 1, 10, 50 ] }, "skip": { "type": "integer", "description": "Number of results to skip. Used for pagination.", "default": 0, "minimum": 0, "examples": [ 1, 10, 50 ] }, "order": { "type": "integer", "description": "Sort direction, 1 for ascending and -1 for descending.", "default": 1, "enum": [ -1, 1 ] }, "sort": { "type": "string", "description": "Field to sort by", "default": "name", "enum": [ "name" ] }, "include": { "type": "string", "description": "Inclusive projection operator formatted as a comma-delineated list. '_id' will be included implicitly unless excluded with 'exclude=_id'. May only be used in conjunction with 'exclude' when 'exclude=_id'.", "examples": [ "name", "description", "name,description" ] }, "exclude": { "type": "string", "description": "Exclusive projection operator formatted as a comma-delineated list. May only be used in conjunction with 'include' when 'exclude=_id'.", "examples": [ "_id", "description", "_id,description" ] }, "in": { "description": "Search for fields exactly matching one of the given list options", "type": "string" }, "not-in": { "description": "Search for fields not exactly matching one of the given list options", "type": "string" }, "equals": { "description": "Returns results where the specified fields exactly match the given match string(s).", "type": "string" }, "contains": { "description": "Returns results where the specified fields contain the given match string(s).", "type": "string" }, "starts-with": { "description": "Returns results where the specified fields start with the given match string(s).", "type": "string" }, "ends-with": { "description": "Returns results where the specified fields end in the given match string(s).", "type": "string" } } } }, "required": [ "queryParameters" ], "additionalProperties": false }
Return
Name | Type | Description |
---|---|---|
result | object | Results for the given search parameters. |
{ "items": [ { "name": "test", "group": "Sample group", "command": "show ip br", "description": "description", "template": "Value FIRST_WORD (S+)\n\nStart\n ^FIRST_WORD.* -> Record", "data": "some sample text to match against", "type": "test", "_id": "C7EBc36DD0f0a580eDFFbDB7", "createdBy": "c39612Fb3a85FFEa32eAe552", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "E35dd9AE0CcCaF2DA8E9d2aB", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "4dD3eE7797CaEAe6BFD633f3", "name": "cillum irure ullamco proident in" }, { "_id": "0ad5fA5E95E3A5F3828FE5AE", "name": "eu Lorem magna Excepteur fugiat" }, { "_id": "4dCCEBD02B2973eCAeDEE561", "name": "sint est" }, { "_id": "dBf5C54a25ed81AbB6eB8EDC", "name": "exercitation" }, { "_id": "9ED9176019C9cF2A5b217EDC", "name": "in nulla nostrud" } ] }, { "name": "test", "group": "Sample group", "command": "show ip br", "description": "description", "template": "Value FIRST_WORD (S+)\n\nStart\n ^FIRST_WORD.* -> Record", "data": "some sample text to match against", "type": "test", "_id": "aa17FecBa2d0bCdc9ddf84f1", "createdBy": "70f1D63c0Fb326DCfEFdFbEb", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "8A6Aacbd9c8cCb9fEf9BE61b", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "4DD042B9F84836f3fBcEfbF2", "name": "reprehenderit quis Excepteur" }, { "_id": "b1ca8ffebaBa6eaFF28Fe18e", "name": "est Duis magna sit" } ] } ], "total": -44745331, "start": 19073917, "end": 53056653, "count": 39504372, "next": null, "previous": "dolor consectetur commodo" }
{ "title": "result", "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "template" } }, "total": { "type": "integer", "description": "Total number of documents matching the given query parameters." }, "start": { "type": "integer", "description": "Search index of first document in the items array." }, "end": { "type": "integer", "description": "Search index of the last document in the items array." }, "count": { "type": "integer", "description": "Length of the items array." }, "next": { "description": "URI pointing to the next set of paginated results. Preserves previous search and projection parameters. Null if returning the last page of results.", "oneOf": [ { "type": "string" }, { "type": "null" } ] }, "previous": { "description": "URI pointing to the previous set of paginated results. Preserves previous search and projection parameters. Null if returning the first page of results.", "oneOf": [ { "type": "string" }, { "type": "null" } ] } } }