# Get Job Results

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Get Job Results"}
>
</Heading>

<MethodEndpoint
  method={"get"}
  path={"/api/v2/workspaces/{workspace_id}/jobs/{job_id}/results"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Returns job results.

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

<ParamsDetails
  parameters={[{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","title":"Workspace ID","type":"string"}},{"in":"path","name":"job_id","required":true,"schema":{"format":"uuid","title":"Job ID","type":"string"}},{"description":"How many entries do you want to display? Leaving this field empty keeps the default and max 10 results are returned.","in":"query","name":"limit","required":false,"schema":{"default":10,"description":"How many entries do you want to display? Leaving this field empty keeps the default and max 10 results are returned.","maximum":100,"title":"Limit","type":"integer"}},{"description":"Enter an ID if you want to see all entries before this ID.","in":"query","name":"before","required":false,"schema":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Enter an ID if you want to see all entries before this ID.","title":"Before"}},{"description":"Enter an ID if you want to see all entries after this ID.","in":"query","name":"after","required":false,"schema":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Enter an ID if you want to see all entries after this ID.","title":"After"}},{"description":"Which page do you want to see? Type the number.","in":"query","name":"page_number","required":false,"schema":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Which page do you want to see? Type the number.","title":"Page Number"}},{"description":"The name of the entity you want to sort by.","in":"query","name":"field","required":false,"schema":{"default":"query_index","description":"The name of the entity you want to sort by.","enum":["name","query","answer","prompt","context","file","group_name","query_label","created_at","query_index","absolute_query_index"],"title":"Field","type":"string"}},{"description":"Choose how you want to sort the results.","in":"query","name":"order","required":false,"schema":{"default":"ASC","description":"Choose how you want to sort the results.","enum":["ASC","DESC"],"title":"Order","type":"string"}},{"description":"Partial implementation of the OData $select operator. It currently only supports selecting fields from the root entity or a child entity. Selecting fields from children's children is not supported. If you use this parameter, the API answer is always a flat list of distinct JSON objects with the selected properties, for example, '[{\"given_name\": \"user1\", \"user_id\": \"...\"}, ...]' for 'select=created_by/given_name, created_by/user_id'. The results are ordered by the first selected attribute. To learn more about the OData filter syntax, see: [Querying Data](https://www.odata.org/getting-started/basic-tutorial/#queryData).","in":"query","name":"select","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Partial implementation of the OData $select operator. It currently only supports selecting fields from the root entity or a child entity. Selecting fields from children's children is not supported. If you use this parameter, the API answer is always a flat list of distinct JSON objects with the selected properties, for example, '[{\"given_name\": \"user1\", \"user_id\": \"...\"}, ...]' for 'select=created_by/given_name, created_by/user_id'. The results are ordered by the first selected attribute. To learn more about the OData filter syntax, see: [Querying Data](https://www.odata.org/getting-started/basic-tutorial/#queryData).","title":"Select"}},{"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`, 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'\"'. 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`, 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'\"'. 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"}}]}
>
  
</ParamsDetails>

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

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"description":"A list of matching job results.","items":{"anyOf":[{"properties":{"absolute_query_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The absolute index of the query in the job.","title":"Absolute query index"},"answer":{"description":"The answer of the query.","title":"Answer","type":"string"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The context used to get the answer.","title":"Context"},"created_at":{"description":"Timestamp of when the job was created.","format":"date-time","title":"Created at","type":"string"},"duration":{"description":"The time it took to execute the query in seconds.","title":"Duration","type":"number"},"failed":{"description":"Whether the query failed.","title":"Failed","type":"boolean"},"file":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The file used to get the answer.","title":"File"},"filters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"The filters used to get the answer.","title":"Filters"},"group_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The assigned group name for the job result.","title":"Group name"},"job_result_id":{"description":"Job result ID.","format":"uuid","title":"Job result ID","type":"string"},"no_answer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the model didn't answer the query.","title":"No answer"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Extra parameters passed to the pipeline.","title":"Parameters"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The prompt used to get the answer.","title":"Prompt"},"prompts":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"description":"The prompts used in the query.","title":"Prompts"},"query":{"description":"The query used to get the answer.","title":"Query","type":"string"},"query_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The index of the query in the query set.","title":"Query index"},"query_label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The assigned label for the job result.","title":"Query label"},"response":{"additionalProperties":true,"description":"The full response of the query.","title":"Response","type":"object"}},"required":["query","answer","response","duration","failed","job_result_id","created_at"],"title":"JobResult","type":"object"},{"additionalProperties":true,"description":"The job results fields you selected.","title":"JobResultSelectResult","type":"object"}]},"title":"Matching job results in the request page matching your filter criteria","type":"array"},"has_more":{"description":"Whether the paginated result has more results.","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":"PaginatedJobResults","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"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"}}}
>
  
</StatusCodes>
