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

정책

정책용 REST API 작업

개요

이러한 API 작업을 사용하여 다음과 상호 작용하세요 policies Panther에서.

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

필요한 권한

  • 다음의 경우 GET 작업의 경우, API 토큰에는 다음이 있어야 합니다 정책 보기 권한이 있어야 합니다.

  • 다음의 경우 POST, PUT, 그리고 DELETE 작업의 경우, API 토큰에는 다음이 있어야 합니다 정책 관리 권한이 있어야 합니다.

작업

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

create policy

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 policy

descriptionstringOptional

The description of the policy

displayNamestringOptional

The display name of the policy

enabledbooleanOptional

Determines whether or not the policy is active

idstringRequired

The id of the policy

managedbooleanOptional

Determines if the policy 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

resourceTypesstring[]Optional

Resource types

severitystring · enumRequiredPossible values:
suppressionsstring[]Optional

Resources to ignore via a pattern that matches the resource id

Example: ["aws::s3::*"]
tagsstring[]Optional

The tags for the policy

Responses
200

OK response.

application/json
bodystringOptional

The python body of the policy

createdAtstringOptional
createdByExternalstringOptional

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

descriptionstringOptional

The description of the policy

displayNamestringOptional

The display name of the policy

enabledbooleanOptional

Determines whether or not the policy is active

idstringOptional

The id of the policy

lastModifiedstringOptional
managedbooleanOptional

Determines if the policy 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

resourceTypesstring[]Optional

Resource types

severitystring · enumOptionalPossible values:
suppressionsstring[]Optional

Resources to ignore via a pattern that matches the resource id

Example: ["aws::s3::*"]
tagsstring[]Optional

The tags for the policy

post/policies

get policy

get
Authorizations
X-API-KeystringRequired
Path parameters
idstringRequired

the id of the policy to fetch

Responses
200

OK response.

application/json
bodystringOptional

The python body of the policy

createdAtstringOptional
createdByExternalstringOptional

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

descriptionstringOptional

The description of the policy

displayNamestringOptional

The display name of the policy

enabledbooleanOptional

Determines whether or not the policy is active

idstringOptional

The id of the policy

lastModifiedstringOptional
managedbooleanOptional

Determines if the policy 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

resourceTypesstring[]Optional

Resource types

severitystring · enumOptionalPossible values:
suppressionsstring[]Optional

Resources to ignore via a pattern that matches the resource id

Example: ["aws::s3::*"]
tagsstring[]Optional

The tags for the policy

get/policies/{id}

put policy

put

put creates or updates a policy

Authorizations
X-API-KeystringRequired
Path parameters
idstringRequired

the id of the policy

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 policy

descriptionstringOptional

The description of the policy

displayNamestringOptional

The display name of the policy

enabledbooleanOptional

Determines whether or not the policy is active

idstringRequired

The id of the policy

managedbooleanOptional

Determines if the policy 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

resourceTypesstring[]Optional

Resource types

severitystring · enumRequiredPossible values:
suppressionsstring[]Optional

Resources to ignore via a pattern that matches the resource id

Example: ["aws::s3::*"]
tagsstring[]Optional

The tags for the policy

Responses
200

200 returned if the item already existed

application/json
bodystringOptional

The python body of the policy

createdAtstringOptional
createdByExternalstringOptional

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

descriptionstringOptional

The description of the policy

displayNamestringOptional

The display name of the policy

enabledbooleanOptional

Determines whether or not the policy is active

idstringOptional

The id of the policy

lastModifiedstringOptional
managedbooleanOptional

Determines if the policy 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

resourceTypesstring[]Optional

Resource types

severitystring · enumOptionalPossible values:
suppressionsstring[]Optional

Resources to ignore via a pattern that matches the resource id

Example: ["aws::s3::*"]
tagsstring[]Optional

The tags for the policy

put/policies/{id}

delete policy

delete
Authorizations
X-API-KeystringRequired
Path parameters
idstringRequired

ID of the policy to delete

Responses
204

No Content response.

No content

delete/policies/{id}

No content

list policies

get
Authorizations
X-API-KeystringRequired
Query parameters
cursorstringOptional

the pagination token

limitinteger · int64Optional

the maximum results to return

Default: 100
compliance-statusstring · enumOptional

Only include policies with this compliance status

Possible values:
name-containsstringOptional

Substring search by name (case-insensitive)

statestring · enumOptional

Only include policies in the given state

Possible values:
resource-typestring[]Optional

Only include policies which apply to one of the given resource types

tagstring[]Optional

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

created-bystringOptional

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

last-modified-bystringOptional

Only include policies 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/policies
200

OK response.

마지막 업데이트

도움이 되었나요?