Skip to content

Indexing

Endpoints


POST /api/v1/repositories/{repoId}/index

Trigger indexing for a repository

Authentication

Requires Bearer token. See Authentication.

Path Parameters

ParameterTypeDescription
repoIdstring

Request Body

FieldTypeRequiredDescription
mode"full" | "incremental"NoDefault: "full"

Response (202)

FieldTypeRequiredDescription
job_idstringYesFormat: uuid
messagestringYes

Error Responses

StatusDescription
401Unauthorized
403Forbidden
404Repository not found
409Indexing already in progress

Example

Request:

bash
curl -s \
  -X POST \
  "http://localhost:3000/api/v1/repositories/$REPO_ID/index" \
  -H "Authorization: Bearer $NEXGRAPH_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "full"
}'

Response:

json
{
  "job_id": "550e8400-e29b-41d4-a716-446655440000",
  "message": "string"
}

DELETE /api/v1/repositories/{repoId}/index

Cancel a running indexing job

Authentication

Requires Bearer token. See Authentication.

Path Parameters

ParameterTypeDescription
repoIdstring

Response (200)

FieldTypeRequiredDescription
messagestringYes
job_idstringYesFormat: uuid

Error Responses

StatusDescription
401Unauthorized
403Forbidden
404No active indexing job found

Example

Request:

bash
curl -s \
  -X DELETE \
  "http://localhost:3000/api/v1/repositories/$REPO_ID/index" \
  -H "Authorization: Bearer $NEXGRAPH_KEY"

Response:

json
{
  "message": "string",
  "job_id": "550e8400-e29b-41d4-a716-446655440000"
}

GET /api/v1/repositories/{repoId}/index/status

Get indexing progress for a repository

Authentication

Requires Bearer token. See Authentication.

Path Parameters

ParameterTypeDescription
repoIdstring

Response (200)

FieldTypeRequiredDescription
currentobject,nullYes
historyobject[]Yes

Error Responses

StatusDescription
401Unauthorized
403Forbidden
404Repository not found

Example

Request:

bash
curl -s \
  "http://localhost:3000/api/v1/repositories/$REPO_ID/index/status" \
  -H "Authorization: Bearer $NEXGRAPH_KEY"

Response:

json
{
  "current": null,
  "history": [
    {
      "job_id": "550e8400-e29b-41d4-a716-446655440000",
      "status": "string",
      "mode": "string",
      "phase": null,
      "progress": 1,
      "last_completed_phase": null,
      "started_at": null,
      "completed_at": null,
      "error_message": null,
      "files_total": 1,
      "files_done": 1,
      "created_at": "string"
    }
  ]
}

Released under the MIT License.