---
title: "CreateFunctionSummaryQuery"
method: POST
path: "/v1/namespaces/{tenant_meta.namespace}/queries/function-summaries"
tags: ["FunctionSummaryQueryService"]
---

# CreateFunctionSummaryQuery

`POST /v1/namespaces/{tenant_meta.namespace}/queries/function-summaries`

## Request

- Base URL: `https://api.endorlabs.com`
- URL: `https://api.endorlabs.com/v1/namespaces/{tenant_meta.namespace}/queries/function-summaries`
- Auth: none declared

Searches indexed OSS function summaries.

## Path parameters

- `tenant_meta.namespace` string, required

## Request body

- FunctionSummaryQueryServiceCreateFunctionSummaryQueryBody: FunctionSummaryQuery searches structured security summaries for indexed OSS functions. Non-empty filters are combined with AND.
  - `language` 'LANGUAGE_UNSPECIFIED' | 'LANGUAGE_GO' | 'LANGUAGE_JAVA' | 'LANGUAGE_SCALA' | 'LANGUAGE_PYTHON' | 'LANGUAGE_RUST' | 'LANGUAGE_JS' | 'LANGUAGE_RUBY' | 'LANGUAGE_CSHARP' | 'LANGUAGE_PHP' | 'LANGUAGE_TYPESCRIPT' | 'LANGUAGE_KOTLIN' | 'LANGUAGE_SWIFT' | 'LANGUAGE_OBJECTIVEC' | 'LANGUAGE_C' | 'LANGUAGE_CPP' | 'LANGUAGE_SWIFTURL' | 'LANGUAGE_CONAN' | 'LANGUAGE_GOSU', required: - LANGUAGE_GOSU: Gosu, a JVM language used by Guidewire applications.
  - `meta` V1Meta: Common fields for all Endor Labs resources.
    - `annotations` object: Annotations can be used to attach metadata to a resource message. Annotation values can be small or large, structured or unstructured, and may include characters not permitted by labels. The keys may contain alphanumerics, underscores (_), dots (.) and dashes (-). The values of an annotation must be 16384 bytes or smaller.
    - `create_time` string, date-time: Time the resource was created. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
    - `created_by` string: Name and authentication source of the user who created the object, for example, ewok@endor.ai@google@api-key.
    - `description` string: Resource description. Must be less than 1024 bytes.
    - `index_data` V1IndexData: IndexData is used to index the resource for search. It's an internal object.
      - `data` string[]
      - `search_score` number, float: search_score is the score of the resource for search. Internal use only.
      - `tenant` string
      - `will_be_deleted_at` string, date-time: Time that the resource will be deleted.
    - `kind` string: Resource kind, for example, HelloResponse. Auto-generated using the protobuf message proto.MessageName().Name().
    - `name` string, required: Resource name. Must be 63 characters or less.
    - `parent_kind` string: Parent object resource kind, for example, Project.
    - `parent_uuid` string: Parent object UUID.
    - `references` object: Map of objects referenced in a query API.
    - `tags` string[]: List of tags attached to the resource. Tags can be used to select objects and to find collections of objects that satisfy certain conditions. A tag must be 255 characters or less.
    - `update_time` string, date-time: Time the resource was last updated. Note: Updated on all create/patch/delete operations. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
    - `updated_by` string: Name and authentication source of the last user who updated the object, for example, vulnerabilityingestor@endor.ai@x509.
    - `upsert_time` string, date-time: Time the resource was last upserted. Note: create_time is only set the first time the resource is created. upsert_time is set every time the resource is upseted. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
    - `version` string: Message version.
  - `results` FunctionSummaryQuerySearchResult[]: Results in the same order as searches.
    - `summaries` FunctionSummaryQueryFunctionSummary[]: Summaries matching the corresponding search.
      - `data_flow` string: Description of data flow through the function.
      - `hash` string: Exact normalized Foiegras function segment hash.
      - `is_critical_api` boolean: Whether the function is itself a security-critical API.
      - `is_entry_point` boolean: Whether the function is an application entry point.
      - `is_sanitizer` boolean: Whether the function sanitizes untrusted data.
      - `is_sink` boolean: Whether the function consumes data in a security-sensitive operation.
      - `is_source` boolean: Whether the function introduces untrusted data.
      - `is_trivial` boolean: Whether the function is classified as trivial.
      - `keywords` string[]: Searchable concepts associated with the function.
      - `libraries` FunctionSummaryQueryProvenance[]: Indexed source occurrences that provide provenance for the summary.
        - `end_line` integer: One-based last source line.
        - `file_path` string: Repository-relative source file path.
        - `function_reference` string: Function name or qualified reference.
        - `library` string: Indexed library name.
        - `repository` string: Source repository URL.
        - `start_line` integer: One-based first source line.
        - `version` string: Human-readable source version.
        - `version_unique` string: Immutable source revision.
      - `model` string: AI model that produced the summary.
      - `postconditions` string[]: Conditions expected to hold after the function executes.
      - `preconditions` string[]: Conditions expected to hold before the function executes.
      - `prompt_version` integer: Prompt schema version that produced the summary.
      - `rest_path` string: REST route associated with an entry-point function.
      - `sanitizes_for` string[]: Vulnerability classes mitigated by the function.
      - `summary` string: Human-readable description of the function behavior.
      - `uses_critical_api` boolean: Whether the function invokes a security-critical API.
  - `searches` FunctionSummaryQuerySearch[]: Ordered independent searches. Each search combines its non-empty filters with AND. A request may contain at most 20 searches.
    - `file_path` string: Exact repository-relative source path.
    - `function_references` string[]: Exact function names or qualified references. Multiple values match any reference.
    - `hashes` string[]: Exact normalized Foiegras function segment hashes. Multiple values match any hash.
    - `library` string: Exact indexed library/dependency name, matched case-insensitively.
    - `limit` integer: Maximum number of distinct summaries to return. Defaults to 20 and is capped at 100.
    - `repository` string: Exact source repository URL, matched case-insensitively.
    - `security_relevant_only` boolean: Return only functions classified as a source, sink, sanitizer, entry point, critical API, or critical-API user.
    - `version` string: Exact human-readable source version or tag.
    - `version_unique` string: Exact immutable source revision.
  - `tenant_meta` object: Tenant metadata that scopes the query.
  - `uuid` string: Ephemeral query identifier.

## Response `200`

A successful response.

- V1FunctionSummaryQuery: FunctionSummaryQuery searches structured security summaries for indexed OSS functions. Non-empty filters are combined with AND.
  - `language` 'LANGUAGE_UNSPECIFIED' | 'LANGUAGE_GO' | 'LANGUAGE_JAVA' | 'LANGUAGE_SCALA' | 'LANGUAGE_PYTHON' | 'LANGUAGE_RUST' | 'LANGUAGE_JS' | 'LANGUAGE_RUBY' | 'LANGUAGE_CSHARP' | 'LANGUAGE_PHP' | 'LANGUAGE_TYPESCRIPT' | 'LANGUAGE_KOTLIN' | 'LANGUAGE_SWIFT' | 'LANGUAGE_OBJECTIVEC' | 'LANGUAGE_C' | 'LANGUAGE_CPP' | 'LANGUAGE_SWIFTURL' | 'LANGUAGE_CONAN' | 'LANGUAGE_GOSU', required: - LANGUAGE_GOSU: Gosu, a JVM language used by Guidewire applications.
  - `meta` V1Meta: Common fields for all Endor Labs resources.
    - `annotations` object: Annotations can be used to attach metadata to a resource message. Annotation values can be small or large, structured or unstructured, and may include characters not permitted by labels. The keys may contain alphanumerics, underscores (_), dots (.) and dashes (-). The values of an annotation must be 16384 bytes or smaller.
    - `create_time` string, date-time: Time the resource was created. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
    - `created_by` string: Name and authentication source of the user who created the object, for example, ewok@endor.ai@google@api-key.
    - `description` string: Resource description. Must be less than 1024 bytes.
    - `index_data` V1IndexData: IndexData is used to index the resource for search. It's an internal object.
      - `data` string[]
      - `search_score` number, float: search_score is the score of the resource for search. Internal use only.
      - `tenant` string
      - `will_be_deleted_at` string, date-time: Time that the resource will be deleted.
    - `kind` string: Resource kind, for example, HelloResponse. Auto-generated using the protobuf message proto.MessageName().Name().
    - `name` string, required: Resource name. Must be 63 characters or less.
    - `parent_kind` string: Parent object resource kind, for example, Project.
    - `parent_uuid` string: Parent object UUID.
    - `references` object: Map of objects referenced in a query API.
    - `tags` string[]: List of tags attached to the resource. Tags can be used to select objects and to find collections of objects that satisfy certain conditions. A tag must be 255 characters or less.
    - `update_time` string, date-time: Time the resource was last updated. Note: Updated on all create/patch/delete operations. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
    - `updated_by` string: Name and authentication source of the last user who updated the object, for example, vulnerabilityingestor@endor.ai@x509.
    - `upsert_time` string, date-time: Time the resource was last upserted. Note: create_time is only set the first time the resource is created. upsert_time is set every time the resource is upseted. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
    - `version` string: Message version.
  - `results` FunctionSummaryQuerySearchResult[]: Results in the same order as searches.
    - `summaries` FunctionSummaryQueryFunctionSummary[]: Summaries matching the corresponding search.
      - `data_flow` string: Description of data flow through the function.
      - `hash` string: Exact normalized Foiegras function segment hash.
      - `is_critical_api` boolean: Whether the function is itself a security-critical API.
      - `is_entry_point` boolean: Whether the function is an application entry point.
      - `is_sanitizer` boolean: Whether the function sanitizes untrusted data.
      - `is_sink` boolean: Whether the function consumes data in a security-sensitive operation.
      - `is_source` boolean: Whether the function introduces untrusted data.
      - `is_trivial` boolean: Whether the function is classified as trivial.
      - `keywords` string[]: Searchable concepts associated with the function.
      - `libraries` FunctionSummaryQueryProvenance[]: Indexed source occurrences that provide provenance for the summary.
        - `end_line` integer: One-based last source line.
        - `file_path` string: Repository-relative source file path.
        - `function_reference` string: Function name or qualified reference.
        - `library` string: Indexed library name.
        - `repository` string: Source repository URL.
        - `start_line` integer: One-based first source line.
        - `version` string: Human-readable source version.
        - `version_unique` string: Immutable source revision.
      - `model` string: AI model that produced the summary.
      - `postconditions` string[]: Conditions expected to hold after the function executes.
      - `preconditions` string[]: Conditions expected to hold before the function executes.
      - `prompt_version` integer: Prompt schema version that produced the summary.
      - `rest_path` string: REST route associated with an entry-point function.
      - `sanitizes_for` string[]: Vulnerability classes mitigated by the function.
      - `summary` string: Human-readable description of the function behavior.
      - `uses_critical_api` boolean: Whether the function invokes a security-critical API.
  - `searches` FunctionSummaryQuerySearch[]: Ordered independent searches. Each search combines its non-empty filters with AND. A request may contain at most 20 searches.
    - `file_path` string: Exact repository-relative source path.
    - `function_references` string[]: Exact function names or qualified references. Multiple values match any reference.
    - `hashes` string[]: Exact normalized Foiegras function segment hashes. Multiple values match any hash.
    - `library` string: Exact indexed library/dependency name, matched case-insensitively.
    - `limit` integer: Maximum number of distinct summaries to return. Defaults to 20 and is capped at 100.
    - `repository` string: Exact source repository URL, matched case-insensitively.
    - `security_relevant_only` boolean: Return only functions classified as a source, sink, sanitizer, entry point, critical API, or critical-API user.
    - `version` string: Exact human-readable source version or tag.
    - `version_unique` string: Exact immutable source revision.
  - `tenant_meta` V1TenantMeta: Tenant related data for the tenant containing the resource.
    - `namespace` string, required: Namespaces are a way to organize organizational units into virtual groupings of resources. Namespaces must be a fully qualified name, for example, the child namespace of namespace "endor.prod" called "app" is called "endor.prod.app".
  - `uuid` string: Ephemeral query identifier.

## Other responses

- `default`: An unexpected error response.

## Changes

- **2026-11-03** `4acd9fe15140`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/endorlabs/apis/endor-labs-rest-api-reference/changes/v1/namespaces/:tenant_meta.namespace/queries/function-summaries/post.md)

---

[API](https://skmtc.dev/endorlabs/apis/endor-labs-rest-api-reference.md) - [All operations](https://skmtc.dev/endorlabs/apis/endor-labs-rest-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/endorlabs/apis/endor-labs-rest-api-reference/revisions/4acd9fe15140?raw)
