For the complete documentation index, see llms.txt. This page is also available as Markdown.

예약된 규칙

예약된 규칙용 REST API 작업

개요

상호 작용하려면 다음 API 작업을 사용하세요 예약된 룰 를 Panther에서.

API를 호출하려면 다음을 참조하세요 Panther REST API 사용 방법 지침—다음을 포함하여 이 문서 페이지에서 직접 호출하는 방법에 대한 안내.

필수 권한

  • 자체 호스팅 GET 작업을 수행하려면, API 토큰에 다음이 있어야 합니다 규칙 보기 권한.

  • 자체 호스팅 POST, PUT, 그리고 DELETE 작업을 수행하려면, API 토큰에 다음이 있어야 합니다 규칙 관리 권한.

작업

아래 API 엔드포인트는 Scheduled Rules에만 해당합니다. 다른 디택션 유형과 상호작용하려면 해당 페이지를 참조하세요: Python 기반 규칙, 간단한 디택션, 그리고 클라우드 정책.

create scheduled rule

post
Authorizations
X-API-KeystringRequired
Query parameters
run-tests-firstbooleanOptional

set this field to false to exclude running tests prior to saving

Default: true
run-tests-onlybooleanOptional

set this field to true if you want to run tests without saving

Default: false
Body
bodystringRequired

The python body of the scheduled rule

createAlertbooleanOptional

Determines whether the scheduled rule should create alerts when it triggers

dedupPeriodMinutesinteger · int64 · min: 1Optional

The amount of time in minutes for grouping alerts

Default: 60
descriptionstringOptional

The description of the scheduled rule

displayNamestringOptional

The display name of the scheduled rule

enabledbooleanOptional

Determines whether or not the scheduled rule is active

idstringRequired

The id of the scheduled rule

managedbooleanOptional

Determines if the scheduled rule is managed by panther

outputIDsstring[]Optional

Destination IDs that override default alert routing based on severity

referencestringOptional

A URL or note for additional reference material

runbookstringOptional

How to handle the generated alert

scheduledQueriesstring[]Optional

the queries that this scheduled rule utilizes

severitystring · enumRequiredPossible values:
summaryAttributesstring[]Optional

A list of fields in the event to create top 5 summaries for

tagsstring[]Optional

The tags for the scheduled rule

thresholdinteger · int64 · min: 1Optional

the number of events that must match before an alert is triggered

Default: 1
Responses
200

OK response.

application/json
bodystringOptional

The python body of the scheduled rule

createAlertbooleanOptional

Determines whether the scheduled rule should create alerts when it triggers

createdAtstringOptional
createdByExternalstringOptional

The text of the user-provided CreatedBy field when uploaded via CI/CD

dedupPeriodMinutesinteger · int64 · min: 1Optional

The amount of time in minutes for grouping alerts

Default: 60
descriptionstringOptional

The description of the scheduled rule

displayNamestringOptional

The display name of the scheduled rule

enabledbooleanOptional

Determines whether or not the scheduled rule is active

idstringOptional

The id of the scheduled rule

lastModifiedstringOptional
managedbooleanOptional

Determines if the scheduled rule is managed by panther

outputIDsstring[]Optional

Destination IDs that override default alert routing based on severity

referencestringOptional

A URL or note for additional reference material

runbookstringOptional

How to handle the generated alert

scheduledQueriesstring[]Optional

the queries that this scheduled rule utilizes

severitystring · enumOptionalPossible values:
summaryAttributesstring[]Optional

A list of fields in the event to create top 5 summaries for

tagsstring[]Optional

The tags for the scheduled rule

thresholdinteger · int64 · min: 1Optional

the number of events that must match before an alert is triggered

Default: 1
post/scheduled-rules
POST /scheduled-rules HTTP/1.1
Host: your-api-host
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 473

{
  "body": "text",
  "createAlert": true,
  "dedupPeriodMinutes": 60,
  "description": "text",
  "displayName": "text",
  "enabled": true,
  "id": "text",
  "managed": true,
  "outputIDs": [
    "text"
  ],
  "reference": "text",
  "reports": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "runbook": "text",
  "scheduledQueries": [
    "text"
  ],
  "severity": "INFO",
  "summaryAttributes": [
    "text"
  ],
  "tags": [
    "text"
  ],
  "tests": [
    {
      "expectedResult": true,
      "log": null,
      "mocks": [
        {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      ],
      "name": "text",
      "resource": "text"
    }
  ],
  "threshold": 1
}
{
  "body": "text",
  "createAlert": true,
  "createdAt": "text",
  "createdBy": {
    "id": "user",
    "type": "text"
  },
  "createdByExternal": "text",
  "dedupPeriodMinutes": 60,
  "description": "text",
  "displayName": "text",
  "enabled": true,
  "id": "text",
  "lastModified": "text",
  "managed": true,
  "outputIDs": [
    "text"
  ],
  "reference": "text",
  "reports": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "runbook": "text",
  "scheduledQueries": [
    "text"
  ],
  "severity": "INFO",
  "summaryAttributes": [
    "text"
  ],
  "tags": [
    "text"
  ],
  "tests": [
    {
      "expectedResult": true,
      "log": null,
      "mocks": [
        {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      ],
      "name": "text",
      "resource": "text"
    }
  ],
  "threshold": 1
}

get scheduled rule

get
Authorizations
X-API-KeystringRequired
Path parameters
idstringRequired

ID of the rule to fetch

Responses
200

OK response.

application/json
bodystringOptional

The python body of the scheduled rule

createAlertbooleanOptional

Determines whether the scheduled rule should create alerts when it triggers

createdAtstringOptional
createdByExternalstringOptional

The text of the user-provided CreatedBy field when uploaded via CI/CD

dedupPeriodMinutesinteger · int64 · min: 1Optional

The amount of time in minutes for grouping alerts

Default: 60
descriptionstringOptional

The description of the scheduled rule

displayNamestringOptional

The display name of the scheduled rule

enabledbooleanOptional

Determines whether or not the scheduled rule is active

idstringOptional

The id of the scheduled rule

lastModifiedstringOptional
managedbooleanOptional

Determines if the scheduled rule is managed by panther

outputIDsstring[]Optional

Destination IDs that override default alert routing based on severity

referencestringOptional

A URL or note for additional reference material

runbookstringOptional

How to handle the generated alert

scheduledQueriesstring[]Optional

the queries that this scheduled rule utilizes

severitystring · enumOptionalPossible values:
summaryAttributesstring[]Optional

A list of fields in the event to create top 5 summaries for

tagsstring[]Optional

The tags for the scheduled rule

thresholdinteger · int64 · min: 1Optional

the number of events that must match before an alert is triggered

Default: 1
get/scheduled-rules/{id}
GET /scheduled-rules/{id} HTTP/1.1
Host: your-api-host
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "body": "text",
  "createAlert": true,
  "createdAt": "text",
  "createdBy": {
    "id": "user",
    "type": "text"
  },
  "createdByExternal": "text",
  "dedupPeriodMinutes": 60,
  "description": "text",
  "displayName": "text",
  "enabled": true,
  "id": "text",
  "lastModified": "text",
  "managed": true,
  "outputIDs": [
    "text"
  ],
  "reference": "text",
  "reports": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "runbook": "text",
  "scheduledQueries": [
    "text"
  ],
  "severity": "INFO",
  "summaryAttributes": [
    "text"
  ],
  "tags": [
    "text"
  ],
  "tests": [
    {
      "expectedResult": true,
      "log": null,
      "mocks": [
        {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      ],
      "name": "text",
      "resource": "text"
    }
  ],
  "threshold": 1
}

put scheduled rule

put

put creates or updates a scheduled rule

Authorizations
X-API-KeystringRequired
Path parameters
idstringRequired

the id of the scheduled rule

Query parameters
run-tests-firstbooleanOptional

set this field to false to exclude running tests prior to saving

Default: true
run-tests-onlybooleanOptional

set this field to true if you want to run tests without saving

Default: false
Body
bodystringRequired

The python body of the scheduled rule

createAlertbooleanOptional

Determines whether the scheduled rule should create alerts when it triggers

dedupPeriodMinutesinteger · int64 · min: 1Optional

The amount of time in minutes for grouping alerts

Default: 60
descriptionstringOptional

The description of the scheduled rule

displayNamestringOptional

The display name of the scheduled rule

enabledbooleanOptional

Determines whether or not the scheduled rule is active

idstringRequired

The id of the scheduled rule

managedbooleanOptional

Determines if the scheduled rule is managed by panther

outputIDsstring[]Optional

Destination IDs that override default alert routing based on severity

referencestringOptional

A URL or note for additional reference material

runbookstringOptional

How to handle the generated alert

scheduledQueriesstring[]Optional

the queries that this scheduled rule utilizes

severitystring · enumRequiredPossible values:
summaryAttributesstring[]Optional

A list of fields in the event to create top 5 summaries for

tagsstring[]Optional

The tags for the scheduled rule

thresholdinteger · int64 · min: 1Optional

the number of events that must match before an alert is triggered

Default: 1
Responses
200

200 returned if the item already existed

application/json
bodystringOptional

The python body of the scheduled rule

createAlertbooleanOptional

Determines whether the scheduled rule should create alerts when it triggers

createdAtstringOptional
createdByExternalstringOptional

The text of the user-provided CreatedBy field when uploaded via CI/CD

dedupPeriodMinutesinteger · int64 · min: 1Optional

The amount of time in minutes for grouping alerts

Default: 60
descriptionstringOptional

The description of the scheduled rule

displayNamestringOptional

The display name of the scheduled rule

enabledbooleanOptional

Determines whether or not the scheduled rule is active

idstringOptional

The id of the scheduled rule

lastModifiedstringOptional
managedbooleanOptional

Determines if the scheduled rule is managed by panther

outputIDsstring[]Optional

Destination IDs that override default alert routing based on severity

referencestringOptional

A URL or note for additional reference material

runbookstringOptional

How to handle the generated alert

scheduledQueriesstring[]Optional

the queries that this scheduled rule utilizes

severitystring · enumOptionalPossible values:
summaryAttributesstring[]Optional

A list of fields in the event to create top 5 summaries for

tagsstring[]Optional

The tags for the scheduled rule

thresholdinteger · int64 · min: 1Optional

the number of events that must match before an alert is triggered

Default: 1
put/scheduled-rules/{id}
PUT /scheduled-rules/{id} HTTP/1.1
Host: your-api-host
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 473

{
  "body": "text",
  "createAlert": true,
  "dedupPeriodMinutes": 60,
  "description": "text",
  "displayName": "text",
  "enabled": true,
  "id": "text",
  "managed": true,
  "outputIDs": [
    "text"
  ],
  "reference": "text",
  "reports": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "runbook": "text",
  "scheduledQueries": [
    "text"
  ],
  "severity": "INFO",
  "summaryAttributes": [
    "text"
  ],
  "tags": [
    "text"
  ],
  "tests": [
    {
      "expectedResult": true,
      "log": null,
      "mocks": [
        {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      ],
      "name": "text",
      "resource": "text"
    }
  ],
  "threshold": 1
}
{
  "body": "text",
  "createAlert": true,
  "createdAt": "text",
  "createdBy": {
    "id": "user",
    "type": "text"
  },
  "createdByExternal": "text",
  "dedupPeriodMinutes": 60,
  "description": "text",
  "displayName": "text",
  "enabled": true,
  "id": "text",
  "lastModified": "text",
  "managed": true,
  "outputIDs": [
    "text"
  ],
  "reference": "text",
  "reports": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  },
  "runbook": "text",
  "scheduledQueries": [
    "text"
  ],
  "severity": "INFO",
  "summaryAttributes": [
    "text"
  ],
  "tags": [
    "text"
  ],
  "tests": [
    {
      "expectedResult": true,
      "log": null,
      "mocks": [
        {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      ],
      "name": "text",
      "resource": "text"
    }
  ],
  "threshold": 1
}

delete scheduled rule

delete
Authorizations
X-API-KeystringRequired
Path parameters
idstringRequired

ID of the rule to delete

Responses
204

No Content response.

No content

delete/scheduled-rules/{id}
DELETE /scheduled-rules/{id} HTTP/1.1
Host: your-api-host
X-API-Key: YOUR_API_KEY
Accept: */*

No content

list scheduled rules

get
Authorizations
X-API-KeystringRequired
Query parameters
cursorstringOptional

the pagination token

limitinteger · int64Optional

the maximum results to return

Default: 100
name-containsstringOptional

Substring search by name (case-insensitive)

statestring · enumOptional

Only include rules in the given state

Possible values:
scheduled-querystring[]Optional

Only include rules which apply to one of these scheduled queries

tagstring[]Optional

Only include rules with one of the given tags (case-insensitive)

created-bystringOptional

Only include rules whose creator matches this user ID or actor ID

last-modified-bystringOptional

Only include rules last modified by this user ID or actor ID

Responses
200

OK response.

application/json
nextstringOptional

pagination token for the next page of results

get/scheduled-rules
GET /scheduled-rules HTTP/1.1
Host: your-api-host
X-API-Key: YOUR_API_KEY
Accept: */*
200

OK response.

{
  "next": "text",
  "results": [
    {
      "body": "text",
      "createAlert": true,
      "createdAt": "text",
      "createdBy": {
        "id": "user",
        "type": "text"
      },
      "createdByExternal": "text",
      "dedupPeriodMinutes": 60,
      "description": "text",
      "displayName": "text",
      "enabled": true,
      "id": "text",
      "lastModified": "text",
      "managed": true,
      "outputIDs": [
        "text"
      ],
      "reference": "text",
      "reports": {
        "ANY_ADDITIONAL_PROPERTY": [
          "text"
        ]
      },
      "runbook": "text",
      "scheduledQueries": [
        "text"
      ],
      "severity": "INFO",
      "summaryAttributes": [
        "text"
      ],
      "tags": [
        "text"
      ],
      "tests": [
        {
          "expectedResult": true,
          "log": null,
          "mocks": [
            {
              "ANY_ADDITIONAL_PROPERTY": "text"
            }
          ],
          "name": "text",
          "resource": "text"
        }
      ],
      "threshold": 1
    }
  ]
}

마지막 업데이트

도움이 되었나요?