Search Logs

post/v1/organizations/{organizationId}/logs
Page View

This category contains log details, whether metadata like relevant timestamps and statuses or the actual payload.

You can retrieve a list of log metadata, search for specific data within log payloads, or retrieve a specific log payload for review.

Search Logs

This query allows you to retrieve logs with their related metadata and payloads based on the criteria you specify with the query parameters. Typically, you can use this if you're searching for specific data within a log payload and you have a good idea of when the log happened.

If you're retrieving a large list of logs, we recommend setting a date range with createdAfter and createdBefore to improve query performance and to ensure you retrieve an accurate dataset.

If you don't have PHI access in the Redox dashboard, you're able to query this endpoint but can't include any search parameters that may contain PHI data. Also, the response only contains log metadata, not any PHI data from the payload. This applies to all environments for users without PHI access.

Request parameters and payload

Path Parameters

  • organizationId
    required, string

    Contains the unique identifier of the Redox dashboard organization you're querying on behalf of.

Select example

cURL request example

cURL
curl 'https://api.redoxengine.com/platform/v1/organizations/{organizationId}/logs' \
--request POST \
--header 'Authorization: Bearer $API_TOKEN' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"searchTerms": [
{
"value": "Nila Jonkel",
"category": "patient"
}
],
"dataModel": "Patient Admin",
"eventType": "Admit",
"createdAfter": "2020-01-01T00:00:00.000Z",
"createdBefore": "2020-01-01T00:00:00.000Z",
"sourceId": "95394e6e-5721-404d-a6f8-ff7132b8b",
"destinationId": "3d5a0411-10b0-468d-84de-1ad882418",
"type": "request",
"status": "failed"
}'

Request Body Schema

    Describes the format of a request to perform a log search.

  • searchTerms
    Array of object

    Contains any keywords you want to use to search log content by. You can include one term per search.

    • value
      string

      Contains the value that you're searching for in the log metadata.

    • category
      string

      Specifies that the logs to search are those with the indicated category. By default, if you indicate null, it means that the logs to search are those explicitly with no category.

      Possible Values: patient, provider, visit, record, metadata, null
  • dataModel
    string

    Specifies that the logs to search are those with messages using the designated data model.

  • eventType
    string

    Specifies that the logs to search are those with messages using the designated event type.

  • createdAfter
    string

    Used with createdBefore to set a date range for the logs to search, which we recommend if you plan to export large amounts of log metadata. This parameter designates that the creation date for the logs to search should be equal to or greater than the date and time in this format (YYYY-MM-DDThh:mm:ss.sssZ).

    Format: date-time
  • createdBefore
    string

    Used with createdAfter to set a date range for the logs to search, which we recommend if you plan to export large amounts of log metadata. This parameter designates that the creation date for the logs to search should be less than or equal to the date and time in this format (YYYY-MM-DDThh:mm:ss.sssZ).

    Format: date-time
  • sourceId
    string

    Specifies that the logs to search are those with messages originating from the system with this unique identifier.

  • destinationId
    string

    Specifies that the logs to search are those with messages sent to the endpoint with this unique identifier.

  • type
    string

    Specifies that the logs to search are those with the indicated type (send, receive, request, respond, or unknown).

    Possible Values: send, receive, request, respond, unknown
  • status
    string

    Specifies that the logs to search are those with the indicated status (i.e., succeeded, failed, filtered, or pending).

    Possible Values: succeeded, failed, filtered, pending

Response fields and example

Example payload generated from schema

{
"meta": {
"version": "1.0.0",
"page": {
"currentPage": 1,
"pageType": "offset",
"pageSize": 50,
"links": {
"self": "/organizations/12345/logs",
"next": "/organizations/12345/logs?_page=2&_count=50",
"first": "/organizations/12345/logs?_page=1&_count=50"
}
}
},
"payload": {
"results": {
"id": "d758ea49-027b-4d6e-b4dd-a3500d8cc2e8",
"createdAt": "2021-04-02T22.52.38.093Z",
"updatedAt": "2021-05-05T22:52:38:093Z",
"dataModel": "PatientAdmin",
"eventType": "Transfer",
"status": "filtered",
"type": "send",
"source": {
"id": "39a05bd3-cead-4707-a652-dd23bcb4fcbc",
"name": "Redox",
"organization": {
"id": 98765,
"name": "Organization Name"
}
},
"destination": {
"id": "d710d1fd-15ef-4f84-9eab-16f03f9f5f87",
"name": "Redox",
"organization": {
"id": 98765,
"name": "Organization Name"
}
},
"matchCategories": [
"record"
]
}
}
}

    Contains the payload and metadata returned for Search Logs.

  • meta
    object

    Contains the metadata information for the returned results, including version and pagination information.

    • version
      string

      Lists the major and minor version number for the format of the returned payload. The payload format or shape may change between minor versions, like including additional or extended fields in later versions. We include the version data in each response so that you have the option to handle the signaled differences.

    • page
      object

      Contains the pagination data for the returned results.

      • currentPage
        integer

        Displays the current page number of returned results you're viewing.

      • pageType
        string

        Displays the type of pagination supported for the returned results. Currently, we only support the offset type, which determines the page number by taking the page size and offsetting the number of records from the start.

      • pageSize
        integer

        Displays the number of results included in each page.

      • Contains the related pagination links for the returned results.

        • self
          string

          Links to the current page of results.

        • next
          string

          Links to the next page of results.

        • first
          string

          Links to the first page of results.

  • payload
    object

    Contains the payload returned for Search Logs.

    • results
      object

      Indicates the beginning of the payload results returned for Search Logs, which includes the match categories for each result.

      • id
        string

        Displays the unique identifier for the specific log, which you can use for reference or for a Get Logs by ID search.

      • createdAt
        string

        Displays the date and time that the log was originally created in ISO 8601 format, which is associated with the date and time that the related data exchange took place.

      • updatedAt
        string

        Displays the date and time that the log was last updated in ISO 8601 format.

      • dataModel
        string

        Indicates which data model was used in the data exchange that triggered the creation of the log.

        This is the same as the Meta.DataModel field in our data models (https://developer.redoxengine.com/data-models/).

      • eventType
        string

        Indicates which event type was used in the data exchange that triggered the creation of the log.

        This is the same as the Meta.EventType field in our data models (https://developer.redoxengine.com/data-models/).

      • status
        string

        Indicates the current status of the log [i.e., succeeded, failed, filtered, pending].

        Possible Values: succeeded, failed, filtered, pending
      • type
        string

        Indicates the type of data exchange that initiated the log (i.e., send, receive, request, respond, unknown.

        Possible Values: send, receive, request, respond, unknown
      • source
        object

        Contains the details for the system that initiated the message associated with the log.

        • id
          string

          Displays the unique identifier for the system that initiated the message.

        • name
          string

          Displays the name of the system that initiated the message.

        • organization
          object

          Contains the details about the Redox dashboard organization associated with this log.

          • id
            integer

            Displays the unique identifier of the dashboard organization.

          • name
            string

            Displays the name of the dashboard organization.

      • destination
        object

        Contains the details for the intended endpoint of the message.

        • id
          string

          Displays the unique identifier of the system containing the endpoint that the message was directed to.

        • name
          string

          Displays the name of the endpoint that the message was directed to.

        • organization
          object

          Contains the details about the Redox dashboard organization associated with this log.

          • id
            integer

            Displays the unique identifier of the dashboard organization.

          • name
            string

            Displays the name of the dashboard organization.

      • matchCategories
        Array of string

        Identifies the category that the matched search term belongs to (e.g., patient, provider, visit, record, metadata, null)