List

Description

Retrieve a list of private templates.

Request

HTTP Method: GET

Query Parameter Description
per_page Optional Set the number of results returned per page. Defaults to 20.
page Optional Specify the page of results to return if there are multiple pages. Defaults to page 1.
curl -X GET \
  https://<<META.tenant.domain>>/api/v1/admin/templates \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>'

Response

A successful request will return a JSON Array of private templates in the Tines tenant.

Field description

Parameter Description
id Template ID.
name Template name.
description Template description.
agent type Type of action associated with the template.
agent options Action options.
vendor Vendor name.
product Product name.

Sample response

{
   "admin/templates":[
   {
      "id": "472463921472463921",
      "name": Extract some text,
      "description": "test",
      "agent_type": "Agents::EventTransformationAgent",
      "agent_options": {
          "mode": "extract",
          "matchers": [
              {
                  "path": "{{.text}}",
                  "regexp": "\\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}\\b",
                  "to": "email_addresses"
              },
              {
                  "path": "{{.text}}",
                  "regexp": "https?:\\/\\/[\\S]+",
                  "to": "urls"
              }
          ],
          "message": "This is an optional message"
      },
      "vendor": "API",
      "product": "API"
   }
   ],
   "meta":{
      "current_page":"https://<<META.tenant.domain>>/api/v1/admin/templates?page=1&per_page=20",
      "previous_page":null,
      "next_page":null,
      "per_page":20,
      "pages":1,
      "count":1
   }
}
Was this helpful?