Overview
LINE WORKS provides Audit API to help you programmatically use its audit features. Using HTTP requests, the LINE WORKS Audit API returns results in JSON format or lets you download them as a file. The LINE WORKS Audit API uses OAuth 2.0.
API Common Information
API Type
LINE WORKS supports two types of API, Service API and Server API. The Audit API is available only as the Server API. Refer to API Overview.
Supported Environment
LINE WORKS usually supports two types of environment, testing and live, whereas the Audit API is available only in the live environment.
Live environment: https://audit.worksmobile.com
Combine an HTTP method with the request URL to complete an operation. For example, here is the operation to download audit data in the live environment of Drive.
Example) Audit download API
GET https://audit.worksmobile.com/r/kr1jJQFeYUdDn/audit/v2/log/message/logs.csv?rangeName=domain&startDate=20201028&endDate=20201028&tenantId=7&domainId=7&serviceId=audit&apiId=downCsvLog&version=v2
You can see the request URLs in each API description.
Request - Common Information
LINE WORKS Access Token and Consumer Key
With each API call, you should include a LINE WORKS access token and a consumer key in the request header.
For how to get your access token and consumer key, see "Server API" in Preparations for API Authentication.
The code below describes how to set your LINE WORKS access token and consumer key in the request header.
httpMethod.setRequestHeader("Authorization",Bearer "LINE WORKS Access Token"); httpMethod.setRequestHeader("consumerKey", "consumer key");
Common Parameter
apiId | Y | API ID | downCsvLog (fixed value for each API) | |
serviceId | Y | Service ID | audit (fixed value for Audit) | |
version | N | Version | v1/v2 (different for each API) |