감사 로그 이벤트 목록 조회
감사 로그 이벤트 목록 조회
주어진 네임스페이스의 감사 로그 이벤트 목록을 반환해요. 이 작업은 조직 액세스 토큰(OAT)에서 발급한 bearer 토큰을 받아요. 토큰은 필요한 리소스 액세스 권한과 범위를 가져야 해요.
출처: 문서
본문
GET /v2/auditlogs/{account}
감사 로그 이벤트 목록 조회 작업이에요. 주어진 네임스페이스의 감사 로그 이벤트 목록을 반환해요. 이 작업은 조직 액세스 토큰(OAT)에서 발급한 bearer 토큰을 받아요. 토큰은 필요한 리소스 액세스 권한과 범위를 가져야 해요.
요청 예시
실행 전에 자리 표시자를 바꾸고 필요 자격 증명이나 요청 바디를 채워야 해요.
curl \
--request GET \
--header "Authorization: Bearer ${TOKEN}" \
--header 'Accept: application/json' \
'https://hub.docker.com/v2/auditlogs/<ACCOUNT>'
요청과 응답
응답 200 A successful response.
Schema:
{
"$ref": "#/components/schemas/GetAuditLogsResponse"
}
response:
{
"logs": [
{
"account": "docker",
"action": "repo.tag.push",
"action_description": "pushed the tag latest with the digest sha256:c1ae9c435032a to the repository docker/example\n",
"actor": "docker",
"data": {
"digest": "sha256:c1ae9c435032a276f80220c7d9b40f76266bbe79243d34f9cda30b76fe114dfa",
"tag": "latest"
},
"name": "docker/example",
"timestamp": "2021-02-19T01:34:35Z"
},
{
"account": "docker",
"action": "offload.lease.end",
"action_description": "offload lease 'l_3EgPuRCjtUqT279CFPOQWcO8zOf' ended, ran for '12m22s'",
"actor": "docker",
"data": {
"lease_id": "l_3EgPuRCjtUqT279CFPOQWcO8zOf",
"org_id": "b908ca6e-b9a9-4a53-a9a5-6bec96f72432",
"resource_type": "run_4cpu_8mem",
"started_at": "2026-06-04T18:24:21Z",
"updated_at": "2026-06-04T18:36:43Z",
"user_id": "ecae6747-e42c-43cb-925d-cfce1ab32b02"
},
"name": "docker",
"timestamp": "2026-06-04T18:36:43Z"
}
]
}
응답 429 Schema:
{}
response:
{
"detail": "Rate limit exceeded",
"error": false
}
응답 500 Schema:
{
"$ref": "#/components/schemas/error"
}
error:
{
"errinfo": null,
"message": "internal error"
}
전체 작업 계약
{
"description": "List audit log events for a given namespace.\n\nThis operation accepts bearer tokens issued from organization access tokens (OATs). The token must have the required resource access and scopes.\n",
"operationId": "AuditLogs_ListAuditLogs",
"parameters": [
{
"description": "Namespace to query audit logs for.",
"in": "path",
"name": "account",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "action name one of [\"repo.tag.push\", ...]. Optional parameter to filter specific audit log actions.\n",
"in": "query",
"name": "action",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "name. Optional parameter to filter audit log events to a specific name. For repository events, this is the name of the repository. For organization events, this is the name of the organization. For team member events, this is the username of the team member.\n",
"in": "query",
"name": "name",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "actor name. Optional parameter to filter audit log events to the specific user who triggered the event.\n",
"in": "query",
"name": "actor",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "Start of the time window you wish to query audit events for.",
"in": "query",
"name": "from",
"required": false,
"schema": {
"format": "date-time",
"type": "string"
}
},
{
"description": "End of the time window you wish to query audit events for.",
"in": "query",
"name": "to",
"required": false,
"schema": {
"format": "date-time",
"type": "string"
}
},
{
"description": "page - specify page number. Page number to get.",
"in": "query",
"name": "page",
"required": false,
"schema": {
"default": 1,
"format": "int32",
"type": "integer"
}
},
{
"description": "page_size - specify page size. Number of events to return per page.",
"in": "query",
"name": "page_size",
"required": false,
"schema": {
"default": 25,
"format": "int32",
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"examples": {
"response": {
"value": {
"logs": [
{
"account": "docker",
"action": "repo.tag.push",
"action_description": "pushed the tag latest with the digest sha256:c1ae9c435032a to the repository docker/example\n",
"actor": "docker",
"data": {
"digest": "sha256:c1ae9c435032a276f80220c7d9b40f76266bbe79243d34f9cda30b76fe114dfa",
"tag": "latest"
},
"name": "docker/example",
"timestamp": "2021-02-19T01:34:35Z"
},
{
"account": "docker",
"action": "offload.lease.end",
"action_description": "offload lease 'l_3EgPuRCjtUqT279CFPOQWcO8zOf' ended, ran for '12m22s'",
"actor": "docker",
"data": {
"lease_id": "l_3EgPuRCjtUqT279CFPOQWcO8zOf",
"org_id": "b908ca6e-b9a9-4a53-a9a5-6bec96f72432",
"resource_type": "run_4cpu_8mem",
"started_at": "2026-06-04T18:24:21Z",
"updated_at": "2026-06-04T18:36:43Z",
"user_id": "ecae6747-e42c-43cb-925d-cfce1ab32b02"
},
"name": "docker",
"timestamp": "2026-06-04T18:36:43Z"
}
]
}
}
},
"schema": {
"$ref": "#/components/schemas/GetAuditLogsResponse"
}
}
},
"description": "A successful response."
},
"429": {
"content": {
"application/json": {
"examples": {
"response": {
"value": {
"detail": "Rate limit exceeded",
"error": false
}
}
},
"schema": {}
}
},
"description": ""
},
"500": {
"content": {
"application/json": {
"examples": {
"error": {
"summary": "Example error response",
"value": {
"errinfo": null,
"message": "internal error"
}
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": ""
},
"default": {
"content": {
"application/json": {
"examples": {
"error": {
"summary": "Example error response",
"value": {
"errinfo": null,
"message": "internal error"
}
}
},
"schema": {
"$ref": "#/components/schemas/error"
}
}
},
"description": "An unexpected error response."
}
},
"security": [
{
"bearerAuth": []
}
],
"summary": "List audit log events",
"tags": [
"audit-logs"
]
}