Skip to main content

AuditLogsService

A list of all methods in the AuditLogsService service. Click on the method name to view detailed information about that method.

MethodsDescription
getAuditLogsGets a list of your team's generated audit events. For a complete list of all audit events, read our Utilizing audit logs documentation.

getAuditLogs

Gets a list of your team's generated audit events. For a complete list of all audit events, read our Utilizing audit logs documentation.

  • HTTP Method: GET
  • Endpoint: /audit/logs

Parameters

NameTypeRequiredDescription
sincestringReturn logs created after the given time, in YYYY-MM-DD format.
untilstringReturn logs created before the given time, in YYYY-MM-DD format.
limitnumberThe maximum number of audit events to return at once.
cursorstringThe pointer to the first record of the set of paginated results. To view the next response, use the nextCursor value for this parameter.
orderByAscDescDefaultDescReturn the records in ascending (asc) or descending (desc) order.

Return Type

GetAuditLogs

Example Usage Code Snippet

import { PostmanClient } from 'postman_client';

(async () => {
const postmanClient = new PostmanClient({
apiKey: 'YOUR_API_KEY',
});

const orderBy = AscDescDefaultDesc.ASC;

const { data } = await postmanClient.auditLogs.getAuditLogs({
since: '2022-08-30',
until: '2022-09-15',
limit: 50,
cursor: 'RnJpIEZlYiAyNCAyMDIzIDEzOjI0OjA5IEdNVCswMDAwIChDb29yZGluYXRlZCBVbml2ZXJzYWwgVGltZSk=',
orderBy: orderBy,
});

console.log(data);
})();

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →