{
  "opencollection": "1.0.0",
  "info": {
    "name": "Amigo Account Data Sources API",
    "version": "0.1.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Data Sources",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List data sources",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.amigo.ai/v1/:workspace_id/data-sources",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "is_active",
                "value": "",
                "type": "query"
              },
              {
                "name": "source_type",
                "value": "",
                "type": "query",
                "description": "Filter by source type (repeatable)"
              },
              {
                "name": "search",
                "value": "",
                "type": "query",
                "description": "Search by name, ID, type, or sync status"
              },
              {
                "name": "limit",
                "value": "",
                "type": "query"
              },
              {
                "name": "continuation_token",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "List data sources for a workspace with optional filtering."
        },
        {
          "info": {
            "name": "Create a data source",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.amigo.ai/v1/:workspace_id/data-sources",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Register a new external data source in the workspace."
        },
        {
          "info": {
            "name": "Get a data source",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.amigo.ai/v1/:workspace_id/data-sources/:data_source_id",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "data_source_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Retrieve a data source by ID."
        },
        {
          "info": {
            "name": "Update a data source",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.amigo.ai/v1/:workspace_id/data-sources/:data_source_id",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "data_source_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update a data source's configuration."
        },
        {
          "info": {
            "name": "Delete a data source",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.amigo.ai/v1/:workspace_id/data-sources/:data_source_id",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "data_source_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Delete a data source."
        },
        {
          "info": {
            "name": "Get data source status",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.amigo.ai/v1/:workspace_id/data-sources/:data_source_id/status",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "data_source_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get event counts, sync status, and health for a data source."
        },
        {
          "info": {
            "name": "Get data source sync history",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.amigo.ai/v1/:workspace_id/data-sources/:data_source_id/sync-history",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "data_source_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "days",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Daily event timeline + recent sync failures for a data source."
        },
        {
          "info": {
            "name": "Trigger a manual sync for a data source",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.amigo.ai/v1/:workspace_id/data-sources/:data_source_id/sync",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "data_source_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Queues a one-off poll of the data source on connector-runner. Bypasses the business-hours gate and per-resource cadence counter. Returns 202 once the request is queued; the poll itself runs asynchronously. Returns 409 if the source is already mid-sync, 503 if connector-runner is unreachable. The 409 is best-effort: the status check and trigger are separate calls, so a scheduled poll can grab the lease between them — clients should treat 409 as a UX hint, not a hard guarantee."
        }
      ]
    }
  ],
  "bundled": true
}