---
title: "Advanced search agency client event log data export"
method: POST
path: "/agency/{agency_id}/exports/advanced-search-agency-client-event-log"
tags: ["Data exports"]
---

# Advanced search agency client event log data export

`POST /agency/{agency_id}/exports/advanced-search-agency-client-event-log`

## Request

- Base URL: `http://localhost:3010/v1`
- URL: `http://localhost:3010/v1/agency/{agency_id}/exports/advanced-search-agency-client-event-log`
- Auth: HTTP basic

## Request body

- AgencyClientEventLogDataExportPayload
  - `sort` string[]
  - `query` AdvancedSearchAgencyClientEventLogQueryFields
    - `and` AdvancedSearchAgencyClientEventLogQueryFields[]
    - `or` AdvancedSearchAgencyClientEventLogQueryFields[]
    - `event_id` AdvancedSearchOperationsStringField
      - `like` string, nullable
      - `equal` string, nullable
      - `in` string[]
      - `nin` string[]
      - `greater_than` string, nullable
      - `less_than` string, nullable
      - `greater_than_equal` string, nullable
      - `less_than_equal` string, nullable
    - `event_type` AdvancedSearchOperationsStringField
      - `like` string, nullable
      - `equal` string, nullable
      - `in` string[]
      - `nin` string[]
      - `greater_than` string, nullable
      - `less_than` string, nullable
      - `greater_than_equal` string, nullable
      - `less_than_equal` string, nullable
    - `actioned_at` AdvancedSearchOperationsDateField
      - `equal` string, date-time, nullable
      - `greater_than` string, date-time, nullable
      - `less_than` string, date-time, nullable
      - `greater_than_equal` string, date-time, nullable
      - `less_than_equal` string, date-time, nullable
      - `in` string[]
    - `agency_id` AdvancedSearchOperationsStringField
      - `like` string, nullable
      - `equal` string, nullable
      - `in` string[]
      - `nin` string[]
      - `greater_than` string, nullable
      - `less_than` string, nullable
      - `greater_than_equal` string, nullable
      - `less_than_equal` string, nullable
    - `organisation_id` AdvancedSearchOperationsStringField
      - `like` string, nullable
      - `equal` string, nullable
      - `in` string[]
      - `nin` string[]
      - `greater_than` string, nullable
      - `less_than` string, nullable
      - `greater_than_equal` string, nullable
      - `less_than_equal` string, nullable
    - `organisation_name` AdvancedSearchOperationsStringField
      - `like` string, nullable
      - `equal` string, nullable
      - `in` string[]
      - `nin` string[]
      - `greater_than` string, nullable
      - `less_than` string, nullable
      - `greater_than_equal` string, nullable
      - `less_than_equal` string, nullable
    - `site_id` AdvancedSearchOperationsStringField
      - `like` string, nullable
      - `equal` string, nullable
      - `in` string[]
      - `nin` string[]
      - `greater_than` string, nullable
      - `less_than` string, nullable
      - `greater_than_equal` string, nullable
      - `less_than_equal` string, nullable
    - `site_name` AdvancedSearchOperationsStringField
      - `like` string, nullable
      - `equal` string, nullable
      - `in` string[]
      - `nin` string[]
      - `greater_than` string, nullable
      - `less_than` string, nullable
      - `greater_than_equal` string, nullable
      - `less_than_equal` string, nullable
    - `ward_id` AdvancedSearchOperationsStringField
      - `like` string, nullable
      - `equal` string, nullable
      - `in` string[]
      - `nin` string[]
      - `greater_than` string, nullable
      - `less_than` string, nullable
      - `greater_than_equal` string, nullable
      - `less_than_equal` string, nullable
    - `ward_name` AdvancedSearchOperationsStringField
      - `like` string, nullable
      - `equal` string, nullable
      - `in` string[]
      - `nin` string[]
      - `greater_than` string, nullable
      - `less_than` string, nullable
      - `greater_than_equal` string, nullable
      - `less_than_equal` string, nullable
    - `client_type` AdvancedSearchOperationsStringField
      - `like` string, nullable
      - `equal` string, nullable
      - `in` string[]
      - `nin` string[]
      - `greater_than` string, nullable
      - `less_than` string, nullable
      - `greater_than_equal` string, nullable
      - `less_than_equal` string, nullable
  - `project_config` object
    - `event_id` ProjectConfigField
      - `column_name` string, required
    - `event_type` ProjectConfigField
      - `column_name` string, required
    - `actioned_at` ProjectConfigField
      - `column_name` string, required
    - `agency_id` ProjectConfigField
      - `column_name` string, required
    - `organisation_id` ProjectConfigField
      - `column_name` string, required
    - `organisation_name` ProjectConfigField
      - `column_name` string, required
    - `site_id` ProjectConfigField
      - `column_name` string, required
    - `site_name` ProjectConfigField
      - `column_name` string, required
    - `ward_id` ProjectConfigField
      - `column_name` string, required
    - `ward_name` ProjectConfigField
      - `column_name` string, required
    - `client_id` ProjectConfigField
      - `column_name` string, required
    - `client_type` ProjectConfigField
      - `column_name` string, required
    - `client_reference` ProjectConfigField
      - `column_name` string, required
    - `updated_at` ProjectConfigField
      - `column_name` string, required
    - `created_at` ProjectConfigField
      - `column_name` string, required
    - `diff_before` ProjectConfigField
      - `column_name` string, required
    - `diff_after` ProjectConfigField
      - `column_name` string, required
  - `project` object, required
    - `event_id` 1
    - `event_type` 1
    - `agency_id` 1
    - `organisation_id` 1
    - `organisation_name` 1
    - `site_id` 1
    - `site_name` 1
    - `ward_id` 1
    - `ward_name` 1
    - `client_id` 1
    - `client_type` 1
    - `client_reference` 1
    - `updated_at` 1
    - `created_at` 1
    - `diff_before` 1
    - `diff_after` 1
    - `actioned_at` 1

## Response `201`

Data export record will be returned

- AdvancedSearchDataExportsResponseDef
  - `_id` string, required
  - `updated_at` string, date-time, required
  - `created_at` string, date-time, required
  - `__v` integer, required
  - `payload` object, required
  - `timezone` string
  - `user_id` string, required
  - `processing_errors` object[]
  - `status` 'pending' | 'processing' | 'completed', required

## Other responses

- `400`: Validation Error. Usually caused by a missing or invalid parameter.
- `401`: Authorization Error. Thrown if the user does not have access to resource.
- `403`: Permission denied error
- `default`: Server error occurred

---

[API](https://skmtc.dev/staffshift/apis/staffshift-api-gateway.md) - [All operations](https://skmtc.dev/staffshift/apis/staffshift-api-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/staffshift/apis/staffshift-api-gateway/revisions/1f079f6b65f5?raw)
