DocsAF Sync#

Documentation sync operations

Manually trigger documentation sync#

POST/docsaf/projects/{project_id}/sync

Manually triggers a documentation sync for a DocsAF project. Enqueues a new sync job that will clone/pull the repo and update AntflyDB.

Authentication required: bearerAuth

Parameters#

NameTypeLocationRequiredDescription
project_idstringpathYesProject ID

Code Examples#

curl -X POST "https://searchaf.antfly.io/api/v1/docsaf/projects/{project_id}/sync" \\
    -H "Authorization: Bearer YOUR_API_KEY"

Responses#

{
  "sync_job_id": "123e4567-e89b-12d3-a456-426614174000"
}

Get sync job status#

GET/docsaf/sync/{job_id}

Polls the status of a documentation sync job. Returns progress percentage, files processed, and any errors.

Authentication required: bearerAuth

Parameters#

NameTypeLocationRequiredDescription
job_idstringpathYesSync job ID

Code Examples#

curl -X GET "https://searchaf.antfly.io/api/v1/docsaf/sync/{job_id}" \\
    -H "Authorization: Bearer YOUR_API_KEY"

Responses#

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "docsaf_source_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "pending",
  "progress_percent": 0,
  "commit_sha": "string",
  "files_processed": 0,
  "sections_created": 0,
  "pages_discovered": 0,
  "pages_processed": 0,
  "pages_failed": 0,
  "current_url": "string",
  "error_message": "string",
  "started_at": "2024-01-01T00:00:00Z",
  "completed_at": "2024-01-01T00:00:00Z",
  "created_at": "2024-01-01T00:00:00Z"
}

List sync jobs for a project#

GET/docsaf/projects/{project_id}/sync-jobs

Returns a paginated list of sync jobs for a DocsAF project. Jobs are ordered by created_at descending (newest first).

Authentication required: bearerAuth

Parameters#

NameTypeLocationRequiredDescription
project_idstringpathYesProject ID
limitintegerqueryNoMaximum number of jobs to return
offsetintegerqueryNoNumber of jobs to skip

Code Examples#

curl -X GET "https://searchaf.antfly.io/api/v1/docsaf/projects/{project_id}/sync-jobs?limit=value&offset=value" \\
    -H "Authorization: Bearer YOUR_API_KEY"

Responses#

{
  "jobs": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "docsaf_source_id": "123e4567-e89b-12d3-a456-426614174000",
      "status": "pending",
      "progress_percent": 0,
      "commit_sha": "string",
      "files_processed": 0,
      "sections_created": 0,
      "pages_discovered": 0,
      "pages_processed": 0,
      "pages_failed": 0,
      "current_url": "string",
      "error_message": "string",
      "started_at": "2024-01-01T00:00:00Z",
      "completed_at": "2024-01-01T00:00:00Z",
      "created_at": "2024-01-01T00:00:00Z"
    }
  ],
  "total": 0
}