Processing rules

Processing rule

GEThttps://cloud-api.calyptia.com/v1/processing_rules/{processingRuleID}
Authorization
Path parameters
processingRuleID*string (uuid)
Response

OK

Body
id*string (uuid)
pipelineID*string (uuid)
configSectionID*string (uuid)
fileID*string (uuid)
match*string
isMatchRegexp*boolean
language*ProcessingRuleLanguage (enum)
lua
actions*array of RuleAction (object)
createdAt*string (date-time)
updatedAt*string (date-time)
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/processing_rules/{processingRuleID}', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer <token>"
    },
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "pipelineID": "123e4567-e89b-12d3-a456-426614174000",
  "configSectionID": "123e4567-e89b-12d3-a456-426614174000",
  "fileID": "123e4567-e89b-12d3-a456-426614174000",
  "match": "*",
  "isMatchRegexp": false,
  "language": "lua",
  "actions": [
    {
      "kind": "add",
      "description": "Sample action",
      "enabled": true,
      "selectors": [
        {
          "kind": "key",
          "op": "equal",
          "expr": "some_key"
        }
      ],
      "add": {
        "key": "some_key",
        "value": "some_value"
      },
      "renameTo": "renamed",
      "copyAs": "copied",
      "maskWith": "masked"
    }
  ],
  "createdAt": "2024-03-28T10:13:49.284Z",
  "updatedAt": "2024-03-28T10:13:49.284Z"
}

Delete processing rule

DELETEhttps://cloud-api.calyptia.com/v1/processing_rules/{processingRuleID}
Authorization
Path parameters
processingRuleID*string (uuid)
Response

Deleted

Request
const response = await fetch('https://cloud-api.calyptia.com/v1/processing_rules/{processingRuleID}', {
    method: 'DELETE',
    headers: {
      "Authorization": "Bearer <token>"
    },
});
const data = await response.json();

Update processing rule

PATCHhttps://cloud-api.calyptia.com/v1/processing_rules/{processingRuleID}
Authorization
Path parameters
processingRuleID*string (uuid)
Body
matchnullable string
isMatchRegexpnullable boolean
languageProcessingRuleLanguage (enum)
lua
actionsnullable array of RuleAction (object)
Response

Updated

Body
updatedAt*string (date-time)
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/processing_rules/{processingRuleID}', {
    method: 'PATCH',
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "updatedAt": "2024-03-28T10:13:49.284Z"
}

Last updated