Code Index

View as Markdown

Ingest Index

POST/api/v1/code/index

Store one structural scan of a tenant repo.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/code/index" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Report Failed

POST/api/v1/code/index/{index_id}/failed

Record that a scan the caller started could not be completed.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/code/index/{index_id}/failed" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Claim Index Job

POST/api/v1/code/jobs/claim

Lease this brand's oldest claimable index job to the calling desk.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/code/jobs/claim" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Post Index Job Result

POST/api/v1/code/jobs/{job_id}/result

Store the scan of a job this desk holds, and end the job.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/code/jobs/{job_id}/result" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Report Index Job Failed

POST/api/v1/code/jobs/{job_id}/failed

The desk could not finish a job it holds.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/code/jobs/{job_id}/failed" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Code Context

GET/api/v1/code/{project_id}/context

"Does this already exist?" — the pre-write check.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/code/{project_id}/context" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Code Summary

GET/api/v1/code/{project_id}/summary

The orientation document as DATA — what 2.1 renders into a briefing.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/code/{project_id}/summary" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Code Tree

GET/api/v1/code/{project_id}/tree

Where the code lives — the directory rollup behind the code-index canvas.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/code/{project_id}/tree" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Code Fidelity

GET/api/v1/code/{project_id}/fidelity

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/code/{project_id}/fidelity" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Code Files

GET/api/v1/code/{project_id}/files

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/code/{project_id}/files" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Code File Symbols

GET/api/v1/code/{project_id}/symbols

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/code/{project_id}/symbols" \
  -H "Authorization: Bearer $OPVS_TOKEN"

List Index Jobs

GET/api/v1/code/{project_id}/jobs

This project's index jobs, newest first: what was asked for, and what happened.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/code/{project_id}/jobs" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Resolve Code Nodes

POST/api/v1/code/{project_id}/nodes/resolve

Resolve text anchors to the current state of stable ledger nodes.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/code/{project_id}/nodes/resolve" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Read Code Tests For

POST/api/v1/code/{project_id}/tests-for

Return test files that reach the requested files in the READY index.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/code/{project_id}/tests-for" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Read Code Callers

POST/api/v1/code/{project_id}/callers

Answer who calls up to 50 live nodes, failing open when the index is down.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/code/{project_id}/callers" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Code Node Changes

GET/api/v1/code/{project_id}/nodes/changes

The attached repo's stable-node events, oldest first unless requested.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/code/{project_id}/nodes/changes" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Code Graph Folders

GET/api/v1/code/{project_id}/graph/folders

Folder-level imports, hubs, and mutual pairs for the Graph overview.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/code/{project_id}/graph/folders" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Code Graph

GET/api/v1/code/{project_id}/graph

The selected ready index's depth-one or depth-two import neighbourhood.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/code/{project_id}/graph" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Get Code Index Runner

GET/api/v1/brands/{brand_id}/code-index-runner

Read the effective choice; any active brand member may call it.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/brands/{brand_id}/code-index-runner" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Put Code Index Runner

PUT/api/v1/brands/{brand_id}/code-index-runner

Create or update the choice; brand admins only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X PUT "https://app.opvs.ai/api/v1/brands/{brand_id}/code-index-runner" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Did this answer your question?