--- title: Get the logs of a source with the API slug: '59' canonical_url: https://docs.coveo.com/en/59/ collection: index-content source_format: adoc --- # Get the logs of a source with the API Sometimes, you may want to retrieve the detailed [Coveo indexing pipeline](https://docs.coveo.com/en/184/) logs of a specific [source](https://docs.coveo.com/en/246/). These logs can be especially useful when you must assert that [items](https://docs.coveo.com/en/210/) are being processed as expected when using the Push API to add, update, or delete content in a source. You can use the [Get indexing pipeline logs](https://platform.cloud.coveo.com/docs?urls.primaryName=Source%20Logs#/Logs/post_organizations__organizationId_) operation to retrieve the logs of one or more sources for a given time interval in a [Coveo organization](https://docs.coveo.com/en/185/). You can also [perform this action](https://docs.coveo.com/en/1864/) from the [Coveo Administration Console](https://docs.coveo.com/en/183/). > **Important** > > This is a resource-intensive task that can take up to a minute to process, so you should avoid making frequent calls to the Source Logs API. **Request template** ```http POST https://api.cloud.coveo.com/logs/v1/organizations/?from=&to= HTTP/1.1 ​ Content-Type: application/json Accept: application/json Authorization: Bearer ``` **Payload** ```json { "sourcesIds": [ ] } ``` In the request path: * Replace `` with your [organization ID](https://docs.coveo.com/en/148/). In the query string: * Replace `` with the date and time corresponding to the beginning of the range for which to retrieve source logs. * Replace `` with the date and time corresponding to the end of the range for which to retrieve source logs. > **Notes** > > * The `from` and `to` values must be in the standard [W3C date and time format](https://www.w3.org/TR/NOTE-datetime) (for example, `2017-10-09T19:57:09.714Z`). > > * The two values can't be more than 7 days apart. In the `Authorization` HTTP header: * Replace `` with an access token that grants the privileges to view organizations and sources (that is, the **View** access level on the **Organizations** domain and the **View All** access level on the **Sources** domain) in the target organization (see [Create an API key](https://docs.coveo.com/en/1718#create-an-api-key), [Get the privileges of an access token](https://docs.coveo.com/en/109/), [Manage privileges](https://docs.coveo.com/en/3151/), and [Get your Coveo access token](https://docs.coveo.com/en/123/)). In the request body: * In the `sourcesIds` array, replace `` with the [ID](https://docs.coveo.com/en/3390#copy-a-source-name-or-id)s of the target sources. The body of a successful response (`200 OK`) contains detailed indexing pipeline logs in the specified time range for the target source. ## Sample request **Retrieving the indexing pipeline logs of a single source** ```http POST https://api.cloud.coveo.com/logs/v1/organizations/mycoveocloudv2organizationg8tp8wu3?from=2017-11-21T15:23:36.887Z&to=2017-11-21T16:23:36.887Z HTTP/1.1 ​ Content-Type: application/json Accept: application/json Authorization: Bearer **********-****-****-****-************ ``` **Payload** ```json { "sourcesIds": [ "mycoveocloudv2organizationg8tp8wu3-rp5rxzbdz753uhndklv2ztkfgy" ] } ``` **Successful response - 200 OK** ```json { "documentLogEntries": [ { "id": "http://www.example.com/", "organizationId": "mycoveocloudv2organizationg8tp8wu3", "sourceId": "mycoveocloudv2organizationg8tp8wu3-rp5rxzbdz753uhndklv2ztkfgy", "task": "CONSUMING", "operation": "ADD", "result": "ERROR", "datetime": "2017-11-21T15:55:36.887Z", "meta": { "errorMessage": "The document message with id '44d26e58-8b0e-40b5-a571-95c2e7b114b2' is invalid. Cause: com.coveo.cloud.pushapi.exceptions.InvalidPermissionsException: No permissions are set on document.", "errorCode": "INVALID_DOCUMENT" } }, { "id": "http://www.example.com/", "organizationId": "mycoveocloudv2organizationg8tp8wu3", "sourceId": "mycoveocloudv2organizationg8tp8wu3-rp5rxzbdz753uhndklv2ztkfgy", "task": "STREAMING", "operation": "ADD", "result": "COMPLETED", "datetime": "2017-11-21T15:59:12.887Z" } ], "hasNextPage": false } ```