GET api/history?bookingId={bookingId}&clientId={clientId}&delegateId={delegateId}&delegateGroupId={delegateGroupId}&tenantId={tenantId}&action[0]={action[0]}&action[1]={action[1]}

Gets audit history entries

Request Information

URI Parameters

NameDescriptionTypeAdditional information
bookingId

If set, only include entries matching this trip id

integer

None.

clientId

If set, only include entries matching this client id

integer

None.

delegateId

If set, only include entries matching this delegate id

integer

None.

delegateGroupId

If set, only include entries matching this group id

integer

None.

tenantId

If set, only include entries matching this tenant id

integer

None.

action

If set, only include entries matching these actions

Collection of AuditAction

None.

Body Parameters

None.

Response Information

Resource Description

The matching audit entries

Collection of AuditEntry
NameDescriptionTypeAdditional information
ID

A primary key to keep entities happy

integer

None.

DateTime

The time the event took place

date

None.

TenantId

The id of the tenant this event applies to

integer

None.

UserId

The ID of the logged in user who triggered the event

string

None.

UserName

the name of the user who triggered the event

string

None.

UserType

The type of the logged in user who triggered the event (delegate, client, user, etc)

AuditUserType

None.

ImpersonatedUserId

The ID of the logged in user who triggered the event. Used in the case where the user is using elevated permissions (e.g. the UserType is Application, but it is on behalf of a Delegate)

string

None.

ImpersonatedUserType

The type of the logged in user who triggered the event (delegate, client, user, etc) Used in the case where the user is using elevated permissions (e.g. the UserType is Application, but it is on behalf of a Delegate)

AuditUserType

None.

BookingId

If the event affects a booking, this is the ID of the booking

integer

None.

ClientId

If the event affects a client, this is the ID of the client

integer

None.

DelegateId

If the event affects a delegate, this is the ID of the delegate

integer

None.

DelegateGroupId

If the event affects a delegate group, this is the ID of the delegate group

integer

None.

Action

The type of action that happened

AuditAction

None.

ExtraInfo

Any extra information. The meaning of the extra information depends on the

string

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "id": 1,
    "dateTime": "2021-06-24T03:33:46.2557996-06:00",
    "tenantId": 3,
    "userId": "sample string 4",
    "userName": "sample string 5",
    "userType": 0,
    "impersonatedUserId": "sample string 6",
    "impersonatedUserType": 0,
    "bookingId": 1,
    "clientId": 1,
    "delegateId": 1,
    "delegateGroupId": 1,
    "action": 1,
    "extraInfo": "sample string 7"
  },
  {
    "id": 1,
    "dateTime": "2021-06-24T03:33:46.2557996-06:00",
    "tenantId": 3,
    "userId": "sample string 4",
    "userName": "sample string 5",
    "userType": 0,
    "impersonatedUserId": "sample string 6",
    "impersonatedUserType": 0,
    "bookingId": 1,
    "clientId": 1,
    "delegateId": 1,
    "delegateGroupId": 1,
    "action": 1,
    "extraInfo": "sample string 7"
  }
]

application/xml, text/xml

Sample:
<ArrayOfAuditEntry xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TS.DR.Resources">
  <AuditEntry>
    <Action>Booking_Booked</Action>
    <BookingId>1</BookingId>
    <ClientId>1</ClientId>
    <DateTime xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>2021-06-24T09:33:46.2557996Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>-360</d3p1:OffsetMinutes>
    </DateTime>
    <DelegateGroupId>1</DelegateGroupId>
    <DelegateId>1</DelegateId>
    <ExtraInfo>sample string 7</ExtraInfo>
    <ID>1</ID>
    <ImpersonatedUserId>sample string 6</ImpersonatedUserId>
    <ImpersonatedUserType>Unknown</ImpersonatedUserType>
    <TenantId>3</TenantId>
    <UserId>sample string 4</UserId>
    <UserName>sample string 5</UserName>
    <UserType>Unknown</UserType>
  </AuditEntry>
  <AuditEntry>
    <Action>Booking_Booked</Action>
    <BookingId>1</BookingId>
    <ClientId>1</ClientId>
    <DateTime xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>2021-06-24T09:33:46.2557996Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>-360</d3p1:OffsetMinutes>
    </DateTime>
    <DelegateGroupId>1</DelegateGroupId>
    <DelegateId>1</DelegateId>
    <ExtraInfo>sample string 7</ExtraInfo>
    <ID>1</ID>
    <ImpersonatedUserId>sample string 6</ImpersonatedUserId>
    <ImpersonatedUserType>Unknown</ImpersonatedUserType>
    <TenantId>3</TenantId>
    <UserId>sample string 4</UserId>
    <UserName>sample string 5</UserName>
    <UserType>Unknown</UserType>
  </AuditEntry>
</ArrayOfAuditEntry>