Share via


Audit Log - Query

쿼리 감사 로그 항목

GET https://auditservice.dev.azure.com/{organization}/_apis/audit/auditlog?api-version=7.1-preview.1
GET https://auditservice.dev.azure.com/{organization}/_apis/audit/auditlog?startTime={startTime}&endTime={endTime}&batchSize={batchSize}&continuationToken={continuationToken}&skipAggregation={skipAggregation}&api-version=7.1-preview.1

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
organization
path

string

Azure DevOps 조직의 이름입니다.

api-version
query True

string

사용할 API의 버전입니다. 이 버전의 API를 사용하려면 '7.1-preview.1'로 설정해야 합니다.

batchSize
query

integer

int32

반환할 최대 결과 수입니다. 선택 사항

continuationToken
query

string

이전 쿼리의 다음 결과 집합을 반환하는 데 사용되는 토큰입니다. 선택 사항

endTime
query

string

date-time

다운로드 기간의 종료 시간입니다. 선택 사항

skipAggregation
query

boolean

이벤트 집계를 건너뛰고 대신 개별 항목으로 남습니다. 기본적으로 이벤트는 집계됩니다. 집계되는 이벤트 유형: AuditLog.AccessLog.

startTime
query

string

date-time

다운로드 창의 시작 시간입니다. 선택 사항

응답

Name 형식 Description
200 OK

AuditLogQueryResult

성공적인 작업

보안

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

Name Description
vso.auditlog 사용자에게 감사 로그 및 감사 스트림을 읽을 수 있는 기능을 부여합니다.

예제

By date

Sample Request

GET https://auditservice.dev.azure.com/_apis/audit/auditlog?startTime=2019-03-04T14:05:59.928Z&endTime=2019-03-05T14:05:59.928Z&batchSize=2&api-version=7.1-preview.1

Sample Response

{
  "value": {
    "decoratedAuditLogEntries": [
      {
        "id": "2518505060978539161;00000064-0000-8888-8000-000000000000;86fbe369-3f5d-4f52-9ab0-3be7db271948",
        "correlationId": "86fbe369-3f5d-4f52-9ab0-3be7db271948",
        "activityId": "033fde68-f713-4984-b24f-8d7a73d1ade6",
        "actorCUID": "a718550e-4777-4058-8298-bff88d0cb524",
        "actorUserId": "d6a98b6c-6932-485c-a986-aea9fc981df0",
        "authenticationMechanism": "FedAuth",
        "timestamp": "2019-03-05T14:05:02.1460838+00:00",
        "scopeType": "organization",
        "scopeDisplayName": "fabrikam (Organization)",
        "scopeId": "73638cd5-0dda-4128-9fd6-48c16d4e4de3",
        "ipAddress": "167.220.148.131",
        "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36",
        "actionId": "AuditLog.AccessLog",
        "data": {
          "Filter": {
            "StartTime": "2019-03-04T14:05:59.928Z",
            "EndTime": "2019-03-05T14:05:59.928Z",
            "ContinuationToken": null,
            "BatchSize": 2,
            "HasMore": true
          },
          "EventSummary": [
            "2019-03-05T14:05:02.1460838+00:00",
            "2019-03-05T13:59:40.4899467+00:00",
            "2019-03-05T13:58:13.159128+00:00"
          ]
        },
        "details": "Accessed the audit log 3 times",
        "area": "Auditing",
        "category": "access",
        "categoryDisplayName": "Access",
        "actorDisplayName": "Norman Paulk",
        "actorImageUrl": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/aad.NzdhMTNiN2MtYjIxNy03NDc4LWIxMjItYTlhMTU5YTFlNWQw"
      },
      {
        "id": "2518505063644965580;00000002-0000-8888-8000-000000000000;198b13cf-5201-48e8-acef-0d8bb2d9e815",
        "correlationId": "57f825b4-a940-44a3-a3cc-25cdb9871107",
        "activityId": "01abe2fd-deee-4a47-b35f-dff3edc059a4",
        "actorCUID": "00000000-0000-0000-0000-000000000000",
        "actorUserId": "00000002-0000-8888-8000-000000000000",
        "authenticationMechanism": "",
        "timestamp": "2019-03-05T14:00:35.5034419+00:00",
        "scopeType": "organization",
        "scopeDisplayName": "fabrikam (Organization)",
        "scopeId": "73638cd5-0dda-4128-9fd6-48c16d4e4de3",
        "ipAddress": null,
        "userAgent": "",
        "actionId": "Project.CreateCompleted",
        "data": {
          "ProjectId": "2e0ffea5-d693-4711-862c-94393bacadcb",
          "ProjectName": "fabrikam-fiber-git",
          "ProcessTemplate": "Agile",
          "ProjectVisibility": "Private"
        },
        "details": "fabrikam-fiber-git project was created successfully",
        "area": "Project",
        "category": "create",
        "categoryDisplayName": "Create",
        "actorDisplayName": "Azure DevOps Service",
        "actorImageUrl": null
      }
    ],
    "continuationToken": "2518505063644965580;00000002-0000-8888-8000-000000000000;198b13cf-5201-48e8-acef-0d8bb2d9e815",
    "hasMore": false
  }
}

정의

Name Description
AuditActionCategory

실행된 작업 유형

AuditLogQueryResult

감사 로그를 쿼리할 때 반환되는 개체입니다. 여기에는 더 많은 감사 항목을 쿼리하는 데 필요한 로그 및 정보가 포함됩니다.

AuditScopeType

scope 유형(조직은 현재 지원되는 scope만 해당)

DecoratedAuditLogEntry

AuditActionCategory

실행된 작업 유형

Name 형식 Description
access

string

아티팩트가 액세스되었습니다.

create

string

아티팩트가 생성되었습니다.

execute

string

아티팩트가 실행되었습니다.

modify

string

아티팩트가 수정되었습니다.

remove

string

아티팩트가 제거되었습니다.

unknown

string

범주를 알 수 없습니다.

AuditLogQueryResult

감사 로그를 쿼리할 때 반환되는 개체입니다. 여기에는 더 많은 감사 항목을 쿼리하는 데 필요한 로그 및 정보가 포함됩니다.

Name 형식 Description
continuationToken

string

다음 결과 집합을 가져오기 위해 전달할 연속 토큰

decoratedAuditLogEntries

DecoratedAuditLogEntry[]

감사 로그 항목 목록

hasMore

boolean

True이면 더 일치하는 결과를 가져올 수 있고 그렇지 않으면 false입니다.

AuditScopeType

scope 유형(조직은 현재 지원되는 scope만 해당)

Name 형식 Description
deployment

string

배포

enterprise

string

엔터프라이즈

organization

string

조직

project

string

Project

unknown

string

scope 알 수 없거나 설정되지 않았습니다.

DecoratedAuditLogEntry

Name 형식 Description
actionId

string

이벤트에 대한 작업 ID(예: Git.CreateRepo, Project.RenameProject)입니다.

activityId

string

ActivityId

actorCUID

string

행위자의 CUID

actorClientId

string

행위자의 클라이언트 ID(행위자가 서비스 주체인 경우)

actorDisplayName

string

작업을 시작한 사용자의 DisplayName

actorImageUrl

string

행위자 프로필 이미지의 URL

actorUPN

string

행위자의 UPN

actorUserId

string

행위자의 사용자 ID(행위자가 사용자인 경우)

area

string

작업이 발생한 Azure DevOps 영역

authenticationMechanism

string

행위자가 사용하는 인증 유형

category

AuditActionCategory

실행된 작업 유형

categoryDisplayName

string

범주의 DisplayName

correlationId

string

이렇게 하면 관련 감사 항목을 함께 그룹화할 수 있습니다. 일반적으로 단일 작업으로 인해 감사 항목이 연속되는 경우에 발생합니다. 예를 들어 프로젝트 만들기입니다.

data

object

CUID, 항목 이름 등과 같은 외부 데이터

details

string

데코레이팅된 세부 정보

id

string

EventId - 서비스당 고유해야 함

ipAddress

string

이벤트가 시작된 IP 주소

projectId

string

지정된 경우 이 이벤트가 연결된 프로젝트의 ID입니다.

projectName

string

지정된 경우 이 이벤트가 연결된 프로젝트의 이름입니다.

scopeDisplayName

string

scope DisplayName

scopeId

string

organization ID(조직은 현재 지원되는 유일한 scope)

scopeType

AuditScopeType

scope 유형(조직은 현재 지원되는 scope만 해당)

timestamp

string

UTC에서 이벤트가 발생한 시간

userAgent

string

요청의 사용자 에이전트