REST /api/v1/search/remote 5 endpoints
GET /api/v1/search/remote/api/v1/search/remote

List all remote search query records for audit/history

Public

Response Example

{
  "data": [
    {
      "id": "rq_00000201",
      "query": "bridge",
      "org_id": "org_NOR_0042",
      "status": "completed",
      "contact_hits": 4,
      "note_hits": 2,
      "executed_at": "2026-03-26T08:55:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1
  }
}
GET /api/v1/search/remote/api/v1/search/remote/:id

Retrieve a specific remote query record with full results

Public

Response Example

{
  "id": "rq_00000201",
  "query": "bridge",
  "org_id": "org_NOR_0042",
  "status": "completed",
  "contacts": [
    {
      "id": "cnt_00000112",
      "name": "John Smith",
      "email": "j.smith@bridgecorp.no",
      "phone": "+47 901 23 456",
      "org_name": "BridgeCorp AS",
      "created_at": "2025-09-03T07:00:00Z"
    }
  ],
  "notes": [
    {
      "id": "note_00000831",
      "contact_id": "cnt_00000112",
      "content": "Bridge project kick-off confirmed for April 2026.",
      "author_name": "Marius Dahl",
      "created_at": "2026-03-15T11:00:00Z"
    }
  ],
  "executed_at": "2026-03-26T08:55:00Z"
}
POST /api/v1/search/remote/api/v1/search/remote

Execute a remote Supabase full-text search across contacts and notes

Public

Request Example

{
  "query": "bridge",
  "org_id": "org_NOR_0042",
  "scope": [
    "contacts",
    "notes"
  ]
}

Response Example

{
  "id": "rq_00000202",
  "query": "bridge",
  "org_id": "org_NOR_0042",
  "scope": [
    "contacts",
    "notes"
  ],
  "contacts": [
    {
      "id": "cnt_00000112",
      "name": "John Smith",
      "email": "j.smith@bridgecorp.no",
      "phone": "+47 901 23 456",
      "org_name": "BridgeCorp AS",
      "created_at": "2025-09-03T07:00:00Z"
    }
  ],
  "notes": [
    {
      "id": "note_00000831",
      "contact_id": "cnt_00000112",
      "content": "Bridge project kick-off confirmed for April 2026.",
      "author_name": "Marius Dahl",
      "created_at": "2026-03-15T11:00:00Z"
    }
  ],
  "status": "completed",
  "executed_at": "2026-03-26T09:20:00Z"
}
PUT /api/v1/search/remote/api/v1/search/remote/:id

Retry or update the scope of a previous remote query

Public

Request Example

{
  "scope": [
    "contacts",
    "notes",
    "organizations"
  ],
  "org_id": "org_NOR_0042"
}

Response Example

{
  "id": "rq_00000202",
  "query": "bridge",
  "org_id": "org_NOR_0042",
  "scope": [
    "contacts",
    "notes",
    "organizations"
  ],
  "status": "completed",
  "updated_at": "2026-03-26T09:22:00Z"
}
DELETE /api/v1/search/remote/api/v1/search/remote/:id

Cancel a pending remote query and remove its record

Public

Response Example

{
  "id": "rq_00000202",
  "cancelled": true,
  "previous_status": "pending"
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}