CorfedoCorfedoDocs
ReferenceAPI referenceSearch and read

Search Code

POST /api/v1/search. Request parameters and response schemas.

POST
/api/v1/search

Authorization

corfedoOAuth corfedo:repositories:code:read
headerAuthorizationBearer <token>

Corfedo-issued bearer credential for the workspace's API resource, such as https://workspace.corfedo.example/api; the workspace host is the issuer. Public clients identify themselves with a Client ID Metadata Document URL and use PKCE S256; service clients use private_key_jwt. Browser cookies and MCP-resource credentials are not accepted.

Scope: corfedo:repositories:code:read

Request Body

application/json
  1. body
query*string
scope?null|
options?
continuation?null|string

Response Body

OK

application/json
  1. response
status*CodeSearchStatus
Value in"complete""partial""unavailable"
resultType?CodeResultType
Value in"file""path""repository""symbol"
results?array<||>
execution?null|
repositories?array<>
coverage?
scope?null|
scopeReduced?boolean
outputTruncated?boolean
continuation?null|string
repositoryTable?array<>
unsearchedTexts?array<string>
declarationTotals?null|
Example Request
curl -X POST 'https://example.com/api/v1/search' \  -H 'Content-Type: application/json' \  -d '{  "query": "string"}'
Example Response
{  "status": "complete",  "resultType": "file",  "results": [    {      "kind": "file",      "repository": "string",      "repositoryId": "string",      "path": "string",      "revision": "string",      "contentMatch": null    }  ],  "execution": null,  "repositories": [    {      "repositoryId": "string",      "repository": "string",      "state": "complete",      "failure": "none",      "partialReasons": [        "deadline"      ]    }  ],  "coverage": {    "total": -2147483648,    "complete": -2147483648,    "partial": -2147483648,    "unavailable": -2147483648  },  "scope": null,  "scopeReduced": true,  "outputTruncated": true,  "continuation": null,  "repositoryTable": [    {      "repositoryId": "string",      "repository": "string",      "dependencies": [        {          "value": "string",          "package": "string",          "installed": [            "string"          ],          "declared": [            "string"          ]        }      ]    }  ],  "unsearchedTexts": [    "string"  ],  "declarationTotals": null}