{
  "openapi": "3.1.0",
  "info": {
    "title": "Giga Integration Catalog API",
    "version": "1.0.0",
    "description": "Read-only access to Giga's public integration catalog. This contract covers only the endpoints listed here; it does not provide access to Giga accounts, workspaces, tasks, credentials, or connected-app data. No OAuth scope or API key is required or accepted for these public catalog operations."
  },
  "servers": [
    {
      "url": "https://vm.getgiga.com",
      "description": "Production catalog service"
    }
  ],
  "tags": [
    {
      "name": "Integration catalog",
      "description": "Public, read-only integration metadata"
    }
  ],
  "paths": {
    "/api/catalog/integrations": {
      "get": {
        "operationId": "listIntegrations",
        "summary": "List integrations",
        "description": "Returns public summary metadata for integrations in the Giga catalog. Results contain no workspace-specific or customer data.",
        "tags": ["Integration catalog"],
        "security": [],
        "x-required-permission": "none (anonymous public read-only access)",
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Request popularity ordering. Omit the parameter to use the service default.",
            "schema": {
              "type": "string",
              "enum": ["popularity"]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Integration summaries",
            "headers": {
              "Cache-Control": {
                "description": "Public response caching policy",
                "schema": { "type": "string" }
              }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/IntegrationList" }
              }
            }
          },
          "500": { "$ref": "#/components/responses/ServerError" }
        }
      }
    },
    "/api/catalog/integrations/{slug}": {
      "get": {
        "operationId": "getIntegration",
        "summary": "Get an integration",
        "description": "Returns the public catalog record for one integration. Provider credential guidance describes the provider's options; it does not grant access to a provider or a Giga workspace.",
        "tags": ["Integration catalog"],
        "security": [],
        "x-required-permission": "none (anonymous public read-only access)",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Integration identifier from the list endpoint",
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "notion"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Integration catalog record",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/IntegrationDetail" }
              }
            }
          },
          "404": {
            "description": "No integration has the requested slug",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/NotFound" }
              }
            }
          },
          "500": { "$ref": "#/components/responses/ServerError" }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Category": {
        "type": "object",
        "required": ["slug", "name"],
        "properties": {
          "slug": { "type": "string" },
          "name": { "type": "string" }
        },
        "additionalProperties": false
      },
      "IntegrationSummary": {
        "type": "object",
        "required": ["slug", "display_name", "logo_url", "tagline", "categories", "recommended_method"],
        "properties": {
          "slug": { "type": "string" },
          "display_name": { "type": "string" },
          "logo_url": { "type": ["string", "null"], "format": "uri" },
          "tagline": { "type": ["string", "null"] },
          "categories": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/Category" }
          },
          "recommended_method": { "type": ["string", "null"] }
        },
        "additionalProperties": false
      },
      "IntegrationList": {
        "type": "object",
        "required": ["integrations"],
        "properties": {
          "integrations": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/IntegrationSummary" }
          }
        },
        "additionalProperties": false
      },
      "ConnectionMethod": {
        "type": "object",
        "required": ["key", "display_name", "description", "status", "via", "preferred", "priority"],
        "properties": {
          "key": { "type": "string" },
          "display_name": { "type": "string" },
          "description": { "type": ["string", "null"] },
          "status": { "type": "string" },
          "via": { "type": "string" },
          "preferred": { "type": "boolean" },
          "priority": { "type": "integer" },
          "setup_instructions": { "type": ["string", "null"] },
          "doc_url": { "type": ["string", "null"], "format": "uri" },
          "notes": { "type": ["string", "null"] },
          "agent_instructions": { "type": ["string", "null"] },
          "start_url": { "type": ["string", "null"], "format": "uri" },
          "login_hint": { "type": ["string", "null"] },
          "dcr_supported": { "type": "boolean" },
          "dcr_requires_allowlist": { "type": "boolean" },
          "dcr_allowlist_granted": { "type": "boolean" },
          "mcp_url": { "type": ["string", "null"], "format": "uri" },
          "connectable": { "type": "boolean" }
        },
        "additionalProperties": true
      },
      "PageContent": {
        "description": "Optional public marketing content for the integration. The fields vary by catalog entry.",
        "type": ["object", "null"],
        "additionalProperties": true
      },
      "IntegrationDetail": {
        "type": "object",
        "required": ["slug", "display_name", "status", "categories", "methods"],
        "properties": {
          "slug": { "type": "string" },
          "workspace_id": { "type": ["string", "null"], "description": "Reserved catalog field; public records return null." },
          "display_name": { "type": "string" },
          "category": { "type": ["string", "null"] },
          "description": { "type": ["string", "null"] },
          "website_url": { "type": ["string", "null"], "format": "uri" },
          "doc_url": { "type": ["string", "null"], "format": "uri" },
          "logo_url": { "type": ["string", "null"], "format": "uri" },
          "notes": { "type": ["string", "null"] },
          "source": { "type": ["string", "null"] },
          "status": { "type": "string" },
          "pipedream_app_slug": { "type": ["string", "null"] },
          "popularity": { "type": ["integer", "null"] },
          "recommended_method": { "type": ["string", "null"] },
          "methods": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/ConnectionMethod" }
          },
          "categories": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/Category" }
          },
          "tagline": { "type": ["string", "null"] },
          "seo_title": { "type": ["string", "null"] },
          "seo_description": { "type": ["string", "null"] },
          "page_content": { "$ref": "#/components/schemas/PageContent" }
        },
        "additionalProperties": true
      },
      "NotFound": {
        "type": "object",
        "required": ["error", "slug"],
        "properties": {
          "error": { "type": "string", "const": "not_found" },
          "slug": { "type": "string" }
        },
        "additionalProperties": false
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": { "type": "string" }
        },
        "additionalProperties": true
      }
    },
    "responses": {
      "ServerError": {
        "description": "Catalog service error",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/Error" }
          }
        }
      }
    }
  },
  "x-permissions": {
    "access": "anonymous read-only",
    "oauth-scopes": "not applicable",
    "api-key-roles": "not applicable",
    "data-boundary": "public integration catalog metadata only",
    "excluded": ["accounts", "workspaces", "tasks", "credentials", "connected-app data"]
  }
}
