Audit API 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 API types, Service API and Server API. However, the Audit API provides the server API only. 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://jp1-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.
Example) Audit download API
GET https://jp1-audit.worksmobile.com/works/audit/log/drive/logs.csv?rangeName=tenant&rangeValue=2001&_startDate=20171221&_endDate=20180226&_tenantId=2001&_domainId=500&rangeName=tenant&serviceId=audit&apiId=downCsvLog&version=v1
You can see the request URLs in each API description.
Request Common
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 API Common Guide
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 | csvDownload | |
serviceId | Y | Service ID | audit | |
version | N | Version. The default is v1 if not specified. | v1 |