{
  "servicePath": "",
  "parameters": {
    "quotaUser": {
      "type": "string",
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
      "location": "query"
    },
    "access_token": {
      "type": "string",
      "location": "query",
      "description": "OAuth access token."
    },
    "upload_protocol": {
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query"
    },
    "alt": {
      "default": "json",
      "type": "string",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "description": "Data format for response.",
      "location": "query"
    },
    "key": {
      "type": "string",
      "location": "query",
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token."
    },
    "callback": {
      "type": "string",
      "location": "query",
      "description": "JSONP"
    },
    "$.xgafv": {
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "type": "string",
      "enum": [
        "1",
        "2"
      ],
      "description": "V1 error format.",
      "location": "query"
    },
    "uploadType": {
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query"
    },
    "oauth_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth 2.0 token for the current user."
    },
    "fields": {
      "location": "query",
      "type": "string",
      "description": "Selector specifying which fields to include in a partial response."
    },
    "prettyPrint": {
      "default": "true",
      "location": "query",
      "type": "boolean",
      "description": "Returns response with indentations and line breaks."
    }
  },
  "fullyEncodeReservedExpansion": true,
  "ownerName": "Google",
  "resources": {
    "documents": {
      "methods": {
        "searchDocumentChunks": {
          "path": "v1/documents:searchDocumentChunks",
          "response": {
            "$ref": "SearchDocumentChunksResponse"
          },
          "id": "developerknowledge.documents.searchDocumentChunks",
          "parameters": {
            "query": {
              "location": "query",
              "description": "Required. Provides the raw query string provided by the user, such as \"How to create a Cloud Storage bucket?\". The query must not exceed 500 characters; values longer than 500 characters will result in an `INVALID_ARGUMENT` error.",
              "type": "string"
            },
            "pageSize": {
              "description": "Optional. Specifies the maximum number of results to return. The service may return fewer than this value. If unspecified, at most 5 results will be returned. The maximum value is 100; values above 100 will be coerced to 100.",
              "location": "query",
              "type": "integer",
              "format": "int32"
            },
            "pageToken": {
              "type": "string",
              "description": "Optional. Contains a page token, received from a previous `SearchDocumentChunks` call. Provide this to retrieve the subsequent page.",
              "location": "query"
            },
            "filter": {
              "type": "string",
              "location": "query",
              "description": "Optional. Applies a strict filter to the search results. The expression supports a subset of the syntax described at https://google.aip.dev/160. While `SearchDocumentChunks` returns DocumentChunks, the filter is applied to `DocumentChunk.document` fields. Supported fields for filtering: * `content_length_bytes` (INTEGER): The length of the `Document.content` field in bytes. * `data_source` (STRING): The source of the document, e.g. `docs.cloud.google.com`. See https://developers.google.com/knowledge/reference/corpus-reference for the complete list of data sources in the corpus. * `update_time` (TIMESTAMP): The timestamp of when the document was last meaningfully updated. A meaningful update is one that changes document's markdown content or metadata. * `uri` (STRING): The document URI, e.g. `https://docs.cloud.google.com/bigquery/docs/tables`. INTEGER fields support `=`, `\u003c`, `\u003c=`, `\u003e`, and `\u003e=` operators. STRING fields support `=` (equals) and `!=` (not equals) operators for **exact match** on the whole string. Partial match, prefix match, and regexp match are not supported. TIMESTAMP fields support `=`, `\u003c`, `\u003c=`, `\u003e`, and `\u003e=` operators. Timestamps must be in RFC-3339 format, e.g., `\"2025-01-01T00:00:00Z\"`. Note: Field names must be in `snake_case` (e.g., `data_source`). Values on the right-hand side of filtering expressions must be string literals enclosed in double quotes (e.g., `\"docs.cloud.google.com\"`). You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical operators. `OR` has higher precedence than `AND`. Use parentheses for explicit precedence grouping. Examples: * Filter by `Document.content_length_bytes`: `content_length_bytes \u003c 50000` * `data_source = \"docs.cloud.google.com\" OR data_source = \"firebase.google.com\"` * `data_source != \"firebase.google.com\"` * `update_time \u003c \"2024-01-01T00:00:00Z\"` * `update_time \u003e= \"2025-01-22T00:00:00Z\" AND (data_source = \"developer.chrome.com\" OR data_source = \"web.dev\")` * `uri = \"https://docs.cloud.google.com/release-notes\"` The `filter` string must not exceed 500 characters; values longer than 500 characters will result in an `INVALID_ARGUMENT` error."
            }
          },
          "flatPath": "v1/documents:searchDocumentChunks",
          "description": "Searches for developer knowledge across Google's developer documentation. Returns DocumentChunks based on the user's query. There may be many chunks from the same Document. To retrieve full documents, use DeveloperKnowledge.GetDocument or DeveloperKnowledge.BatchGetDocuments with the DocumentChunk.parent returned in the SearchDocumentChunksResponse.results.",
          "parameterOrder": [],
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ],
          "httpMethod": "GET"
        },
        "batchGet": {
          "path": "v1/documents:batchGet",
          "response": {
            "$ref": "BatchGetDocumentsResponse"
          },
          "flatPath": "v1/documents:batchGet",
          "httpMethod": "GET",
          "parameterOrder": [],
          "description": "Retrieves multiple documents, each with its full Markdown content.",
          "parameters": {
            "names": {
              "description": "Required. Specifies the names of the documents to retrieve. A maximum of 20 documents can be retrieved in a batch. The documents are returned in the same order as the `names` in the request. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` Each name must not exceed 500 characters; values longer than 500 characters will result in an `INVALID_ARGUMENT` error. ",
              "location": "query",
              "type": "string",
              "repeated": true
            },
            "view": {
              "enum": [
                "DOCUMENT_VIEW_UNSPECIFIED",
                "DOCUMENT_VIEW_BASIC",
                "DOCUMENT_VIEW_FULL",
                "DOCUMENT_VIEW_CONTENT"
              ],
              "type": "string",
              "location": "query",
              "enumDescriptions": [
                "The default / unset value. See each API method for its default value if DocumentView is not specified.",
                "Includes only the basic metadata fields: - `name` - `uri` - `data_source` - `title` - `description` - `update_time` - `view` - `content_length_bytes` This is the default of view for DeveloperKnowledge.SearchDocumentChunks.",
                "Includes all Document fields.",
                "Includes the `DOCUMENT_VIEW_BASIC` fields and the `content` field. This is the default of view for DeveloperKnowledge.GetDocument and DeveloperKnowledge.BatchGetDocuments."
              ],
              "description": "Optional. Specifies the DocumentView of the document. If unspecified, DeveloperKnowledge.BatchGetDocuments defaults to `DOCUMENT_VIEW_CONTENT`."
            }
          },
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ],
          "id": "developerknowledge.documents.batchGet"
        },
        "get": {
          "description": "Retrieves a single document with its full Markdown content.",
          "id": "developerknowledge.documents.get",
          "parameters": {
            "view": {
              "type": "string",
              "enum": [
                "DOCUMENT_VIEW_UNSPECIFIED",
                "DOCUMENT_VIEW_BASIC",
                "DOCUMENT_VIEW_FULL",
                "DOCUMENT_VIEW_CONTENT"
              ],
              "location": "query",
              "enumDescriptions": [
                "The default / unset value. See each API method for its default value if DocumentView is not specified.",
                "Includes only the basic metadata fields: - `name` - `uri` - `data_source` - `title` - `description` - `update_time` - `view` - `content_length_bytes` This is the default of view for DeveloperKnowledge.SearchDocumentChunks.",
                "Includes all Document fields.",
                "Includes the `DOCUMENT_VIEW_BASIC` fields and the `content` field. This is the default of view for DeveloperKnowledge.GetDocument and DeveloperKnowledge.BatchGetDocuments."
              ],
              "description": "Optional. Specifies the DocumentView of the document. If unspecified, DeveloperKnowledge.GetDocument defaults to `DOCUMENT_VIEW_CONTENT`."
            },
            "name": {
              "pattern": "^documents/.*$",
              "description": "Required. Specifies the name of the document to retrieve. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` The name must not exceed 500 characters; values longer than 500 characters will result in an `INVALID_ARGUMENT` error.",
              "type": "string",
              "required": true,
              "location": "path"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "Document"
          },
          "httpMethod": "GET",
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ],
          "flatPath": "v1/documents/{documentsId}",
          "path": "v1/{+name}"
        }
      }
    },
    "v1": {
      "methods": {
        "answerQuery": {
          "response": {
            "$ref": "AnswerQueryResponse"
          },
          "request": {
            "$ref": "AnswerQueryRequest"
          },
          "flatPath": "v1:answerQuery",
          "httpMethod": "POST",
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ],
          "description": "Answers a query using grounded generation.",
          "parameterOrder": [],
          "parameters": {},
          "path": "v1:answerQuery",
          "id": "developerknowledge.answerQuery"
        }
      }
    }
  },
  "description": "The Developer Knowledge API provides access to Google's developer knowledge.",
  "version": "v1",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "version_module": true,
  "revision": "20261115",
  "discoveryVersion": "v1",
  "mtlsRootUrl": "https://developerknowledge.mtls.googleapis.com/",
  "baseUrl": "https://developerknowledge.googleapis.com/",
  "batchPath": "batch",
  "rootUrl": "https://developerknowledge.googleapis.com/",
  "canonicalName": "Developer Knowledge",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/cloud-platform": {
          "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account."
        }
      }
    }
  },
  "ownerDomain": "google.com",
  "protocol": "rest",
  "documentationLink": "https://developers.google.com/knowledge",
  "id": "developerknowledge:v1",
  "basePath": "",
  "kind": "discovery#restDescription",
  "name": "developerknowledge",
  "title": "Developer Knowledge API",
  "schemas": {
    "Answer": {
      "type": "object",
      "properties": {
        "answerText": {
          "description": "Contains the text of the answer.",
          "type": "string"
        },
        "references": {
          "items": {
            "$ref": "AnswerReference"
          },
          "readOnly": true,
          "type": "array",
          "description": "Output only. Contains references for the answer."
        },
        "citations": {
          "items": {
            "$ref": "AnswerCitation"
          },
          "readOnly": true,
          "description": "Output only. Contains citations for the answer.",
          "type": "array"
        }
      },
      "description": "An answer to a query.",
      "id": "Answer"
    },
    "SearchDocumentChunksResponse": {
      "description": "Response message for DeveloperKnowledge.SearchDocumentChunks.",
      "id": "SearchDocumentChunksResponse",
      "type": "object",
      "properties": {
        "results": {
          "description": "Contains the search results for the given query. Each DocumentChunk in this list contains a snippet of content relevant to the search query. Use the DocumentChunk.parent field of each result with DeveloperKnowledge.GetDocument or DeveloperKnowledge.BatchGetDocuments to retrieve the full document content.",
          "type": "array",
          "items": {
            "$ref": "DocumentChunk"
          }
        },
        "nextPageToken": {
          "type": "string",
          "description": "Provides a token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages."
        }
      }
    },
    "Document": {
      "type": "object",
      "properties": {
        "updateTime": {
          "description": "Output only. Represents the timestamp when the content or metadata of the document was last updated.",
          "format": "google-datetime",
          "readOnly": true,
          "type": "string"
        },
        "view": {
          "enumDescriptions": [
            "The default / unset value. See each API method for its default value if DocumentView is not specified.",
            "Includes only the basic metadata fields: - `name` - `uri` - `data_source` - `title` - `description` - `update_time` - `view` - `content_length_bytes` This is the default of view for DeveloperKnowledge.SearchDocumentChunks.",
            "Includes all Document fields.",
            "Includes the `DOCUMENT_VIEW_BASIC` fields and the `content` field. This is the default of view for DeveloperKnowledge.GetDocument and DeveloperKnowledge.BatchGetDocuments."
          ],
          "type": "string",
          "description": "Output only. Specifies the DocumentView of the document.",
          "readOnly": true,
          "enum": [
            "DOCUMENT_VIEW_UNSPECIFIED",
            "DOCUMENT_VIEW_BASIC",
            "DOCUMENT_VIEW_FULL",
            "DOCUMENT_VIEW_CONTENT"
          ]
        },
        "uri": {
          "type": "string",
          "description": "Output only. Provides the URI of the content, such as `https://docs.cloud.google.com/storage/docs/creating-buckets`.",
          "readOnly": true
        },
        "title": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. Provides the title of the document."
        },
        "description": {
          "readOnly": true,
          "description": "Output only. Provides a description of the document.",
          "type": "string"
        },
        "content": {
          "description": "Output only. Contains the full content of the document in Markdown format.",
          "readOnly": true,
          "type": "string"
        },
        "name": {
          "description": "Identifier. Contains the resource name of the document. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets`",
          "type": "string"
        },
        "contentLengthBytes": {
          "format": "int32",
          "description": "Output only. The length of the `content` field in bytes.",
          "type": "integer",
          "readOnly": true
        },
        "dataSource": {
          "readOnly": true,
          "description": "Output only. Specifies the data source of the document. Example data source: `firebase.google.com`",
          "type": "string"
        }
      },
      "id": "Document",
      "description": "A Document represents a page of documentation in the Developer Knowledge corpus, like the page at https://docs.cloud.google.com/storage/docs/creating-buckets."
    },
    "DocumentChunk": {
      "description": "A DocumentChunk represents a piece of content from a Document in the DeveloperKnowledge corpus. To fetch the entire document content, pass the `parent` to DeveloperKnowledge.GetDocument or DeveloperKnowledge.BatchGetDocuments.",
      "id": "DocumentChunk",
      "properties": {
        "document": {
          "$ref": "Document",
          "readOnly": true,
          "description": "Output only. Represents metadata about the Document this chunk is from. The DocumentView of this Document message will be set to `DOCUMENT_VIEW_BASIC`. It is included here for convenience so that clients do not need to call DeveloperKnowledge.GetDocument or DeveloperKnowledge.BatchGetDocuments if they only need the metadata fields. Otherwise, clients should use DeveloperKnowledge.GetDocument or DeveloperKnowledge.BatchGetDocuments to fetch the full document content."
        },
        "relevanceScore": {
          "readOnly": true,
          "format": "double",
          "description": "Output only. Represents the relevance score of the chunk to the search query. Higher score indicates higher chunk relevance. The score is in range [0.0, 1.0].",
          "type": "number"
        },
        "id": {
          "description": "Output only. Specifies the ID of this chunk within the document. The chunk ID is unique within a document, but not globally unique across documents. The chunk ID is not stable and may change over time.",
          "readOnly": true,
          "type": "string"
        },
        "parent": {
          "description": "Output only. Contains the resource name of the document this chunk is from. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets`",
          "type": "string",
          "readOnly": true
        },
        "content": {
          "type": "string",
          "readOnly": true,
          "description": "Output only. Contains the content of the document chunk."
        }
      },
      "type": "object"
    },
    "AnswerCitation": {
      "type": "object",
      "description": "Citation info for a segment.",
      "id": "AnswerCitation",
      "properties": {
        "startIndex": {
          "format": "int32",
          "description": "Output only. Indicates the start of the segment, measured in bytes (UTF-8 unicode), inclusive. If there are multi-byte characters, such as non-ASCII characters, the index measurement is longer than the string length.",
          "readOnly": true,
          "type": "integer"
        },
        "endIndex": {
          "description": "Output only. Indicates the end of the segment, measured in bytes (UTF-8 unicode), exclusive. If there are multi-byte characters, such as non-ASCII characters, the index measurement is longer than the string length.",
          "type": "integer",
          "readOnly": true,
          "format": "int32"
        },
        "sources": {
          "items": {
            "$ref": "CitationSource"
          },
          "readOnly": true,
          "type": "array",
          "description": "Output only. Contains citation sources for the attributed segment."
        }
      }
    },
    "CitationSource": {
      "type": "object",
      "id": "CitationSource",
      "description": "Citation source.",
      "properties": {
        "referenceIndex": {
          "readOnly": true,
          "format": "int32",
          "type": "integer",
          "description": "Output only. Contains the index of the Answer.AnswerReference in the `references` repeated field."
        }
      }
    },
    "BatchGetDocumentsResponse": {
      "type": "object",
      "description": "Response message for DeveloperKnowledge.BatchGetDocuments.",
      "id": "BatchGetDocumentsResponse",
      "properties": {
        "documents": {
          "items": {
            "$ref": "Document"
          },
          "description": "Contains the documents requested.",
          "type": "array"
        }
      }
    },
    "DocumentReference": {
      "id": "DocumentReference",
      "description": "Represents a reference to a document.",
      "type": "object",
      "properties": {
        "documentChunk": {
          "readOnly": true,
          "description": "Output only. Contains the document chunk. The `document_chunk.id` field is not set and will be empty.",
          "$ref": "DocumentChunk"
        }
      }
    },
    "AnswerQueryResponse": {
      "description": "Response message for DeveloperKnowledge.AnswerQuery.",
      "type": "object",
      "id": "AnswerQueryResponse",
      "properties": {
        "answer": {
          "description": "The answer to the query.",
          "$ref": "Answer"
        }
      }
    },
    "AnswerReference": {
      "type": "object",
      "description": "Represents a reference to a source.",
      "properties": {
        "documentReference": {
          "$ref": "DocumentReference",
          "readOnly": true,
          "description": "Output only. The reference document."
        }
      },
      "id": "AnswerReference"
    },
    "AnswerQueryRequest": {
      "properties": {
        "query": {
          "type": "string",
          "description": "Required. The query to answer."
        },
        "filter": {
          "description": "Optional. Applies a strict filter to the search results used to ground the answer. The expression supports a subset of the syntax described at https://google.aip.dev/160. Supported fields for filtering: * `content_length_bytes` (INTEGER): The length of the `Document.content` field in bytes. * `data_source` (STRING): The source of the document, e.g. `docs.cloud.google.com`. See https://developers.google.com/knowledge/reference/corpus-reference for the complete list of data sources in the corpus. * `update_time` (TIMESTAMP): The timestamp of when the document was last meaningfully updated. A meaningful update is one that changes document's markdown content or metadata. * `uri` (STRING): The document URI, e.g. `https://docs.cloud.google.com/bigquery/docs/tables`. INTEGER fields support `=`, `\u003c`, `\u003c=`, `\u003e`, and `\u003e=` operators. STRING fields support `=` (equals) and `!=` (not equals) operators for **exact match** on the whole string. Partial match, prefix match, and regexp match are not supported. TIMESTAMP fields support `=`, `\u003c`, `\u003c=`, `\u003e`, and `\u003e=` operators. Timestamps must be in RFC-3339 format, e.g., `\"2025-01-01T00:00:00Z\"`. You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical operators. `OR` has higher precedence than `AND`. Use parentheses for explicit precedence grouping. Examples: * Filter by `Document.content_length_bytes`: `content_length_bytes \u003c 50000` * `data_source = \"docs.cloud.google.com\" OR data_source = \"firebase.google.com\"` * `data_source != \"firebase.google.com\"` * `update_time \u003c \"2024-01-01T00:00:00Z\"` * `update_time \u003e= \"2025-01-22T00:00:00Z\" AND (data_source = \"developer.chrome.com\" OR data_source = \"web.dev\")` * `uri = \"https://docs.cloud.google.com/release-notes\"` The `filter` string must not exceed 500 characters; values longer than 500 characters will result in an `INVALID_ARGUMENT` error.",
          "type": "string"
        }
      },
      "type": "object",
      "description": "Request message for DeveloperKnowledge.AnswerQuery.",
      "id": "AnswerQueryRequest"
    }
  }
}
