---
id: fetch-evaluation-ids-evaluations-by-resource-get
title: "Fetch Evaluation Ids"
description: "Fetches evaluation ids for a given resource type and id."
sidebar_label: "Fetch Evaluation Ids"
hide_title: true
hide_table_of_contents: true
api: eJztVt1v2jAQ/1csP60SAlbtiafRlbVonVpRthdAyCQHcRuc1Ha6MpT/fXd2EhI+KlXVHiaNFzj7d3e/+zRbbsXK8N6ED55FnAkrE2X4rMVDMIGWKcm8x7+CDSIwDCoQk6Fhy0QzwVbyGRTTYJJMB8DsJgUmVIiI9lRNVV+vsjUoa3pTxfAj0nQuQ/bBWH3WY+MI2PCSJUtm8RfeOaO/IhlEzCZsSY5rbk3bGym9zZ23mi0no7WKztvMUVQ30tjJ7eIBAjsMZyVF8zarUzUS0kAZ9PV4fDd4CcAltMeGPtxmFNIwqdAIJofyGgRgDB2GoCT4XI7AZlqVRh1RDB059lmMAlFslqjNWzxJQbuDYYildGTnOxSFXBPNfLGZV7xWYNFAKrRYgwVNjbLlCgU05OuI15I65CkDvUFBw1MmNaAnqzNocYN9sxa8t+UUIwKRr1QrRFppYzroY82RWZ63KtONvLzfw6is2pgARx1hEk77WYrYHHMktBaElBbW5pBAfoTBEP3k+YysmxSzDU7vvNulr+bM3WeuA5ZZzEYFGH0FibI4TATHAsQycFXrPBjS2b6To3PC3LCz3T4g0jXRsIsNqwK6wg7J8dPin87PD4P4Se3srQy0TvRbIkg1da6VPkchWCFj+lWF0gTESdC4FWpzu3QNux9ydSKRyQo0z2eUh2bCyrTcJJ4gpWptVq/12Xcsl1gBr4ydhrpkVP1YwhK3dBq9N3FxedcFbrYzs0uvz+7pMC59+o45KyG0ow4M+tri9EcJbY9yIdgIhU5tbXRqawMRBvRzuS8yjWXjkbWp6XU6QZxkYRvTpKxoC9kRqeT7z03f3bIvBOU0LQaCTEu7cfb6d8NvsLkGEWLpepNZHXBP3eP7oQnbDUQq8RhdFiugn2FoWv72RS52QOS1KHSplolTL9eV53YhgkdQtP4oTk+72/7Y7p4KplBgSKsYAhG4ISh5OBheNdNVJQpvcC5oArgFsf68uyCWaWLsWqiavWNTvM9tuxvG/0/8v/zEF71t4cV20lhIt61cI22LYZ3wGnnUqI8rzk+E/UOg7XYhDPzQcZ7TsX8LaehCacQirr2GJxvpw6hYXmfsFLNHHMDaHwgiRiC3mv+Co/2/E6/729Px/wx2KjMStCQdt3xa5bKgLHndfkBdUNM6eOfISrVTrwZjnOE/KpL9nA==
sidebar_class_name: "get api-method"
info_path: reference/api/agenta-backend
custom_edit_url: null
---

import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Markdown from "@theme/Markdown";
import Heading from "@theme/Heading";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Fetch Evaluation Ids"}
></Heading>

<MethodEndpoint
  method={"get"}
  path={"/evaluations/by_resource"}
></MethodEndpoint>

Fetches evaluation ids for a given resource type and id.

Arguments:
resource_type (str): The type of resource for which to fetch evaluations.
resource_ids List[ObjectId]: The IDs of resource for which to fetch evaluations.

Raises:
HTTPException: If the resource_type is invalid or access is denied.

Returns:
List[str]: A list of evaluation ids.

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

<details
  style={{ marginBottom: "1rem" }}
  className={"openapi-markdown__details"}
  data-collapsed={false}
  open={true}
>
  <summary style={{}}>
    <h3 className={"openapi-markdown__details-summary-header-params"}>
      Query Parameters
    </h3>
  </summary>
  <div>
    <ul>
      <ParamsItem
        className={"paramsItem"}
        param={{
          name: "resource_type",
          in: "query",
          required: true,
          schema: { type: "string", title: "Resource Type" },
        }}
      ></ParamsItem>
      <ParamsItem
        className={"paramsItem"}
        param={{
          name: "resource_ids",
          in: "query",
          required: false,
          schema: {
            type: "array",
            items: { type: "string" },
            title: "Resource Ids",
          },
        }}
      ></ParamsItem>
    </ul>
  </div>
</details>
<div>
  <div>
    <ApiTabs label={undefined} id={undefined}>
      <TabItem label={"200"} value={"200"}>
        <div>Successful Response</div>
        <div>
          <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}>
            <TabItem label={"application/json"} value={"application/json"}>
              <SchemaTabs className={"openapi-tabs__schema"}>
                <TabItem label={"Schema"} value={"Schema"}>
                  <details
                    style={{}}
                    className={"openapi-markdown__details response"}
                    data-collapsed={false}
                    open={true}
                  >
                    <summary
                      style={{}}
                      className={"openapi-markdown__details-summary-response"}
                    >
                      <strong>Schema</strong>
                    </summary>
                    <div
                      style={{ textAlign: "left", marginLeft: "1rem" }}
                    ></div>
                    <ul style={{ marginLeft: "1rem" }}>
                      <li>
                        <div
                          style={{
                            fontSize: "var(--ifm-code-font-size)",
                            opacity: "0.6",
                            marginLeft: "-.5rem",
                            paddingBottom: ".5rem",
                          }}
                        >
                          Array [
                        </div>
                      </li>
                      <div
                        style={{ marginTop: ".5rem", marginBottom: ".5rem" }}
                      >
                        string
                      </div>
                      <li>
                        <div
                          style={{
                            fontSize: "var(--ifm-code-font-size)",
                            opacity: "0.6",
                            marginLeft: "-.5rem",
                          }}
                        >
                          ]
                        </div>
                      </li>
                    </ul>
                  </details>
                </TabItem>
                <TabItem
                  label={"Example (from schema)"}
                  value={"Example (from schema)"}
                >
                  <ResponseSamples
                    responseExample={'[\n  "string"\n]'}
                    language={"json"}
                  ></ResponseSamples>
                </TabItem>
              </SchemaTabs>
            </TabItem>
          </MimeTabs>
        </div>
      </TabItem>
      <TabItem label={"422"} value={"422"}>
        <div>Validation Error</div>
        <div>
          <MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}>
            <TabItem label={"application/json"} value={"application/json"}>
              <SchemaTabs className={"openapi-tabs__schema"}>
                <TabItem label={"Schema"} value={"Schema"}>
                  <details
                    style={{}}
                    className={"openapi-markdown__details response"}
                    data-collapsed={false}
                    open={true}
                  >
                    <summary
                      style={{}}
                      className={"openapi-markdown__details-summary-response"}
                    >
                      <strong>Schema</strong>
                    </summary>
                    <div
                      style={{ textAlign: "left", marginLeft: "1rem" }}
                    ></div>
                    <ul style={{ marginLeft: "1rem" }}>
                      <SchemaItem collapsible={true} className={"schemaItem"}>
                        <details
                          style={{}}
                          className={"openapi-markdown__details"}
                        >
                          <summary style={{}}>
                            <span className={"openapi-schema__container"}>
                              <strong className={"openapi-schema__property"}>
                                detail
                              </strong>
                              <span className={"openapi-schema__name"}>
                                object[]
                              </span>
                            </span>
                          </summary>
                          <div style={{ marginLeft: "1rem" }}>
                            <li>
                              <div
                                style={{
                                  fontSize: "var(--ifm-code-font-size)",
                                  opacity: "0.6",
                                  marginLeft: "-.5rem",
                                  paddingBottom: ".5rem",
                                }}
                              >
                                Array [
                              </div>
                            </li>
                            <SchemaItem
                              collapsible={true}
                              className={"schemaItem"}
                            >
                              <details
                                style={{}}
                                className={"openapi-markdown__details"}
                              >
                                <summary style={{}}>
                                  <span className={"openapi-schema__container"}>
                                    <strong
                                      className={"openapi-schema__property"}
                                    >
                                      loc
                                    </strong>
                                    <span className={"openapi-schema__name"}>
                                      object[]
                                    </span>
                                    <span
                                      className={"openapi-schema__divider"}
                                    ></span>
                                    <span
                                      className={"openapi-schema__required"}
                                    >
                                      required
                                    </span>
                                  </span>
                                </summary>
                                <div style={{ marginLeft: "1rem" }}>
                                  <li>
                                    <div
                                      style={{
                                        fontSize: "var(--ifm-code-font-size)",
                                        opacity: "0.6",
                                        marginLeft: "-.5rem",
                                        paddingBottom: ".5rem",
                                      }}
                                    >
                                      Array [
                                    </div>
                                  </li>
                                  <div>
                                    <span className={"badge badge--info"}>
                                      anyOf
                                    </span>
                                    <SchemaTabs>
                                      <TabItem
                                        label={"MOD1"}
                                        value={"0-item-properties"}
                                      >
                                        <div
                                          style={{
                                            marginTop: ".5rem",
                                            marginBottom: ".5rem",
                                          }}
                                        >
                                          string
                                        </div>
                                      </TabItem>
                                      <TabItem
                                        label={"MOD2"}
                                        value={"1-item-properties"}
                                      >
                                        <div
                                          style={{
                                            marginTop: ".5rem",
                                            marginBottom: ".5rem",
                                          }}
                                        >
                                          integer
                                        </div>
                                      </TabItem>
                                    </SchemaTabs>
                                  </div>
                                  <li>
                                    <div
                                      style={{
                                        fontSize: "var(--ifm-code-font-size)",
                                        opacity: "0.6",
                                        marginLeft: "-.5rem",
                                      }}
                                    >
                                      ]
                                    </div>
                                  </li>
                                </div>
                              </details>
                            </SchemaItem>
                            <SchemaItem
                              collapsible={false}
                              name={"msg"}
                              required={true}
                              schemaName={"Message (string)"}
                              qualifierMessage={undefined}
                              schema={{ type: "string", title: "Message" }}
                            ></SchemaItem>
                            <SchemaItem
                              collapsible={false}
                              name={"type"}
                              required={true}
                              schemaName={"Error Type (string)"}
                              qualifierMessage={undefined}
                              schema={{ type: "string", title: "Error Type" }}
                            ></SchemaItem>
                            <li>
                              <div
                                style={{
                                  fontSize: "var(--ifm-code-font-size)",
                                  opacity: "0.6",
                                  marginLeft: "-.5rem",
                                }}
                              >
                                ]
                              </div>
                            </li>
                          </div>
                        </details>
                      </SchemaItem>
                    </ul>
                  </details>
                </TabItem>
                <TabItem
                  label={"Example (from schema)"}
                  value={"Example (from schema)"}
                >
                  <ResponseSamples
                    responseExample={
                      '{\n  "detail": [\n    {\n      "loc": [\n        "string",\n        0\n      ],\n      "msg": "string",\n      "type": "string"\n    }\n  ]\n}'
                    }
                    language={"json"}
                  ></ResponseSamples>
                </TabItem>
              </SchemaTabs>
            </TabItem>
          </MimeTabs>
        </div>
      </TabItem>
    </ApiTabs>
  </div>
</div>
