Processing rule templates

Processing rule templates

List all processing rule templates in descending order with backward pagination.

GEThttps://cloud-api.calyptia.com/v1/projects/{projectID}/processing_rule_templates
Authorization
Path parameters
projectID*string (uuid)
Query parameters
Response

OK

Body
items*array of ProcessingRuleTemplateV1 (object)
endCursor*nullable string (uuid)
count*number (int32)
static*array of StaticProcessingRuleTemplateV1 (object)
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/projects/{projectID}/processing_rule_templates', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer <token>"
    },
});
const data = await response.json();
Response
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "projectID": "123e4567-e89b-12d3-a456-426614174000",
      "name": "My template",
      "pipelineVersion": "v1.3.5",
      "input": {
        "log": "line 2"
      },
      "isRawInput": false,
      "createdAt": "2024-11-21T09:55:51.003Z",
      "updatedAt": "2024-11-21T09:55:51.003Z"
    }
  ],
  "endCursor": "123e4567-e89b-12d3-a456-426614174000",
  "count": 0,
  "static": [
    {
      "name": "By Calyptia"
    }
  ]
}

Create processing rule template

Create a new processing rule template.

POSThttps://cloud-api.calyptia.com/v1/projects/{projectID}/processing_rule_templates
Authorization
Path parameters
projectID*string (uuid)
Body
name*string
Example: "My template"
pipelineVersionstring

semver version of core-fluent-bit is running

Example: "v1.3.5"
inputstring

input to use as an example for the processing rule template

isRawInputboolean

define if the input parameter is in raw or json format (false)

Response

Created

Body
id*string (uuid)
createdAt*string (date-time)
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/projects/{projectID}/processing_rule_templates', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "My template",
      "definition": {}
    }),
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2024-11-21T09:55:51.003Z"
}

Processing rule templates

List all processing rule templates in descending order with backward pagination.

GEThttps://cloud-api.calyptia.com/v2/projects/{projectID}/processing_rule_templates
Authorization
Path parameters
projectID*string (uuid)
Query parameters
Response

OK

Body
items*array of ProcessingRuleTemplate (object)
endCursor*nullable string (uuid)
count*number (int32)
Example: 1
Request
const response = await fetch('https://cloud-api.calyptia.com/v2/projects/{projectID}/processing_rule_templates', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer <token>"
    },
});
const data = await response.json();
Response
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "projectID": "123e4567-e89b-12d3-a456-426614174000",
      "name": "My Processing Rule Template",
      "pipelineVersion": "v24.5.0",
      "definition": {},
      "createdAt": "2024-11-21T09:55:51.003Z",
      "updatedAt": "2024-11-21T09:55:51.003Z"
    }
  ],
  "endCursor": "123e4567-e89b-12d3-a456-426614174000",
  "count": 1
}

Create processing rule template

POSThttps://cloud-api.calyptia.com/v2/projects/{projectID}/processing_rule_templates
Authorization
Path parameters
projectID*string (uuid)
Body
name*string
Example: "My Processing Rule Template"
pipelineVersion*nullable string
Example: "v24.5.0"
definition*object
Response

Created

Body
id*string (uuid)
createdAt*string (date-time)
Request
const response = await fetch('https://cloud-api.calyptia.com/v2/projects/{projectID}/processing_rule_templates', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "My Processing Rule Template",
      "pipelineVersion": "v24.5.0",
      "definition": {}
    }),
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2024-11-21T09:55:51.003Z"
}