openapi: 3.0.0 info: title: Dotfile API — Templates description: Dotfile public API — Templates operations. Split by tag from the OpenAPI Dotfile publishes at https://docs.dotfile.com/openapi/%EF%B8%8F-api-specifications.json (discovered via https://docs.dotfile.com/.well-known/api-catalog). Content is verbatim; only the tag partition is ours. version: v1 contact: name: Dotfile Support email: support@dotfile.com url: https://docs.dotfile.com/reference/getting-help servers: - url: https://api.dotfile.com description: Production environment tags: - name: Templates security: - DotfileAPIKey: [] paths: /v1/templates: get: operationId: template-get-many summary: List all templates description: "Returns a list of all templates created in your Dotfile workspace.\n\n---\n\n#### See also \nLearn more\ \ about [Templates](./templates-guide) \nLearn more about [Filtering, Sorting and Pagination](./filtering-sorting-and-pagination)\ \ \n" parameters: - name: name required: false in: query description: "Filter items by the `name.{operator}` field. \nYou can use the `eq`, `not_eq`, `like` and `ilike` operators,\ \ the `eq` operator being the default." schema: type: string - name: key required: false in: query description: "Filter items by the `key.{operator}` field. \nYou can use the `eq`, `not_eq`, `like` and `ilike` operators,\ \ the `eq` operator being the default." schema: type: string - name: case_auto_approval required: false in: query description: "Filter items by the `case_auto_approval.{operator}` field. \nYou can use the `eq` and `not_eq` operators,\ \ the `eq` operator being the default." schema: type: boolean - name: created_at required: false in: query description: "Filter items by the `created_at.{operator}` field. \nYou can use the `eq`, `not_eq`, `gt`, `gte`, `lt`\ \ and `lte` operators, the `eq` operator being the default." schema: type: string pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,3})?(Z|([0-9]{2}:[0-9]{2}))?)?$ example: - '2023-01-31' - '2023-01-31T13:30:00Z' - '2023-01-31T13:30:00.000Z' description: Date (`yyyy-MM-dd` eg `2023-01-31`) or date time (`yyyy-MM-ddTHH:mm:ss.S+X` eg `2023-01-31T13:30:00.000Z`) in format [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - name: updated_at required: false in: query description: "Filter items by the `updated_at.{operator}` field. \nYou can use the `eq`, `not_eq`, `gt`, `gte`, `lt`\ \ and `lte` operators, the `eq` operator being the default." schema: type: string pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,3})?(Z|([0-9]{2}:[0-9]{2}))?)?$ example: - '2023-01-31' - '2023-01-31T13:30:00Z' - '2023-01-31T13:30:00.000Z' description: Date (`yyyy-MM-dd` eg `2023-01-31`) or date time (`yyyy-MM-ddTHH:mm:ss.S+X` eg `2023-01-31T13:30:00.000Z`) in format [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - name: sort required: false in: query description: "Use this parameter to sort query results. \nIf not specified, sorted in _ascending_ order with values\ \ of field `updated_at`. \nAvailable fields are `created_at`, `name` and `updated_at`." schema: default: updated_at type: string examples: created_at: summary: Sort by values of the "created_at" field in ascending order value: created_at name: summary: Sort by values of the "name" field in descending order value: name.desc updated_at: summary: Sort by values of the "updated_at" field in ascending order value: updated_at multiple: summary: Sort by values of multiple fields value: created_at,name.desc - name: page required: false in: query description: "Query response is paginated. \nUse this parameter to choose which page you want to display. \nPage\ \ index starts at 1 (the default)." schema: default: 1 type: number minimum: 1 - name: limit required: false in: query description: "Query response is paginated. \nUse this parameter to choose the number of items per page. \nLimit\ \ defaults to 20, maximum value is 100." schema: type: number default: 20 minimum: 1 maximum: 100 responses: '200': description: 'List of templates created in the workspace **ℹ️ Click to see full payload**' content: application/json: schema: $ref: '#/components/schemas/TemplateList' tags: - Templates /v1/templates/{id}: get: operationId: template-get-one summary: Retrieve a template description: "Returns information about the specified template.\n\n---\n\n#### See also \nLearn more about [Templates](./templates-guide)\ \ \n" parameters: - name: id required: true in: path description: Id of the template schema: format: uuid type: string responses: '200': description: '**ℹ️ Click to see full payload**' content: application/json: schema: $ref: '#/components/schemas/Template' '400': description: "The request is either malformed or contain invalid parameters.\n\n - Make sure the identifier specified\ \ in the URL is a valid UUID\n " '404': description: No template can be found. tags: - Templates /v1/templates/run: post: operationId: template-run-template summary: Run a template description: "Run template attach on a Case.\n\n---\n\n#### See also \nLearn more about [Templates](./templates-guide)\ \ \nLearn more about [Cases](./cases-guide) \n" parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RunTemplate' responses: '201': description: '**ℹ️ Click to see full payload**' content: application/json: schema: $ref: '#/components/schemas/TemplateExecution' '400': description: "The request is either malformed or contain invalid parameters.\n\n - Make sure the body payload matches\ \ the expected schema\n " tags: - Templates components: securitySchemes: DotfileAPIKey: type: apiKey in: header name: X-DOTFILE-API-KEY description: Configure your api key in the Workspace settings