- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
Note: This endpoint is in public beta. If you have any feedback, contact Datadog support.
A Restriction Query is a logs query that restricts which logs the logs_read_data
permission grants read access to.
For users whose roles have Restriction Queries, any log query they make only returns those log events that also match
one of their Restriction Queries. This is true whether the user queries log events from any log-related feature, including
the log explorer, Live Tail, re-hydration, or a dashboard widget.
Restriction Queries currently only support use of the following components of log events:
To restrict read access on log data, add a team tag to log events to indicate which teams own them, and then scope Restriction Queries to the relevant values of the team tag. Tags can be applied to log events in many ways, and a log event can have multiple tags with the same key (like team) and different values. This means the same log event can be visible to roles whose restriction queries are scoped to different team values.
You need an API and non-scoped application key with Admin rights to interact with these endpoints.
See How to Set Up RBAC for Logs for details on how to add restriction queries.
Note: This endpoint is in public beta. If you have any feedback, contact Datadog support.
GET https://api.ap1.datadoghq.com/api/v2/logs/config/restriction_querieshttps://api.datadoghq.eu/api/v2/logs/config/restriction_querieshttps://api.ddog-gov.com/api/v2/logs/config/restriction_querieshttps://api.datadoghq.com/api/v2/logs/config/restriction_querieshttps://api.us3.datadoghq.com/api/v2/logs/config/restriction_querieshttps://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries
Returns all restriction queries, including their names and IDs.
이름
유형
설명
page[size]
integer
Size for a given page. The maximum allowed value is 100.
page[number]
integer
Specific page number to return.
OK
Response containing information about multiple restriction queries.
항목
유형
설명
data
[object]
Array of returned restriction queries.
attributes
object
Attributes of the restriction query.
created_at
date-time
Creation time of the restriction query.
modified_at
date-time
Time of last restriction query modification.
restriction_query
string
The query that defines the restriction. Only the content matching the query can be returned.
id
string
ID of the restriction query.
type
string
Restriction queries type.
default: logs_restriction_queries
{
"data": [
{
"attributes": {
"created_at": "2020-03-17T21:06:44.000Z",
"modified_at": "2020-03-17T21:15:15.000Z",
"restriction_query": "env:sandbox"
},
"id": "79a0e60a-644a-11ea-ad29-43329f7f58b5",
"type": "logs_restriction_queries"
}
]
}
Authentication error
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
Note: This endpoint is in public beta. If you have any feedback, contact Datadog support.
POST https://api.ap1.datadoghq.com/api/v2/logs/config/restriction_querieshttps://api.datadoghq.eu/api/v2/logs/config/restriction_querieshttps://api.ddog-gov.com/api/v2/logs/config/restriction_querieshttps://api.datadoghq.com/api/v2/logs/config/restriction_querieshttps://api.us3.datadoghq.com/api/v2/logs/config/restriction_querieshttps://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries
Create a new restriction query for your organization.
This endpoint requires the user_access_manage
permission.
항목
유형
설명
data
object
Data related to the creation of a restriction query.
attributes
object
Attributes of the created restriction query.
restriction_query
string
The restriction query.
type
enum
Restriction query resource type.
Allowed enum values: logs_restriction_queries
default: logs_restriction_queries
{
"data": {
"attributes": {
"restriction_query": "env:sandbox"
},
"type": "logs_restriction_queries"
}
}
OK
Response containing information about a single restriction query.
항목
유형
설명
data
object
Restriction query object returned by the API.
attributes
object
Attributes of the restriction query.
created_at
date-time
Creation time of the restriction query.
modified_at
date-time
Time of last restriction query modification.
restriction_query
string
The query that defines the restriction. Only the content matching the query can be returned.
id
string
ID of the restriction query.
type
string
Restriction queries type.
default: logs_restriction_queries
{
"data": {
"attributes": {
"created_at": "2020-03-17T21:06:44.000Z",
"modified_at": "2020-03-17T21:15:15.000Z",
"restriction_query": "env:sandbox"
},
"id": "79a0e60a-644a-11ea-ad29-43329f7f58b5",
"type": "logs_restriction_queries"
}
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Authentication error
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
# Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{}
EOF
Note: This endpoint is in public beta. If you have any feedback, contact Datadog support.
GET https://api.ap1.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}https://api.datadoghq.eu/api/v2/logs/config/restriction_queries/{restriction_query_id}https://api.ddog-gov.com/api/v2/logs/config/restriction_queries/{restriction_query_id}https://api.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}https://api.us3.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}https://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}
Get a restriction query in the organization specified by the restriction query’s restriction_query_id
.
이름
유형
설명
restriction_query_id [required]
string
The ID of the restriction query.
OK
Response containing information about a single restriction query.
항목
유형
설명
data
object
Restriction query object returned by the API.
attributes
object
Attributes of the restriction query.
created_at
date-time
Creation time of the restriction query.
modified_at
date-time
Time of last restriction query modification.
restriction_query
string
The query that defines the restriction. Only the content matching the query can be returned.
id
string
ID of the restriction query.
relationships
object
Relationships of the restriction query object.
roles
object
Relationship to roles.
data
[object]
An array containing type and the unique identifier of a role.
id
string
The unique identifier of the role.
type
enum
Roles type.
Allowed enum values: roles
default: roles
type
enum
Restriction query resource type.
Allowed enum values: logs_restriction_queries
default: logs_restriction_queries
included
[ <oneOf>]
Array of objects related to the restriction query.
Option 1
object
Partial role object.
attributes
object
Attributes of the role for a restriction query.
name
string
The role name.
id
string
ID of the role.
type
string
Role resource type.
default: roles
{
"data": {
"attributes": {
"created_at": "2020-03-17T21:06:44.000Z",
"modified_at": "2020-03-17T21:15:15.000Z",
"restriction_query": "env:sandbox"
},
"id": "79a0e60a-644a-11ea-ad29-43329f7f58b5",
"relationships": {
"roles": {
"data": [
{
"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
"type": "roles"
}
]
}
},
"type": "logs_restriction_queries"
},
"included": [
{
"attributes": {
"name": "Datadog Admin Role"
},
"id": "<ROLE_ID>",
"type": "roles"
}
]
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Authentication error
API error response.
{
"errors": [
"Bad Request"
]
}
Not found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
# Path parameters
export restriction_query_id="CHANGE_ME"
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries/${restriction_query_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
Note: This endpoint is in public beta. If you have any feedback, contact Datadog support.
PATCH https://api.ap1.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}https://api.datadoghq.eu/api/v2/logs/config/restriction_queries/{restriction_query_id}https://api.ddog-gov.com/api/v2/logs/config/restriction_queries/{restriction_query_id}https://api.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}https://api.us3.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}https://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}
Edit a restriction query.
This endpoint requires the user_access_manage
permission.
이름
유형
설명
restriction_query_id [required]
string
The ID of the restriction query.
항목
유형
설명
data
object
Data related to the update of a restriction query.
attributes
object
Attributes of the edited restriction query.
restriction_query
string
The restriction query.
type
enum
Restriction query resource type.
Allowed enum values: logs_restriction_queries
default: logs_restriction_queries
{
"data": {
"attributes": {
"restriction_query": "env:sandbox"
},
"type": "logs_restriction_queries"
}
}
OK
Response containing information about a single restriction query.
항목
유형
설명
data
object
Restriction query object returned by the API.
attributes
object
Attributes of the restriction query.
created_at
date-time
Creation time of the restriction query.
modified_at
date-time
Time of last restriction query modification.
restriction_query
string
The query that defines the restriction. Only the content matching the query can be returned.
id
string
ID of the restriction query.
type
string
Restriction queries type.
default: logs_restriction_queries
{
"data": {
"attributes": {
"created_at": "2020-03-17T21:06:44.000Z",
"modified_at": "2020-03-17T21:15:15.000Z",
"restriction_query": "env:sandbox"
},
"id": "79a0e60a-644a-11ea-ad29-43329f7f58b5",
"type": "logs_restriction_queries"
}
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Authentication error
API error response.
{
"errors": [
"Bad Request"
]
}
Not found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
# Path parameters
export restriction_query_id="CHANGE_ME"
# Curl command
curl -X PATCH "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries/${restriction_query_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{}
EOF
Note: This endpoint is in public beta. If you have any feedback, contact Datadog support.
DELETE https://api.ap1.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}https://api.datadoghq.eu/api/v2/logs/config/restriction_queries/{restriction_query_id}https://api.ddog-gov.com/api/v2/logs/config/restriction_queries/{restriction_query_id}https://api.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}https://api.us3.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}https://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}
Deletes a restriction query.
This endpoint requires the user_access_manage
permission.
이름
유형
설명
restriction_query_id [required]
string
The ID of the restriction query.
OK
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Authentication error
API error response.
{
"errors": [
"Bad Request"
]
}
Not found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
# Path parameters
export restriction_query_id="CHANGE_ME"
# Curl command
curl -X DELETE "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries/${restriction_query_id}" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
Note: This endpoint is in public beta. If you have any feedback, contact Datadog support.
GET https://api.ap1.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}/roleshttps://api.datadoghq.eu/api/v2/logs/config/restriction_queries/{restriction_query_id}/roleshttps://api.ddog-gov.com/api/v2/logs/config/restriction_queries/{restriction_query_id}/roleshttps://api.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}/roleshttps://api.us3.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}/roleshttps://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}/roles
Returns all roles that have a given restriction query.
이름
유형
설명
restriction_query_id [required]
string
The ID of the restriction query.
이름
유형
설명
page[size]
integer
Size for a given page. The maximum allowed value is 100.
page[number]
integer
Specific page number to return.
OK
Response containing information about roles attached to a restriction query.
항목
유형
설명
data
[object]
Array of roles.
attributes
object
Attributes of the role for a restriction query.
name
string
The role name.
id
string
ID of the role.
type
string
Role resource type.
default: roles
{
"data": [
{
"attributes": {
"name": "Datadog Admin Role"
},
"id": "<ROLE_ID>",
"type": "roles"
}
]
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Authentication error
API error response.
{
"errors": [
"Bad Request"
]
}
Not found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
# Path parameters
export restriction_query_id="CHANGE_ME"
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries/${restriction_query_id}/roles" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
Note: This endpoint is in public beta. If you have any feedback, contact Datadog support.
POST https://api.ap1.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}/roleshttps://api.datadoghq.eu/api/v2/logs/config/restriction_queries/{restriction_query_id}/roleshttps://api.ddog-gov.com/api/v2/logs/config/restriction_queries/{restriction_query_id}/roleshttps://api.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}/roleshttps://api.us3.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}/roleshttps://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}/roles
Adds a role to a restriction query.
This endpoint requires the user_access_manage
permission.
이름
유형
설명
restriction_query_id [required]
string
The ID of the restriction query.
항목
유형
설명
data
object
Relationship to role object.
id
string
The unique identifier of the role.
type
enum
Roles type.
Allowed enum values: roles
default: roles
{
"data": {
"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
"type": "roles"
}
}
OK
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Authentication error
API error response.
{
"errors": [
"Bad Request"
]
}
Not found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
# Path parameters
export restriction_query_id="CHANGE_ME"
# Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries/${restriction_query_id}/roles" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{}
EOF
Note: This endpoint is in public beta. If you have any feedback, contact Datadog support.
DELETE https://api.ap1.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}/roleshttps://api.datadoghq.eu/api/v2/logs/config/restriction_queries/{restriction_query_id}/roleshttps://api.ddog-gov.com/api/v2/logs/config/restriction_queries/{restriction_query_id}/roleshttps://api.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}/roleshttps://api.us3.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}/roleshttps://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries/{restriction_query_id}/roles
Removes a role from a restriction query.
This endpoint requires the user_access_manage
permission.
이름
유형
설명
restriction_query_id [required]
string
The ID of the restriction query.
항목
유형
설명
data
object
Relationship to role object.
id
string
The unique identifier of the role.
type
enum
Roles type.
Allowed enum values: roles
default: roles
{
"data": {
"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
"type": "roles"
}
}
OK
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Authentication error
API error response.
{
"errors": [
"Bad Request"
]
}
Not found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
# Path parameters
export restriction_query_id="CHANGE_ME"
# Curl command
curl -X DELETE "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries/${restriction_query_id}/roles" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{}
EOF
Note: This endpoint is in public beta. If you have any feedback, contact Datadog support.
GET https://api.ap1.datadoghq.com/api/v2/logs/config/restriction_queries/user/{user_id}https://api.datadoghq.eu/api/v2/logs/config/restriction_queries/user/{user_id}https://api.ddog-gov.com/api/v2/logs/config/restriction_queries/user/{user_id}https://api.datadoghq.com/api/v2/logs/config/restriction_queries/user/{user_id}https://api.us3.datadoghq.com/api/v2/logs/config/restriction_queries/user/{user_id}https://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries/user/{user_id}
Get all restriction queries for a given user.
이름
유형
설명
user_id [required]
string
The ID of the user.
OK
Response containing information about multiple restriction queries.
항목
유형
설명
data
[object]
Array of returned restriction queries.
attributes
object
Attributes of the restriction query.
created_at
date-time
Creation time of the restriction query.
modified_at
date-time
Time of last restriction query modification.
restriction_query
string
The query that defines the restriction. Only the content matching the query can be returned.
id
string
ID of the restriction query.
type
string
Restriction queries type.
default: logs_restriction_queries
{
"data": [
{
"attributes": {
"created_at": "2020-03-17T21:06:44.000Z",
"modified_at": "2020-03-17T21:15:15.000Z",
"restriction_query": "env:sandbox"
},
"id": "79a0e60a-644a-11ea-ad29-43329f7f58b5",
"type": "logs_restriction_queries"
}
]
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Authentication error
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
# Path parameters
export user_id="CHANGE_ME"
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries/user/${user_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
Note: This endpoint is in public beta. If you have any feedback, contact Datadog support.
GET https://api.ap1.datadoghq.com/api/v2/logs/config/restriction_queries/role/{role_id}https://api.datadoghq.eu/api/v2/logs/config/restriction_queries/role/{role_id}https://api.ddog-gov.com/api/v2/logs/config/restriction_queries/role/{role_id}https://api.datadoghq.com/api/v2/logs/config/restriction_queries/role/{role_id}https://api.us3.datadoghq.com/api/v2/logs/config/restriction_queries/role/{role_id}https://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries/role/{role_id}
Get restriction query for a given role.
이름
유형
설명
role_id [required]
string
The ID of the role.
OK
Response containing information about multiple restriction queries.
항목
유형
설명
data
[object]
Array of returned restriction queries.
attributes
object
Attributes of the restriction query.
created_at
date-time
Creation time of the restriction query.
modified_at
date-time
Time of last restriction query modification.
restriction_query
string
The query that defines the restriction. Only the content matching the query can be returned.
id
string
ID of the restriction query.
type
string
Restriction queries type.
default: logs_restriction_queries
{
"data": [
{
"attributes": {
"created_at": "2020-03-17T21:06:44.000Z",
"modified_at": "2020-03-17T21:15:15.000Z",
"restriction_query": "env:sandbox"
},
"id": "79a0e60a-644a-11ea-ad29-43329f7f58b5",
"type": "logs_restriction_queries"
}
]
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Authentication error
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
# Path parameters
export role_id="CHANGE_ME"
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/logs/config/restriction_queries/role/${role_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"