# Get Pipeline Logs

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Get Pipeline Logs"}
>
</Heading>

<MethodEndpoint
  method={"get"}
  path={"/api/v1/workspaces/{workspace_name}/pipelines/{pipeline_name}/logs"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Fetches pipeline logs as JSON or CSV.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"description":"Type the name of the workspace.","in":"path","name":"workspace_name","required":true,"schema":{"description":"Type the name of the workspace.","title":"Workspace Name","type":"string"}},{"description":"Name of the pipeline.","in":"path","name":"pipeline_name","required":true,"schema":{"description":"Name of the pipeline.","title":"Pipeline Name","type":"string"}},{"description":"The OData filter you want to use to in your query. It supports exact match and `AND` operations. For example, to filter for a metadata `category:news` and `published_date` greater than or equal to January 1 2025, here's what the URL could look like: 'url = \"https://api.cloud.deepset.ai/api/v1/workspaces/production/files?limit=10&filter=category eq 'news' and published_date ge '2025-01-01' \"'. OData filters only work with cursor-based pagination (leave the `page_number` field blank to enable it).To learn more about the OData filter syntax, see: [Querying Data](https://www.odata.org/getting-started/basic-tutorial/#queryData).","in":"query","name":"filter","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The OData filter you want to use to in your query. It supports exact match and `AND` operations. For example, to filter for a metadata `category:news` and `published_date` greater than or equal to January 1 2025, here's what the URL could look like: 'url = \"https://api.cloud.deepset.ai/api/v1/workspaces/production/files?limit=10&filter=category eq 'news' and published_date ge '2025-01-01' \"'. OData filters only work with cursor-based pagination (leave the `page_number` field blank to enable it).To learn more about the OData filter syntax, see: [Querying Data](https://www.odata.org/getting-started/basic-tutorial/#queryData).","title":"Filter"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"title":"Limit","type":"integer"}},{"in":"query","name":"after","required":false,"schema":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"After"}},{"in":"query","name":"order","required":false,"schema":{"default":"DESC","enum":["ASC","DESC"],"title":"SortingOrderEnum","type":"string"}},{"description":"Type 'text/csv' to download the logs as a CSV file or 'application/json' to get the logs as JSONs.","in":"header","name":"accept","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"application/json","description":"Type 'text/csv' to download the logs as a CSV file or 'application/json' to get the logs as JSONs.","title":"Format"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"content":{"application/json":{"schema":{"anyOf":[{"properties":{"data":{"items":{"properties":{"exceptions":{"anyOf":[{"items":{"properties":{"trace":{"description":"The traceback of the exception.","items":{"properties":{"filename":{"description":"The name of the file where the exception occurred.","title":"File Name","type":"string"},"line_number":{"description":"The line number where the exception occurred.","title":"Line Number","type":"integer"},"name":{"description":"The name of the module in which the exception happened.","title":"Name","type":"string"}},"required":["filename","line_number","name"],"title":"ExceptionTraceLog","type":"object"},"title":"Trace","type":"array"},"type":{"description":"The type of the exception.","title":"Type","type":"string"},"value":{"description":"The value of the exception.","title":"Value","type":"string"}},"required":["type","value"],"title":"PipelineExceptionLog","type":"object"},"type":"array"},{"type":"null"}],"description":"Describes the exception that occurred.","title":"Exceptions"},"extra_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Extra fields that were logged.","title":"Extra Fields"},"level":{"description":"The log level.","title":"Level","type":"string"},"log_id":{"description":"The ID of the log.","title":"Log ID","type":"string"},"logged_at":{"description":"The time the log message was created.","format":"date-time","title":"Logged At","type":"string"},"message":{"description":"The log message.","title":"Message","type":"string"},"origin":{"description":"The origin of the log.","title":"Log Origin","enum":["querypipeline","indexingpipeline","haystack","unknown"],"type":"string"}},"required":["log_id","message","logged_at","level","origin"],"title":"PipelineLog","type":"object"},"title":"Data","type":"array"},"has_more":{"description":"Indicates if there are more results to show.","title":"Has more results","type":"boolean"},"total":{"description":"The total number of results matching your query.","title":"Total number of results","type":"integer"}},"required":["data","has_more","total"],"title":"PaginatedResult[PipelineLog]","type":"object"},{"type":"string"},{"properties":{"data":{"items":{"properties":{"exceptions":{"anyOf":[{"items":{"properties":{"trace":{"description":"The traceback of the exception.","items":{"properties":{"filename":{"description":"The name of the file where the exception occurred.","title":"File Name","type":"string"},"line_number":{"description":"The line number where the exception occurred.","title":"Line Number","type":"integer"},"name":{"description":"The name of the module in which the exception happened.","title":"Name","type":"string"}},"required":["filename","line_number","name"],"title":"ExceptionTraceLog","type":"object"},"title":"Trace","type":"array"},"type":{"description":"The type of the exception.","title":"Type","type":"string"},"value":{"description":"The value of the exception.","title":"Value","type":"string"}},"required":["type","value"],"title":"PipelineExceptionLog","type":"object"},"type":"array"},{"type":"null"}],"description":"Describes the exception that occurred.","title":"Exceptions"},"extra_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Extra fields that were logged.","title":"Extra Fields"},"level":{"description":"The log level.","title":"Level","type":"string"},"log_id":{"description":"The ID of the log.","title":"Log ID","type":"string"},"logged_at":{"description":"The time the log message was created.","format":"date-time","title":"Logged At","type":"string"},"message":{"description":"The log message.","title":"Message","type":"string"},"origin":{"description":"The origin of the log.","title":"Log Origin","enum":["querypipeline","indexingpipeline","haystack","unknown"],"type":"string"}},"required":["log_id","message","logged_at","level","origin"],"title":"PipelineLog","type":"object"},"title":"Data","type":"array"},"has_more":{"description":"Indicates if there are more results to show.","title":"Has more results","type":"boolean"},"total":{"description":"The total number of results matching your query.","title":"Total number of results","type":"integer"}},"required":["data","has_more","total"],"title":"PaginatedResult[PipelineLog]","type":"object"},{"type":"string"}],"title":"Response 200 Get Pipeline Logs Api V1 Workspaces  Workspace Name  Pipelines  Pipeline Name  Logs Get"}}},"description":"List log messages for the given pipeline."},"400":{"description":"The filters you provided are invalid. Check the filters and try again."},"404":{"description":"The given pipeline does not exist or does not have logs. [List the deployed pipelines](https://docs.cloud.deepset.ai/reference/list_pipelines_api_v1_workspaces__workspace_name__pipelines_get) to get a list of valid pipeline names."},"422":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"}}},"description":"Validation Error"},"504":{"description":"Fetching logs timed out. Try again later."}}}
>
  
</StatusCodes>
