openapi: 3.0.3
info:
  title: Jana platform API (customer)
  version: 2.1.0
  description: "# Jana platform API (customer bundle)\n\nSingle OpenAPI document combining:\n\n- **Data\
    \ API** — `https://api-dev.jana.earth` (and local `http://localhost:8000` when using Jana `fr-data-service`):\
    \ `/api/v1/esg/*`, `/api/v1/data-sources/*`\n- **Auth API** — `https://auth-dev.jana.earth` (path\
    \ prefix `/api/auth/*` on the **jana-user** service): device-code flow, JWT login/refresh/logout,\
    \ profile, registration, etc.\n\nDescribed in `JANA_API_USER_GUIDE.md`. **Not included:** `/api/v1/management/*`\
    \ (operations).\n\n## Authentication\n\n- **Auth host:** device-code, refresh, and most login flows\
    \ — see `/api/auth/*` operations below (hosted on jana-user in production).\n- **Data host:** send\
    \ `Authorization: Bearer <jwt>` (or legacy `Token <key>` where supported) to `api-dev.jana.earth`\
    \ for data endpoints.\n\n## Quick start (data)\n\n```bash\ncurl -H \"Authorization: Bearer $TOKEN\"\
    \ \\\n  \"https://api-dev.jana.earth/api/v1/esg/summary/\"\n```\n"
  contact:
    name: Jana Earth Data
    email: info@jana.earth
    url: https://jana.earth
paths:
  /api/auth/accept-invite/:
    post:
      operationId: auth_accept_invite_create
      description: 'Accept a pending invitation and create the user account.


        Public endpoint — no authentication required.

        Returns access + refresh tokens so the user is immediately logged in.'
      tags:
      - auth
      security:
      - {}
      responses:
        '200':
          description: No response body
  /api/auth/device-authorize/:
    post:
      operationId: auth_device_authorize_create
      description: 'Step 2 — Authenticated user approves a pending device code.


        Requires a valid Bearer token (obtained via /login/ or any auth flow).

        The real User DB row is fetched so we can store the FK on DeviceCode.'
      tags:
      - auth
      responses:
        '200':
          description: No response body
  /api/auth/device-code/:
    post:
      operationId: auth_device_code_create
      description: 'Step 1 — SDK requests a device_code + user_code pair.


        Public endpoint.  No authentication required.'
      tags:
      - auth
      security:
      - {}
      responses:
        '200':
          description: No response body
  /api/auth/device-token/:
    post:
      operationId: auth_device_token_create
      description: 'Step 3 — SDK polls for tokens.


        Public endpoint.  Returns RFC 8628 error objects (HTTP 400) until the

        user has authorized, then issues access + refresh tokens on the first

        successful poll.'
      tags:
      - auth
      security:
      - {}
      responses:
        '200':
          description: No response body
  /api/auth/login/:
    post:
      operationId: auth_login_create
      description: 'Authenticate with email + password.

        Returns a short-lived RS256 JWT access token and an opaque refresh token.'
      tags:
      - auth
      security:
      - {}
      responses:
        '200':
          description: No response body
  /api/auth/logout/:
    post:
      operationId: auth_logout_create
      description: 'Revoke the supplied refresh token.

        Requires a valid access token in the Authorization header.'
      tags:
      - auth
      responses:
        '200':
          description: No response body
  /api/auth/profile/:
    get:
      operationId: auth_profile_retrieve
      description: 'Return the authenticated user''s profile and organisation memberships.

        The user is identified via the JWT `sub` claim.'
      tags:
      - auth
      responses:
        '200':
          description: No response body
  /api/auth/refresh/:
    post:
      operationId: auth_refresh_create
      description: Exchange a valid refresh token for a new access token.
      tags:
      - auth
      security:
      - {}
      responses:
        '200':
          description: No response body
  /api/auth/register/:
    post:
      operationId: auth_register_create
      description: "Register a new user.  Supply exactly one of:\n  - organization_code → link to an existing\
        \ active org by its join code\n  - organization_name → find by name (case-insensitive) or create\
        \ a new\n                        UNVERIFIED org; first registrant becomes OWNER\n  - neither \
        \          → register as an individual (WEB_USER)\n\nProviding both fields returns a 400.\nNewly\
        \ created orgs start UNVERIFIED and must be verified by a Jana admin."
      tags:
      - auth
      security:
      - {}
      responses:
        '200':
          description: No response body
  /api/auth/search/:
    post:
      operationId: auth_search_create
      description: "Handles all authentication and user-account flows.\n\nEndpoints (via SimpleRouter\
        \ in urls.py):\n  POST  /api/auth/register/  → register\n  POST  /api/auth/login/     → login\n\
        \  POST  /api/auth/refresh/   → refresh\n  POST  /api/auth/logout/    → logout\n  GET   /api/auth/profile/\
        \   → profile"
      tags:
      - auth
      responses:
        '200':
          description: No response body
  /api/auth/user/:
    get:
      operationId: auth_user_retrieve
      description: Alias for ``profile`` – supports GET /api/auth/user/.
      tags:
      - auth
      responses:
        '200':
          description: No response body
  /api/auth/users/:
    get:
      operationId: auth_users_retrieve
      description: 'Returns a paginated list of users scoped to the caller''s access level.


        **Super Admin / Janna Staff** — all users in the system, optionally narrowed to a single organisation
        via `organization_id`.


        **Org Owner / Admin** — only users who are active members of their organisation (determined from
        the JWT `firm_id` claim).


        All other callers receive a 403.'
      summary: List users
      parameters:
      - in: query
        name: is_active
        schema:
          type: boolean
        description: Filter by active status (`true` or `false`).
      - in: query
        name: is_individual
        schema:
          type: boolean
        description: Filter by individual (no-org) flag (`true` or `false`).
      - in: query
        name: organization_id
        schema:
          type: string
          format: uuid
        description: (Super-admin only) Scope results to users of a specific organisation.
      - in: query
        name: page
        schema:
          type: integer
        description: Page number (default 1).
      - in: query
        name: page_size
        schema:
          type: integer
        description: Results per page — max 100 (default 20).
      - in: query
        name: role
        schema:
          type: string
          enum:
          - admin
          - member
          - owner
        description: Filter by the user's membership role within the scoped organisation.
      - in: query
        name: search
        schema:
          type: string
        description: Case-insensitive match against email, first_name, or last_name.
      tags:
      - Users
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JanUser_UserListResponse'
          description: ''
        '403':
          description: Caller does not have permission to list users.
  /api/v1/data-sources/climatetrace/admin-areas/search/:
    get:
      operationId: data_sources_climatetrace_admin_areas_search_retrieve
      description: 'Proxy: GET /v6/admins/search — search administrative areas.'
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/data-sources/climatetrace/admin-areas/{admin_id}/geojson/:
    get:
      operationId: data_sources_climatetrace_admin_areas_geojson_retrieve
      description: 'Proxy: GET /v6/admins/{adminId}/geojson — GeoJSON for admin area.'
      parameters:
      - in: path
        name: admin_id
        schema:
          type: string
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/data-sources/climatetrace/annual-country-emissions/:
    get:
      operationId: data_sources_climatetrace_annual_country_emissions_list
      description: ViewSet for Climate TRACE annual country emissions.
      parameters:
      - in: query
        name: country_iso3
        schema:
          type: string
      - in: query
        name: gas_type
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      - in: query
        name: sector
        schema:
          type: string
      - in: query
        name: year
        schema:
          type: integer
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAnnualCountryEmissionList'
          description: ''
  /api/v1/data-sources/climatetrace/annual-country-emissions/{id}/:
    get:
      operationId: data_sources_climatetrace_annual_country_emissions_retrieve
      description: ViewSet for Climate TRACE annual country emissions.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this annual country emission.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnualCountryEmission'
          description: ''
  /api/v1/data-sources/climatetrace/assets/:
    get:
      operationId: data_sources_climatetrace_assets_list
      description: 'ViewSet for Climate TRACE assets.


        Uses CursorPagination to avoid a COUNT(1) over 1.3M rows on every list

        request. The annotated emissions_count is deferred to avoid an expensive

        correlated subquery on large result sets.'
      parameters:
      - in: query
        name: asset_type
        schema:
          type: string
      - in: query
        name: country
        schema:
          type: integer
      - name: cursor
        required: false
        in: query
        description: The pagination cursor value.
        schema:
          type: string
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAssetList'
          description: ''
  /api/v1/data-sources/climatetrace/assets/aggregated-emissions/:
    get:
      operationId: data_sources_climatetrace_assets_aggregated_emissions_retrieve
      description: 'Proxy to Climate TRACE GET /v6/assets/emissions for aggregated emissions.


        Query params: countries, sectors, subsectors, continents, groups, gas, years, bbox'
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset'
          description: ''
  /api/v1/data-sources/climatetrace/assets/{id}/:
    get:
      operationId: data_sources_climatetrace_assets_retrieve
      description: 'ViewSet for Climate TRACE assets.


        Uses CursorPagination to avoid a COUNT(1) over 1.3M rows on every list

        request. The annotated emissions_count is deferred to avoid an expensive

        correlated subquery on large result sets.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this asset.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset'
          description: ''
  /api/v1/data-sources/climatetrace/assets/{id}/emissions/:
    get:
      operationId: data_sources_climatetrace_assets_emissions_retrieve
      description: Get emissions for this asset.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this asset.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset'
          description: ''
  /api/v1/data-sources/climatetrace/assets/{id}/violations/:
    get:
      operationId: data_sources_climatetrace_assets_violations_retrieve
      description: Get violations for this asset.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this asset.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset'
          description: ''
  /api/v1/data-sources/climatetrace/company-matches/:
    get:
      operationId: data_sources_climatetrace_company_matches_list
      description: 'ViewSet for company-asset matches.


        Links Climate TRACE assets to GLEIF legal entities with confidence scoring.

        Supports filtering by LEI, company_id, matching method, and verification status.'
      parameters:
      - in: query
        name: company_id
        schema:
          type: integer
      - in: query
        name: legal_entity_lei
        schema:
          type: string
        description: Filter by GLEIF Legal Entity Identifier (20-char LEI)
      - in: query
        name: matching_method
        schema:
          type: string
          enum:
          - exact_name
          - fuzzy_name
          - manual
          - spatial
          - subsidiary
        description: 'Method used to establish company-asset relationship


          * `exact_name` - Exact Name Match

          * `fuzzy_name` - Fuzzy Name Match

          * `spatial` - Spatial Proximity Match

          * `subsidiary` - Subsidiary Relationship Match

          * `manual` - Manual Verification'
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - in: query
        name: relationship_type
        schema:
          type: string
          enum:
          - joint_venture
          - operated
          - owned
          - subsidiary
          - supplier
        description: 'Type of company-asset relationship


          * `owned` - Owned

          * `operated` - Operated

          * `subsidiary` - Subsidiary

          * `supplier` - Supplier

          * `joint_venture` - Joint Venture'
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      - in: query
        name: verified
        schema:
          type: boolean
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCompanyAssetMatchList'
          description: ''
  /api/v1/data-sources/climatetrace/company-matches/{id}/:
    get:
      operationId: data_sources_climatetrace_company_matches_retrieve
      description: 'ViewSet for company-asset matches.


        Links Climate TRACE assets to GLEIF legal entities with confidence scoring.

        Supports filtering by LEI, company_id, matching method, and verification status.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this company asset match.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyAssetMatch'
          description: ''
  /api/v1/data-sources/climatetrace/countries/:
    get:
      operationId: data_sources_climatetrace_countries_list
      description: 'ViewSet for Climate TRACE countries.


        Annotates assets_count to avoid N+1 queries in serializer.'
      parameters:
      - in: query
        name: income_group
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - in: query
        name: region
        schema:
          type: string
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCountryList'
          description: ''
  /api/v1/data-sources/climatetrace/countries/{id}/:
    get:
      operationId: data_sources_climatetrace_countries_retrieve
      description: 'ViewSet for Climate TRACE countries.


        Annotates assets_count to avoid N+1 queries in serializer.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this country.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Country'
          description: ''
  /api/v1/data-sources/climatetrace/countries/{id}/assets/:
    get:
      operationId: data_sources_climatetrace_countries_assets_retrieve
      description: Get assets in this country.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this country.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Country'
          description: ''
  /api/v1/data-sources/climatetrace/definitions/continents/:
    get:
      operationId: data_sources_climatetrace_definitions_continents_retrieve
      description: 'Proxy: GET /v6/definitions/continents — continent definitions.'
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/data-sources/climatetrace/definitions/gases/:
    get:
      operationId: data_sources_climatetrace_definitions_gases_retrieve
      description: 'Proxy: GET /v6/definitions/gases — gas type definitions.'
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/data-sources/climatetrace/definitions/groups/:
    get:
      operationId: data_sources_climatetrace_definitions_groups_retrieve
      description: 'Proxy: GET /v6/definitions/groups — country group definitions (EU, G7, etc.).'
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/data-sources/climatetrace/definitions/subsectors/:
    get:
      operationId: data_sources_climatetrace_definitions_subsectors_retrieve
      description: 'Proxy: GET /v6/definitions/subsectors — subsector definitions.'
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/data-sources/climatetrace/emissions/:
    get:
      operationId: data_sources_climatetrace_emissions_list
      description: 'ViewSet for Climate TRACE emissions.


        Uses BulkCursorPagination for consistent O(1) pagination across the platform.

        DRFCacheMixin caches serialized response data in Redis for 15 minutes (900s).


        NOTE: Django''s ``@cache_page`` does NOT work with DRF ViewSets because DRF

        returns unrendered Response objects from view methods — the Vary header is

        set later in finalize_response(), so cache_page can never compute a matching

        lookup key.  DRFCacheMixin fixes this by caching ``.data`` directly, keyed

        on the full URL (path + query string).  Each page, filter combination, and

        cursor token gets its own cache entry.  Auth is enforced by DRF''s

        ``dispatch()`` → ``initial()`` before ``list()`` is called.'
      parameters:
      - in: query
        name: asset
        schema:
          type: integer
      - in: query
        name: country_iso3
        schema:
          type: string
      - name: cursor
        required: false
        in: query
        description: The pagination cursor value.
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      - in: query
        name: sector_name
        schema:
          type: string
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedEmissionList'
          description: ''
  /api/v1/data-sources/climatetrace/emissions/country_totals/:
    get:
      operationId: data_sources_climatetrace_emissions_country_totals_retrieve
      description: 'Get emissions grouped by country.


        When no filters are applied, reads from mv_ct_country_totals to avoid

        a full GROUP BY + SUM over 53M+ rows. Falls back to live ORM aggregation

        when filters are present.'
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Emission'
          description: ''
  /api/v1/data-sources/climatetrace/emissions/date_range/:
    get:
      operationId: data_sources_climatetrace_emissions_date_range_retrieve
      description: Get the minimum and maximum start_time dates using SQL MIN/MAX aggregation.
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Emission'
          description: ''
  /api/v1/data-sources/climatetrace/emissions/gas_type_distribution/:
    get:
      operationId: data_sources_climatetrace_emissions_gas_type_distribution_retrieve
      description: Get distribution of gas types across all emissions using SQL GROUP BY.
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Emission'
          description: ''
  /api/v1/data-sources/climatetrace/emissions/sector_totals/:
    get:
      operationId: data_sources_climatetrace_emissions_sector_totals_retrieve
      description: 'Get emissions grouped by sector.


        When no filters are applied, reads from mv_ct_sector_totals to avoid

        a full GROUP BY + SUM over 53M+ rows. Falls back to live ORM aggregation

        when filters are present.'
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Emission'
          description: ''
  /api/v1/data-sources/climatetrace/emissions/totals/:
    get:
      operationId: data_sources_climatetrace_emissions_totals_retrieve
      description: 'Get global emission totals.


        When no filters are applied, reads from mv_climatetrace_stats to avoid

        full-table aggregation over 53M+ rows. Falls back to live ORM aggregation

        when filters are present.'
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Emission'
          description: ''
  /api/v1/data-sources/climatetrace/emissions/{id}/:
    get:
      operationId: data_sources_climatetrace_emissions_retrieve
      description: 'ViewSet for Climate TRACE emissions.


        Uses BulkCursorPagination for consistent O(1) pagination across the platform.

        DRFCacheMixin caches serialized response data in Redis for 15 minutes (900s).


        NOTE: Django''s ``@cache_page`` does NOT work with DRF ViewSets because DRF

        returns unrendered Response objects from view methods — the Vary header is

        set later in finalize_response(), so cache_page can never compute a matching

        lookup key.  DRFCacheMixin fixes this by caching ``.data`` directly, keyed

        on the full URL (path + query string).  Each page, filter combination, and

        cursor token gets its own cache entry.  Auth is enforced by DRF''s

        ``dispatch()`` → ``initial()`` before ``list()`` is called.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this emission.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Emission'
          description: ''
  /api/v1/data-sources/climatetrace/sectors/:
    get:
      operationId: data_sources_climatetrace_sectors_list
      description: 'ViewSet for Climate TRACE sectors.


        Annotates subsectors_count and assets_count to avoid N+1 queries in serializer.'
      parameters:
      - in: query
        name: methodology_version
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - in: query
        name: parent_sector
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedSectorList'
          description: ''
  /api/v1/data-sources/climatetrace/sectors/{id}/:
    get:
      operationId: data_sources_climatetrace_sectors_retrieve
      description: 'ViewSet for Climate TRACE sectors.


        Annotates subsectors_count and assets_count to avoid N+1 queries in serializer.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this sector.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sector'
          description: ''
  /api/v1/data-sources/climatetrace/sectors/{id}/assets/:
    get:
      operationId: data_sources_climatetrace_sectors_assets_retrieve
      description: Get assets in this sector.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this sector.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sector'
          description: ''
  /api/v1/data-sources/climatetrace/sectors/{id}/emissions_summary/:
    get:
      operationId: data_sources_climatetrace_sectors_emissions_summary_retrieve
      description: Get emissions summary for this sector.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this sector.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sector'
          description: ''
  /api/v1/data-sources/climatetrace/violations/:
    get:
      operationId: data_sources_climatetrace_violations_list
      description: ViewSet for emission violations.
      parameters:
      - in: query
        name: company_id
        schema:
          type: integer
      - in: query
        name: gas_type
        schema:
          type: string
          enum:
          - ch4
          - co2
          - co2e
          - n2o
        description: 'Gas type involved in violation


          * `co2` - CO2

          * `ch4` - CH4

          * `n2o` - N2O

          * `co2e` - CO2 Equivalent'
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - in: query
        name: resolved
        schema:
          type: boolean
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      - in: query
        name: violation_severity
        schema:
          type: string
          enum:
          - critical
          - high
          - low
          - medium
        description: 'Severity level of the violation


          * `low` - Low

          * `medium` - Medium

          * `high` - High

          * `critical` - Critical'
      - in: query
        name: violation_type
        schema:
          type: string
          enum:
          - regulatory_limit
          - sector_outlier
          - threshold_exceeded
          - trend_increase
        description: 'Type of emission violation


          * `threshold_exceeded` - Emission Threshold Exceeded

          * `trend_increase` - Significant Trend Increase

          * `sector_outlier` - Sector Emission Outlier

          * `regulatory_limit` - Regulatory Limit Exceeded'
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedEmissionViolationList'
          description: ''
  /api/v1/data-sources/climatetrace/violations/{id}/:
    get:
      operationId: data_sources_climatetrace_violations_retrieve
      description: ViewSet for emission violations.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this emission violation.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmissionViolation'
          description: ''
  /api/v1/data-sources/edgar/air-pollutant-grid/:
    get:
      operationId: data_sources_edgar_air_pollutant_grid_list
      description: 'Read-only access to air pollutant gridded emissions with spatial filtering.


        Supports ``bbox`` (min_lon,min_lat,max_lon,max_lat) and

        ``coordinates`` (lon,lat) + ``radius`` (km) query parameters.'
      parameters:
      - name: cursor
        required: false
        in: query
        description: The pagination cursor value.
        schema:
          type: string
      - in: query
        name: gas
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      - in: query
        name: sector
        schema:
          type: string
      - in: query
        name: year
        schema:
          type: integer
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAirPollutantGridList'
          description: ''
  /api/v1/data-sources/edgar/air-pollutant-grid/{id}/:
    get:
      operationId: data_sources_edgar_air_pollutant_grid_retrieve
      description: 'Read-only access to air pollutant gridded emissions with spatial filtering.


        Supports ``bbox`` (min_lon,min_lat,max_lon,max_lat) and

        ``coordinates`` (lon,lat) + ``radius`` (km) query parameters.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this air pollutant grid.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AirPollutantGrid'
          description: ''
  /api/v1/data-sources/edgar/air-pollutant-totals/:
    get:
      operationId: data_sources_edgar_air_pollutant_totals_list
      description: Read-only access to air pollutant country totals.
      parameters:
      - in: query
        name: country_code
        schema:
          type: string
      - name: cursor
        required: false
        in: query
        description: The pagination cursor value.
        schema:
          type: string
      - in: query
        name: gas
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      - in: query
        name: sector
        schema:
          type: string
      - in: query
        name: year
        schema:
          type: integer
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAirPollutantTotalList'
          description: ''
  /api/v1/data-sources/edgar/air-pollutant-totals/{id}/:
    get:
      operationId: data_sources_edgar_air_pollutant_totals_retrieve
      description: Read-only access to air pollutant country totals.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this air pollutant total.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AirPollutantTotal'
          description: ''
  /api/v1/data-sources/edgar/country-totals/:
    get:
      operationId: data_sources_edgar_country_totals_list
      description: 'Read-only access to aggregated country totals.


        Uses cursor-based pagination (O(1) per page) and DRFCacheMixin for

        application-level caching shared across all authenticated users.'
      parameters:
      - in: query
        name: country_code
        schema:
          type: string
      - name: cursor
        required: false
        in: query
        description: The pagination cursor value.
        schema:
          type: string
      - in: query
        name: gas_type
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: provisional
        schema:
          type: boolean
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      - in: query
        name: sector
        schema:
          type: string
      - in: query
        name: year
        schema:
          type: integer
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCountryTotalList'
          description: ''
  /api/v1/data-sources/edgar/country-totals/{id}/:
    get:
      operationId: data_sources_edgar_country_totals_retrieve
      description: 'Read-only access to aggregated country totals.


        Uses cursor-based pagination (O(1) per page) and DRFCacheMixin for

        application-level caching shared across all authenticated users.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this country total.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountryTotal'
          description: ''
  /api/v1/data-sources/edgar/fasttrack/:
    get:
      operationId: data_sources_edgar_fasttrack_list
      description: Read-only access to Fast-Track emissions.
      parameters:
      - in: query
        name: country_code
        schema:
          type: string
      - name: cursor
        required: false
        in: query
        description: The pagination cursor value.
        schema:
          type: string
      - in: query
        name: gas
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: provisional
        schema:
          type: boolean
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      - in: query
        name: sector
        schema:
          type: string
      - in: query
        name: year
        schema:
          type: integer
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedFastTrackEntryList'
          description: ''
  /api/v1/data-sources/edgar/fasttrack/{id}/:
    get:
      operationId: data_sources_edgar_fasttrack_retrieve
      description: Read-only access to Fast-Track emissions.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this fast track entry.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FastTrackEntry'
          description: ''
  /api/v1/data-sources/edgar/grid-emissions/:
    get:
      operationId: data_sources_edgar_grid_emissions_list
      description: 'Read-only access to gridded emissions with spatial filtering.


        Supports ``bbox`` (min_lon,min_lat,max_lon,max_lat) and

        ``coordinates`` (lon,lat) + ``radius`` (km) query parameters.'
      parameters:
      - name: cursor
        required: false
        in: query
        description: The pagination cursor value.
        schema:
          type: string
      - in: query
        name: gas
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      - in: query
        name: sector
        schema:
          type: string
      - in: query
        name: year
        schema:
          type: integer
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedGridEmissionList'
          description: ''
  /api/v1/data-sources/edgar/grid-emissions/summary/:
    get:
      operationId: data_sources_edgar_grid_emissions_summary_retrieve
      description: Return aggregated EDGAR grid metrics from precomputed MV.
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GridEmission'
          description: ''
  /api/v1/data-sources/edgar/grid-emissions/{id}/:
    get:
      operationId: data_sources_edgar_grid_emissions_retrieve
      description: 'Read-only access to gridded emissions with spatial filtering.


        Supports ``bbox`` (min_lon,min_lat,max_lon,max_lat) and

        ``coordinates`` (lon,lat) + ``radius`` (km) query parameters.'
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this grid emission.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GridEmission'
          description: ''
  /api/v1/data-sources/edgar/temporal-profiles/:
    get:
      operationId: data_sources_edgar_temporal_profiles_list
      description: Read-only access to EDGAR temporal profiles.
      parameters:
      - name: cursor
        required: false
        in: query
        description: The pagination cursor value.
        schema:
          type: string
      - in: query
        name: hour
        schema:
          type: integer
      - in: query
        name: month
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: profile_version
        schema:
          type: string
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      - in: query
        name: sector
        schema:
          type: string
      - in: query
        name: temporal_level
        schema:
          type: string
          enum:
          - hourly
          - monthly
        description: 'Temporal resolution level (monthly or hourly)


          * `monthly` - Monthly

          * `hourly` - Hourly'
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedTemporalProfileList'
          description: ''
  /api/v1/data-sources/edgar/temporal-profiles/{id}/:
    get:
      operationId: data_sources_edgar_temporal_profiles_retrieve
      description: Read-only access to EDGAR temporal profiles.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this temporal profile.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemporalProfile'
          description: ''
  /api/v1/data-sources/gcp/carbon-budget/:
    get:
      operationId: data_sources_gcp_carbon_budget_list
      parameters:
      - in: query
        name: budget_version
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - in: query
        name: year
        schema:
          type: integer
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedGCPGlobalCarbonBudgetList'
          description: ''
  /api/v1/data-sources/gcp/carbon-budget/{id}/:
    get:
      operationId: data_sources_gcp_carbon_budget_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this gcp global carbon budget.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GCPGlobalCarbonBudget'
          description: ''
  /api/v1/data-sources/gcp/emissions-by-fuel/:
    get:
      operationId: data_sources_gcp_emissions_by_fuel_list
      parameters:
      - in: query
        name: budget_version
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - in: query
        name: year
        schema:
          type: integer
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedGCPFossilEmissionsByFuelList'
          description: ''
  /api/v1/data-sources/gcp/emissions-by-fuel/{id}/:
    get:
      operationId: data_sources_gcp_emissions_by_fuel_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this gcp fossil emissions by fuel.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GCPFossilEmissionsByFuel'
          description: ''
  /api/v1/data-sources/gcp/methane-budget/:
    get:
      operationId: data_sources_gcp_methane_budget_list
      parameters:
      - in: query
        name: budget_version
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - in: query
        name: year
        schema:
          type: integer
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedGCPMethaneBudgetList'
          description: ''
  /api/v1/data-sources/gcp/methane-budget/{id}/:
    get:
      operationId: data_sources_gcp_methane_budget_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this gcp methane budget.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GCPMethaneBudget'
          description: ''
  /api/v1/data-sources/gcp/national-emissions/:
    get:
      operationId: data_sources_gcp_national_emissions_list
      parameters:
      - in: query
        name: budget_version
        schema:
          type: string
      - in: query
        name: country_code
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - in: query
        name: year
        schema:
          type: integer
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedGCPNationalEmissionsList'
          description: ''
  /api/v1/data-sources/gcp/national-emissions/{id}/:
    get:
      operationId: data_sources_gcp_national_emissions_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this gcp national emissions.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GCPNationalEmissions'
          description: ''
  /api/v1/data-sources/gleif/entities/:
    get:
      operationId: data_sources_gleif_entities_list
      description: 'ViewSet for GLEIF legal entities.


        Supports search by name, filtering by country/status/category,

        and LEI-based lookup.'
      parameters:
      - in: query
        name: entity_category
        schema:
          type: string
          enum:
          - BRANCH
          - FUND
          - GENERAL
          - INTERNATIONAL_ORGANIZATION
          - RESIDENT_GOVERNMENT_ENTITY
          - SOLE_PROPRIETOR
        description: 'Entity category (GENERAL, FUND, BRANCH, etc.)


          * `GENERAL` - General

          * `FUND` - Fund

          * `BRANCH` - Branch

          * `SOLE_PROPRIETOR` - Sole Proprietor

          * `RESIDENT_GOVERNMENT_ENTITY` - Resident Government Entity

          * `INTERNATIONAL_ORGANIZATION` - International Organization'
      - in: query
        name: entity_status
        schema:
          type: string
          enum:
          - ACTIVE
          - INACTIVE
        description: 'Entity operating status (ACTIVE, INACTIVE)


          * `ACTIVE` - Active

          * `INACTIVE` - Inactive'
      - in: query
        name: headquarters_country
        schema:
          type: string
      - in: query
        name: jurisdiction
        schema:
          type: string
      - in: query
        name: legal_address_country
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - in: query
        name: registration_status
        schema:
          type: string
          enum:
          - ANNULLED
          - CANCELLED
          - ISSUED
          - LAPSED
          - MERGED
          - PENDING_ARCHIVAL
          - PENDING_TRANSFER
          - RETIRED
          - TRANSFERRED
        description: 'LEI registration status (ISSUED, LAPSED, RETIRED, etc.)


          * `ISSUED` - Issued

          * `LAPSED` - Lapsed

          * `MERGED` - Merged

          * `RETIRED` - Retired

          * `ANNULLED` - Annulled

          * `CANCELLED` - Cancelled

          * `TRANSFERRED` - Transferred

          * `PENDING_TRANSFER` - Pending Transfer

          * `PENDING_ARCHIVAL` - Pending Archival'
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedLegalEntityListList'
          description: ''
  /api/v1/data-sources/gleif/entities/{lei}/:
    get:
      operationId: data_sources_gleif_entities_retrieve
      description: 'ViewSet for GLEIF legal entities.


        Supports search by name, filtering by country/status/category,

        and LEI-based lookup.'
      parameters:
      - in: path
        name: lei
        schema:
          type: string
          description: 20-character Legal Entity Identifier (ISO 17442)
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegalEntityDetail'
          description: ''
  /api/v1/data-sources/gleif/entities/{lei}/asset-matches/:
    get:
      operationId: data_sources_gleif_entities_asset_matches_retrieve
      description: 'Get Climate TRACE assets matched to this legal entity.


        Returns CompanyAssetMatch records linking this GLEIF entity to

        Climate TRACE emission-producing facilities.'
      parameters:
      - in: path
        name: lei
        schema:
          type: string
          description: 20-character Legal Entity Identifier (ISO 17442)
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegalEntityList'
          description: ''
  /api/v1/data-sources/gleif/entities/{lei}/children/:
    get:
      operationId: data_sources_gleif_entities_children_retrieve
      description: Get direct child entities for a given LEI.
      parameters:
      - in: path
        name: lei
        schema:
          type: string
          description: 20-character Legal Entity Identifier (ISO 17442)
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegalEntityList'
          description: ''
  /api/v1/data-sources/gleif/entities/{lei}/parents/:
    get:
      operationId: data_sources_gleif_entities_parents_retrieve
      description: Get direct and ultimate parent entities for a given LEI.
      parameters:
      - in: path
        name: lei
        schema:
          type: string
          description: 20-character Legal Entity Identifier (ISO 17442)
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegalEntityList'
          description: ''
  /api/v1/data-sources/gleif/exceptions/:
    get:
      operationId: data_sources_gleif_exceptions_list
      description: ViewSet for GLEIF reporting exceptions.
      parameters:
      - in: query
        name: exception_category
        schema:
          type: string
          enum:
          - DIRECT_ACCOUNTING_CONSOLIDATION_PARENT
          - ULTIMATE_ACCOUNTING_CONSOLIDATION_PARENT
        description: 'Which parent relationship the exception applies to


          * `DIRECT_ACCOUNTING_CONSOLIDATION_PARENT` - Direct Accounting Consolidation Parent

          * `ULTIMATE_ACCOUNTING_CONSOLIDATION_PARENT` - Ultimate Accounting Consolidation Parent'
      - in: query
        name: exception_reason
        schema:
          type: string
          enum:
          - BINDING_LEGAL_OBSTACLES
          - CONSENT_NOT_OBTAINED
          - DETRIMENT_NOT_EXCLUDED
          - NATURAL_PERSONS
          - NON_CONSOLIDATING
          - NON_PUBLIC
          - NO_KNOWN_PERSON
          - NO_LEI
        description: 'Reason the parent relationship cannot be reported


          * `NO_LEI` - Parent exists but does not have an LEI

          * `NO_KNOWN_PERSON` - No known controlling person

          * `NON_CONSOLIDATING` - Not subject to consolidation

          * `NATURAL_PERSONS` - Controlled by natural person(s)

          * `NON_PUBLIC` - Non-public information

          * `BINDING_LEGAL_OBSTACLES` - Binding legal obstacles to disclosure

          * `DETRIMENT_NOT_EXCLUDED` - Detriment to entity not excluded

          * `CONSENT_NOT_OBTAINED` - Consent of parent not obtained'
      - in: query
        name: lei
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedReportingExceptionList'
          description: ''
  /api/v1/data-sources/gleif/exceptions/{id}/:
    get:
      operationId: data_sources_gleif_exceptions_retrieve
      description: ViewSet for GLEIF reporting exceptions.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this GLEIF Reporting Exception.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportingException'
          description: ''
  /api/v1/data-sources/gleif/relationships/:
    get:
      operationId: data_sources_gleif_relationships_list
      description: ViewSet for GLEIF entity relationships.
      parameters:
      - in: query
        name: end_lei
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - in: query
        name: relationship_status
        schema:
          type: string
          enum:
          - ACTIVE
          - INACTIVE
        description: 'Current status of the relationship


          * `ACTIVE` - Active

          * `INACTIVE` - Inactive'
      - in: query
        name: relationship_type
        schema:
          type: string
          enum:
          - IS_DIRECTLY_CONSOLIDATED_BY
          - IS_FEEDER_TO
          - IS_FUND_MANAGED_BY
          - IS_INTERNATIONAL_BRANCH_OF
          - IS_SUBFUND_OF
          - IS_ULTIMATELY_CONSOLIDATED_BY
        description: 'Type of relationship between the two entities


          * `IS_DIRECTLY_CONSOLIDATED_BY` - Is Directly Consolidated By

          * `IS_ULTIMATELY_CONSOLIDATED_BY` - Is Ultimately Consolidated By

          * `IS_INTERNATIONAL_BRANCH_OF` - Is International Branch Of

          * `IS_FUND_MANAGED_BY` - Is Fund-Managed By

          * `IS_SUBFUND_OF` - Is Sub-Fund Of

          * `IS_FEEDER_TO` - Is Feeder To'
      - in: query
        name: start_lei
        schema:
          type: string
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedEntityRelationshipList'
          description: ''
  /api/v1/data-sources/gleif/relationships/{id}/:
    get:
      operationId: data_sources_gleif_relationships_retrieve
      description: ViewSet for GLEIF entity relationships.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this GLEIF Entity Relationship.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityRelationship'
          description: ''
  /api/v1/data-sources/noaa_storm_events/events/:
    get:
      operationId: data_sources_noaa_storm_events_events_list
      parameters:
      - in: query
        name: event_type
        schema:
          type: string
      - in: query
        name: month
        schema:
          type: integer
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - in: query
        name: state
        schema:
          type: string
      - in: query
        name: year
        schema:
          type: integer
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedNOAAStormEventList'
          description: ''
  /api/v1/data-sources/noaa_storm_events/events/{id}/:
    get:
      operationId: data_sources_noaa_storm_events_events_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this noaa storm event.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NOAAStormEvent'
          description: ''
  /api/v1/data-sources/openaq/datasets/:
    get:
      operationId: data_sources_openaq_datasets_list
      description: ViewSet for managing business datasets (read-only logical views).
      parameters:
      - in: query
        name: data_owner
        schema:
          type: string
      - in: query
        name: dataset_type
        schema:
          type: string
          enum:
          - community_health
          - esg_compliance
          - facility_monitoring
          - industrial_corridor
          - regional_air_quality
        description: 'Type of dataset


          * `facility_monitoring` - Facility Environmental Monitoring

          * `regional_air_quality` - Regional Air Quality Study

          * `industrial_corridor` - Industrial Corridor Analysis

          * `community_health` - Community Health Impact Study

          * `esg_compliance` - ESG Compliance Monitoring'
      - in: query
        name: is_active
        schema:
          type: boolean
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDatasetSummaryList'
          description: ''
    post:
      operationId: data_sources_openaq_datasets_create
      description: ViewSet for managing business datasets (read-only logical views).
      tags:
      - data-sources
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetCreateRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatasetCreateRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatasetCreateRequest'
        required: true
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetCreate'
          description: ''
  /api/v1/data-sources/openaq/datasets/{id}/:
    get:
      operationId: data_sources_openaq_datasets_retrieve
      description: ViewSet for managing business datasets (read-only logical views).
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this dataset.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dataset'
          description: ''
    put:
      operationId: data_sources_openaq_datasets_update
      description: ViewSet for managing business datasets (read-only logical views).
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this dataset.
        required: true
      tags:
      - data-sources
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetCreateRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatasetCreateRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatasetCreateRequest'
        required: true
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetCreate'
          description: ''
    patch:
      operationId: data_sources_openaq_datasets_partial_update
      description: ViewSet for managing business datasets (read-only logical views).
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this dataset.
        required: true
      tags:
      - data-sources
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedDatasetCreateRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedDatasetCreateRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedDatasetCreateRequest'
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetCreate'
          description: ''
    delete:
      operationId: data_sources_openaq_datasets_destroy
      description: ViewSet for managing business datasets (read-only logical views).
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this dataset.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '204':
          description: No response body
  /api/v1/data-sources/openaq/instruments/:
    get:
      operationId: data_sources_openaq_instruments_retrieve
      description: Proxy view for OpenAQ instruments reference data.
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/data-sources/openaq/licenses/:
    get:
      operationId: data_sources_openaq_licenses_retrieve
      description: Proxy view for OpenAQ licenses reference data.
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/data-sources/openaq/locations/:
    get:
      operationId: data_sources_openaq_locations_list
      description: ViewSet for OpenAQ locations.
      parameters:
      - in: query
        name: country_code
        schema:
          type: string
      - in: query
        name: is_mobile
        schema:
          type: boolean
      - in: query
        name: is_monitor
        schema:
          type: boolean
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedLocationSummaryList'
          description: ''
  /api/v1/data-sources/openaq/locations/{id}/:
    get:
      operationId: data_sources_openaq_locations_retrieve
      description: ViewSet for OpenAQ locations.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this location.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Location'
          description: ''
  /api/v1/data-sources/openaq/locations/{id}/flags/:
    get:
      operationId: data_sources_openaq_locations_flags_retrieve
      description: Proxy quality flags for a location from OpenAQ upstream.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this location.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Location'
          description: ''
  /api/v1/data-sources/openaq/locations/{id}/latest_measurements/:
    get:
      operationId: data_sources_openaq_locations_latest_measurements_retrieve
      description: "Get latest measurements for a specific location.\n\nQuery params:\n    datetime_min:\
        \ ISO 8601 timestamp — exclude measurements older than this."
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this location.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Location'
          description: ''
  /api/v1/data-sources/openaq/locations/{id}/sensors/:
    get:
      operationId: data_sources_openaq_locations_sensors_retrieve
      description: Get sensors for a specific location.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this location.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Location'
          description: ''
  /api/v1/data-sources/openaq/manufacturers/:
    get:
      operationId: data_sources_openaq_manufacturers_retrieve
      description: Proxy view for OpenAQ manufacturers reference data.
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/data-sources/openaq/measurements/:
    get:
      operationId: data_sources_openaq_measurements_list
      description: ViewSet for OpenAQ measurements.
      parameters:
      - in: query
        name: location__country_code
        schema:
          type: string
      - in: query
        name: location__id
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: parameter_name
        schema:
          type: string
      - in: query
        name: sensor__id
        schema:
          type: integer
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedMeasurementSummaryList'
          description: ''
  /api/v1/data-sources/openaq/measurements/country_totals/:
    get:
      operationId: data_sources_openaq_measurements_country_totals_retrieve
      description: Get measurements grouped by country using SQL GROUP BY aggregation.
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Measurement'
          description: ''
  /api/v1/data-sources/openaq/measurements/date_range/:
    get:
      operationId: data_sources_openaq_measurements_date_range_retrieve
      description: Get the minimum and maximum measured_at dates using SQL MIN/MAX aggregation.
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Measurement'
          description: ''
  /api/v1/data-sources/openaq/measurements/parameter_totals/:
    get:
      operationId: data_sources_openaq_measurements_parameter_totals_retrieve
      description: Get measurements grouped by parameter using SQL GROUP BY aggregation.
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Measurement'
          description: ''
  /api/v1/data-sources/openaq/measurements/totals/:
    get:
      operationId: data_sources_openaq_measurements_totals_retrieve
      description: 'Get global measurement totals.


        When no filters are applied, uses pg_class.reltuples for count and

        skips avg/min/max aggregation (running those over 1.3B+ rows exceeds

        the request timeout). With filters, runs full live aggregation.


        Uses manual django_cache.get/set instead of @cache_page (which does

        not work with DRF ViewSets due to unrendered Response objects).'
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Measurement'
          description: ''
  /api/v1/data-sources/openaq/measurements/{id}/:
    get:
      operationId: data_sources_openaq_measurements_retrieve
      description: ViewSet for OpenAQ measurements.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this measurement.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Measurement'
          description: ''
  /api/v1/data-sources/openaq/owners/:
    get:
      operationId: data_sources_openaq_owners_retrieve
      description: Proxy view for OpenAQ owners reference data.
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/data-sources/openaq/parameters/:
    get:
      operationId: data_sources_openaq_parameters_list
      description: ViewSet for OpenAQ parameters.
      parameters:
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedParameterList'
          description: ''
  /api/v1/data-sources/openaq/parameters/{id}/:
    get:
      operationId: data_sources_openaq_parameters_retrieve
      description: ViewSet for OpenAQ parameters.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this parameter.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Parameter'
          description: ''
  /api/v1/data-sources/openaq/providers/:
    get:
      operationId: data_sources_openaq_providers_retrieve
      description: Proxy view for OpenAQ providers reference data.
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/data-sources/openaq/sensors/:
    get:
      operationId: data_sources_openaq_sensors_list
      description: ViewSet for OpenAQ sensors.
      parameters:
      - in: query
        name: location
        schema:
          type: integer
      - in: query
        name: location__country_code
        schema:
          type: string
      - in: query
        name: location__id
        schema:
          type: integer
      - in: query
        name: location__is_monitor
        schema:
          type: boolean
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - in: query
        name: parameter__name
        schema:
          type: string
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedSensorList'
          description: ''
  /api/v1/data-sources/openaq/sensors/{id}/:
    get:
      operationId: data_sources_openaq_sensors_retrieve
      description: ViewSet for OpenAQ sensors.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this sensor.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sensor'
          description: ''
  /api/v1/data-sources/openaq/sensors/{id}/daily/:
    get:
      operationId: data_sources_openaq_sensors_daily_retrieve
      description: Proxy daily pre-aggregated data from OpenAQ upstream.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this sensor.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sensor'
          description: ''
  /api/v1/data-sources/openaq/sensors/{id}/day-of-week/:
    get:
      operationId: data_sources_openaq_sensors_day_of_week_retrieve
      description: Proxy day-of-week time-pattern aggregation from OpenAQ upstream.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this sensor.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sensor'
          description: ''
  /api/v1/data-sources/openaq/sensors/{id}/flags/:
    get:
      operationId: data_sources_openaq_sensors_flags_retrieve
      description: Proxy quality flags for a sensor from OpenAQ upstream.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this sensor.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sensor'
          description: ''
  /api/v1/data-sources/openaq/sensors/{id}/hour-of-day/:
    get:
      operationId: data_sources_openaq_sensors_hour_of_day_retrieve
      description: Proxy hour-of-day time-pattern aggregation from OpenAQ upstream.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this sensor.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sensor'
          description: ''
  /api/v1/data-sources/openaq/sensors/{id}/hourly/:
    get:
      operationId: data_sources_openaq_sensors_hourly_retrieve
      description: Proxy hourly pre-aggregated data from OpenAQ upstream.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this sensor.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sensor'
          description: ''
  /api/v1/data-sources/openaq/sensors/{id}/measurements/:
    get:
      operationId: data_sources_openaq_sensors_measurements_retrieve
      description: Get measurements for a specific sensor.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this sensor.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sensor'
          description: ''
  /api/v1/data-sources/openaq/sensors/{id}/month-of-year/:
    get:
      operationId: data_sources_openaq_sensors_month_of_year_retrieve
      description: Proxy month-of-year time-pattern aggregation from OpenAQ upstream.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this sensor.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sensor'
          description: ''
  /api/v1/data-sources/openaq/sensors/{id}/yearly/:
    get:
      operationId: data_sources_openaq_sensors_yearly_retrieve
      description: Proxy yearly pre-aggregated data from OpenAQ upstream.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this sensor.
        required: true
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sensor'
          description: ''
  /api/v1/data-sources/openaq/stats/:
    get:
      operationId: data_sources_openaq_stats_retrieve
      description: 'Get overall data statistics.


        Uses manual django_cache.get/set instead of @cache_page (which does

        not work with DRF APIViews due to unrendered Response objects).'
      tags:
      - data-sources
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/aggregations/:
    get:
      operationId: esg_aggregations_retrieve
      description: 'Get temporal aggregations of emissions/measurements data.


        Query Parameters:

        - country_codes: ISO 3-letter country codes (required)

        - temporal_resolution: Aggregation level [''hourly'', ''daily'', ''monthly''] (required)

        - sources: Data sources [''climatetrace'', ''openaq'', ''edgar''] (default: [''climatetrace''])

        - date_from / date_to: Temporal range (ISO 8601)

        - location_bbox: Geographic bounding box [min_lon, min_lat, max_lon, max_lat]

        - parameters: Parameters to aggregate (for OpenAQ)

        - quality_threshold: Minimum quality score (for OpenAQ)'
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/analytics/:
    get:
      operationId: esg_analytics_retrieve
      description: 'Analyze correlations between air quality measurements and emissions data.


        Provides spatial and temporal correlation analysis between

        OpenAQ air quality data and Climate TRACE emissions data.'
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/climatetrace-statistics/:
    get:
      operationId: esg_climatetrace_statistics_retrieve
      description: Get comprehensive Climate TRACE statistics across all tables.
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/correlations/:
    get:
      operationId: esg_correlations_retrieve
      description: 'Get correlations between air quality measurements and emissions data.


        Analyzes spatial/temporal relationships between OpenAQ air quality

        measurements and Climate TRACE emissions data.


        Query Parameters:

        - country_codes: ISO 3-letter country codes (required)

        - sources: At least 2 data sources (required)'
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/data/:
    get:
      operationId: esg_data_retrieve
      description: 'Get unified ESG data from multiple sources.


        Query Parameters (at least one geographic filter required):

        - country_codes: ISO 3-letter country codes

        - location_bbox: Bounding box [min_lon, min_lat, max_lon, max_lat]

        - location_point: Point coordinates [longitude, latitude]

        - radius_km: Search radius for point queries (default: 10km)

        - sources: Data sources [''openaq'', ''climatetrace'', ''edgar'']

        - date_from / date_to: Temporal filtering (ISO 8601)

        - parameters: Environmental parameters [''pm25'', ''co2'', ''no2'', etc.]

        - include_correlations: Cross-source correlations (boolean)

        - limit: Maximum results (default: 1000, max: 10000)'
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/definitions/:
    get:
      operationId: esg_definitions_retrieve
      description: Return definitions overview with links to sub-endpoints.
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/definitions/sources/:
    get:
      operationId: esg_definitions_sources_retrieve
      description: Return data source definitions and metadata.
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/definitions/units/:
    get:
      operationId: esg_definitions_units_retrieve
      description: Return units definitions, conversions, and gas types.
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/export/:
    get:
      operationId: esg_export_retrieve
      description: 'Export bulk data in various formats.


        Query Parameters:

        - table_name: Table to export (required)

        - format: Export format - ''json'', ''csv'' (default: ''json'')

        - date_from: Start date filter (ISO format, optional)

        - date_to: End date filter (ISO format, optional)

        - limit: Maximum records to export (default: 10000, max: 100000)

        - fields: Comma-separated list of fields to include (optional, defaults to all)'
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/exports/:
    post:
      operationId: esg_exports_create
      description: Create export job and enqueue Celery task.
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/exports/{job_id}/:
    get:
      operationId: esg_exports_retrieve
      description: Return export job status with download URL if completed.
      parameters:
      - in: path
        name: job_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/exports/{job_id}/download/:
    get:
      operationId: esg_exports_download_retrieve
      description: Redirect to signed S3 URL for download.
      parameters:
      - in: path
        name: job_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/health/:
    get:
      operationId: esg_health_retrieve
      description: Return health status of ESG services.
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/locations/:
    get:
      operationId: esg_locations_retrieve
      description: 'Get combined location data from all sources.


        Query Parameters:

        - country_codes: ISO 3-letter country codes (required)

        - sources: Data sources [''openaq'', ''climatetrace'', ''edgar'']

        - location_bbox: Bounding box filter

        - location_point: Point + radius filter

        - radius_km: Search radius for point queries

        - limit: Maximum results'
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/openaq-statistics/:
    get:
      operationId: esg_openaq_statistics_retrieve
      description: Get comprehensive OpenAQ statistics across all tables.
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/parameters/:
    get:
      operationId: esg_parameters_retrieve
      description: 'Get available environmental parameters across all data sources.


        Query Parameters:

        - sources: Filter parameters by data sources [''openaq'', ''climatetrace'', ''edgar'']'
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/quality/:
    get:
      operationId: esg_quality_retrieve
      description: 'Get comprehensive data quality insights across tables.


        Query Parameters:

        - table_name: Specific table to analyze (optional, defaults to all tables)'
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/sectors/:
    get:
      operationId: esg_sectors_retrieve
      description: 'Get available sectors across all data sources.


        Returns sectors from:

        - Climate TRACE: Structured sector taxonomy (only sectors with emissions data)

        - EDGAR: Sectors from country totals, grid emissions, and temporal profiles


        Query Parameters:

        - country_codes: ISO 3-letter country codes (required)

        - sources: Data sources [''climatetrace'', ''edgar''] (default: all)

        - limit: Maximum results (default: 1000)

        - date_from / date_to: Temporal filtering (ISO format)'
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/statistics/:
    get:
      operationId: esg_statistics_list
      description: Get overview of all tables available for statistics analysis
      summary: List available tables with basic statistics
      parameters:
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                required:
                - count
                - results
                properties:
                  count:
                    type: integer
                    example: 123
                  next:
                    type: string
                    nullable: true
                    format: uri
                    example: http://api.example.org/accounts/?page=4
                  previous:
                    type: string
                    nullable: true
                    format: uri
                    example: http://api.example.org/accounts/?page=2
                  results:
                    type: array
                    items:
                      type: object
                      additionalProperties: {}
                      description: Unspecified response body
          description: ''
  /api/v1/esg/statistics/{id}/:
    get:
      operationId: esg_statistics_retrieve
      description: Retrieve comprehensive statistics including temporal coverage, distributions, and performance
        metrics
      summary: Get statistics for a specific table
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
                description: Unspecified response body
          description: ''
  /api/v1/esg/summary/:
    get:
      operationId: esg_summary_retrieve
      description: 'Get comprehensive platform summary across all data sources.


        Provides unified overview including:

        - Cross-source data volume metrics

        - Geographic and parameter coverage

        - Data quality and freshness indicators

        - System health and performance stats'
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/system-health/:
    get:
      operationId: esg_system_health_retrieve
      description: 'Get real-time system health metrics and performance indicators.


        Provides current system status, data freshness alerts,

        ingestion health, and API performance metrics.'
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
  /api/v1/esg/trends/:
    get:
      operationId: esg_trends_retrieve
      description: 'Analyze trends in data over time with forecasting.


        Query Parameters:

        - table_name: Specific table to analyze (optional)

        - parameter: Parameter to analyze (e.g., ''pm25'', ''co2'') (optional)

        - date_from: Start date (ISO format, optional, defaults to 12 months ago)

        - date_to: End date (ISO format, optional, defaults to now)

        - temporal_resolution: ''daily'', ''weekly'', ''monthly'', ''yearly'' (default: ''monthly'')'
      tags:
      - esg
      security:
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '200':
          description: No response body
components:
  schemas:
    AirPollutantGrid:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        grid_id:
          type: string
          description: Grid cell identifier (lon:lat format)
          maxLength: 64
        year:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Reporting year for emissions
        gas:
          type: string
          description: Air pollutant type (NOx, SO2, PM25, PM10, CO, NMVOC, NH3, BC, OC)
          maxLength: 50
        sector:
          type: string
          description: EDGAR economic sector classification code
          maxLength: 120
        value:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
          description: Emission value in tonnes for the grid cell
        lat:
          type: string
          format: decimal
          pattern: ^-?\d{0,4}(?:\.\d{0,6})?$
          description: Latitude in decimal degrees (synced with geometry field)
        lon:
          type: string
          format: decimal
          pattern: ^-?\d{0,4}(?:\.\d{0,6})?$
          description: Longitude in decimal degrees (synced with geometry field)
        source_version:
          type: string
          description: EDGAR release version identifier
          maxLength: 50
        ingested_at:
          type: string
          format: date-time
          description: Timestamp when record was ingested into the platform
      required:
      - gas
      - grid_id
      - id
      - lat
      - lon
      - sector
      - source_version
      - value
      - year
    AirPollutantTotal:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        country_code:
          type: string
          description: ISO 3166-1 alpha-3 country code
          maxLength: 3
        year:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Reporting year for emissions
        gas:
          type: string
          description: Air pollutant type (NOx, SO2, PM25, PM10, CO, NMVOC, NH3, BC, OC)
          maxLength: 50
        sector:
          type: string
          description: EDGAR economic sector classification code
          maxLength: 120
        value:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
          description: Emission value for the given pollutant and sector
        unit:
          type: string
          description: Unit of measurement (e.g., Gg)
          maxLength: 20
        source_version:
          type: string
          description: EDGAR release version identifier
          maxLength: 50
        ingested_at:
          type: string
          format: date-time
          description: Timestamp when record was ingested into the platform
      required:
      - country_code
      - gas
      - id
      - sector
      - source_version
      - value
      - year
    AnnualCountryEmission:
      type: object
      description: Serializer for Climate TRACE annual country emissions.
      properties:
        id:
          type: integer
          readOnly: true
        country_iso3:
          type: string
          description: ISO 3166-1 alpha-3 country code
          maxLength: 3
        country_name:
          type: string
          description: Country name (denormalized for convenience)
          maxLength: 200
        year:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Emission year (e.g., 2023)
        sector:
          type: string
          description: Climate TRACE sector name
          maxLength: 200
        subsector:
          type: string
          description: Climate TRACE subsector name
          maxLength: 200
        gas_type:
          type: string
          description: Gas type (co2, ch4, n2o, co2e_100yr, co2e_20yr)
          maxLength: 50
        emissions_quantity:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
          description: Emissions value in tonnes
        uncertainty_lower:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
          nullable: true
          description: Lower bound of uncertainty range
        uncertainty_upper:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
          nullable: true
          description: Upper bound of uncertainty range
        methodology:
          type: string
          description: Emission calculation methodology
          maxLength: 200
        data_source:
          type: string
          description: 'Data source: climatetrace_api, climatetrace_bulk_csv'
          maxLength: 100
        source_version:
          type: string
          description: Climate TRACE data version (e.g., v5.2.0)
          maxLength: 50
        ingested_at:
          type: string
          format: date-time
          description: Timestamp when record was ingested into the platform
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Record last update timestamp
      required:
      - country_iso3
      - emissions_quantity
      - gas_type
      - id
      - sector
      - updated_at
      - year
    Asset:
      type: object
      description: Serializer for Climate TRACE assets.
      properties:
        id:
          type: integer
          readOnly: true
        climatetrace_id:
          type: string
          description: Climate TRACE asset ID
          maxLength: 200
        asset_name:
          type: string
          description: Asset name
          maxLength: 500
        asset_type:
          type: string
          description: Asset type classification
          maxLength: 200
        sector:
          type: integer
          description: Associated emission sector
        sector_name:
          type: string
          readOnly: true
        country:
          type: integer
          description: Asset country location
        country_name:
          type: string
          readOnly: true
        country_iso3:
          type: string
          readOnly: true
        latitude:
          type: string
          format: decimal
          pattern: ^-?\d{0,3}(?:\.\d{0,7})?$
          nullable: true
          description: Latitude in decimal degrees (synced with geometry field)
        longitude:
          type: string
          format: decimal
          pattern: ^-?\d{0,3}(?:\.\d{0,7})?$
          nullable: true
          description: Longitude in decimal degrees (synced with geometry field)
        coordinates:
          type: string
          readOnly: true
        owner_name:
          type: string
          description: Asset owner name
          maxLength: 500
        parent_company:
          type: string
          description: Parent company name
          maxLength: 500
        capacity:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,3})?$
          nullable: true
          description: Asset capacity
        capacity_unit:
          type: string
          description: Capacity unit
          maxLength: 50
        capacity_mw:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,3})?$
          nullable: true
          description: Asset capacity in megawatts
        start_time:
          type: string
          format: date-time
          nullable: true
          description: Asset start time
        end_time:
          type: string
          format: date-time
          nullable: true
          description: Asset end time
        created_date:
          type: string
          format: date-time
          nullable: true
          description: Asset creation or first operation date
        last_reported_date:
          type: string
          format: date-time
          nullable: true
          description: Last emission data reporting date
        latest_co2e_tonnes:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,6})?$
          nullable: true
          description: Most recent CO2e emission value
        latest_emission_date:
          type: string
          format: date-time
          nullable: true
          description: Date of most recent emission measurement
        emissions_count:
          type: integer
          readOnly: true
        ingested_at:
          type: string
          format: date-time
          description: Timestamp when record was ingested into the platform
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Record last update timestamp
      required:
      - climatetrace_id
      - coordinates
      - country
      - country_iso3
      - country_name
      - emissions_count
      - id
      - sector
      - sector_name
      - updated_at
    BlankEnum:
      enum:
      - ''
    CompanyAssetMatch:
      type: object
      description: "Serializer for company-asset matches.\n\nRequires ViewSet queryset to use:\n    select_related('asset',\
        \ 'asset__country', 'asset__sector', 'legal_entity')"
      properties:
        id:
          type: integer
          readOnly: true
        company_id:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Legacy company ID (retained for backward compatibility)
        legal_entity_lei:
          type: string
          readOnly: true
        legal_entity_name:
          type: string
          readOnly: true
        asset:
          type: integer
          description: Associated Climate TRACE asset
        asset_id:
          type: string
          readOnly: true
        asset_name:
          type: string
          readOnly: true
        sector_name:
          type: string
          readOnly: true
        country_iso3:
          type: string
          readOnly: true
        matching_method:
          allOf:
          - $ref: '#/components/schemas/MatchingMethodEnum'
          description: 'Method used to establish company-asset relationship


            * `exact_name` - Exact Name Match

            * `fuzzy_name` - Fuzzy Name Match

            * `spatial` - Spatial Proximity Match

            * `subsidiary` - Subsidiary Relationship Match

            * `manual` - Manual Verification'
        matching_confidence:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,2})?$
          description: Confidence score for the match (0-1)
        relationship_type:
          allOf:
          - $ref: '#/components/schemas/CompanyAssetMatchRelationshipTypeEnum'
          description: 'Type of company-asset relationship


            * `owned` - Owned

            * `operated` - Operated

            * `subsidiary` - Subsidiary

            * `supplier` - Supplier

            * `joint_venture` - Joint Venture'
        ownership_percentage:
          type: string
          format: decimal
          pattern: ^-?\d{0,3}(?:\.\d{0,2})?$
          nullable: true
          description: Ownership percentage if applicable
        verified:
          type: boolean
          description: Human verified match
        verified_by:
          type: string
          description: Verifier name or system
          maxLength: 200
        verified_at:
          type: string
          format: date-time
          nullable: true
          description: Verification timestamp
        notes:
          type: string
          description: Additional context or notes
        created_at:
          type: string
          format: date-time
          description: Record creation timestamp
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Record last update timestamp
      required:
      - asset
      - asset_id
      - asset_name
      - company_id
      - country_iso3
      - id
      - legal_entity_lei
      - legal_entity_name
      - matching_confidence
      - sector_name
      - updated_at
    CompanyAssetMatchRelationshipTypeEnum:
      enum:
      - owned
      - operated
      - subsidiary
      - supplier
      - joint_venture
      type: string
      description: '* `owned` - Owned

        * `operated` - Operated

        * `subsidiary` - Subsidiary

        * `supplier` - Supplier

        * `joint_venture` - Joint Venture'
    Country:
      type: object
      description: 'Serializer for Climate TRACE countries.


        Requires ViewSet to annotate: assets_count'
      properties:
        id:
          type: integer
          readOnly: true
        iso3:
          type: string
          description: ISO 3166-1 alpha-3 country code
          maxLength: 3
        name:
          type: string
          description: Country name
          maxLength: 200
        region:
          type: string
          description: Geographic region
          maxLength: 100
        income_group:
          type: string
          description: World Bank income group
          maxLength: 100
        total_assets_count:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Total number of tracked assets in country
        assets_count:
          type: integer
          readOnly: true
        last_updated:
          type: string
          format: date-time
          description: Timestamp of last data update from Climate TRACE
      required:
      - assets_count
      - id
      - iso3
      - name
    CountryTotal:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        country_code:
          type: string
          description: ISO 3166-1 alpha-3 country code
          maxLength: 3
        year:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Reporting year for emissions
        gas_type:
          type: string
          description: Actual gas type (CO2, CH4, N2O, GWP_100_AR5_GHG, etc.)
          maxLength: 50
        sector:
          type: string
          description: EDGAR economic sector classification code
          maxLength: 120
        value:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
          description: Emission value in tonnes for the given gas and sector
        source_version:
          type: string
          description: EDGAR release version identifier (e.g., v8.0_FT2022)
          maxLength: 50
        ingested_at:
          type: string
          format: date-time
          description: Timestamp when record was ingested into the platform
        provisional:
          type: boolean
          description: Whether this emission value is a provisional (fast-track) estimate
      required:
      - country_code
      - gas_type
      - id
      - sector
      - source_version
      - value
      - year
    DataSource:
      type: object
      description: Serializer for data source registry.
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          description: Machine-readable source identifier (e.g., openaq, climatetrace, edgar)
          maxLength: 50
        display_name:
          type: string
          description: Human-friendly source name for display
          maxLength: 100
        description:
          type: string
          description: Description of the data source and its contents
        base_url:
          type: string
          format: uri
          description: Base API URL for the data source
          maxLength: 200
        is_active:
          type: boolean
          description: Whether this data source is enabled for ingestion
        default_config:
          description: Default ingestion configuration JSON for this source
        rate_limit_config:
          description: Rate limiting configuration (requests/sec, burst limits)
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: Record creation timestamp
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Record last update timestamp
      required:
      - created_at
      - display_name
      - id
      - name
      - updated_at
    DataSourceRequest:
      type: object
      description: Serializer for data source registry.
      properties:
        name:
          type: string
          minLength: 1
          description: Machine-readable source identifier (e.g., openaq, climatetrace, edgar)
          maxLength: 50
        display_name:
          type: string
          minLength: 1
          description: Human-friendly source name for display
          maxLength: 100
        description:
          type: string
          description: Description of the data source and its contents
        base_url:
          type: string
          format: uri
          description: Base API URL for the data source
          maxLength: 200
        is_active:
          type: boolean
          description: Whether this data source is enabled for ingestion
        default_config:
          description: Default ingestion configuration JSON for this source
        rate_limit_config:
          description: Rate limiting configuration (requests/sec, burst limits)
      required:
      - display_name
      - name
    Dataset:
      type: object
      description: Serializer for Dataset model.
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          description: Dataset name
          maxLength: 255
        dataset_type:
          allOf:
          - $ref: '#/components/schemas/DatasetTypeEnum'
          description: 'Type of dataset


            * `facility_monitoring` - Facility Environmental Monitoring

            * `regional_air_quality` - Regional Air Quality Study

            * `industrial_corridor` - Industrial Corridor Analysis

            * `community_health` - Community Health Impact Study

            * `esg_compliance` - ESG Compliance Monitoring'
        description:
          type: string
          description: Dataset description and purpose
        geographic_scope:
          description: Geographic boundaries (countries, states, bounding boxes, facility locations)
        parameter_filters:
          description: Environmental parameters to monitor (pm25, no2, o3, etc.)
        temporal_scope:
          description: Time range and frequency requirements
        data_owner:
          type: string
          description: Who owns/manages this dataset
          maxLength: 255
        is_active:
          type: boolean
          description: Whether dataset is actively maintained
        job_count:
          type: integer
          description: Get number of ingestion jobs for this dataset.
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: Record creation timestamp
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Record last update timestamp
      required:
      - created_at
      - data_owner
      - dataset_type
      - description
      - id
      - job_count
      - name
      - updated_at
    DatasetCreate:
      type: object
      description: Serializer for creating Dataset.
      properties:
        name:
          type: string
          description: Dataset name
          maxLength: 255
        dataset_type:
          allOf:
          - $ref: '#/components/schemas/DatasetTypeEnum'
          description: 'Type of dataset


            * `facility_monitoring` - Facility Environmental Monitoring

            * `regional_air_quality` - Regional Air Quality Study

            * `industrial_corridor` - Industrial Corridor Analysis

            * `community_health` - Community Health Impact Study

            * `esg_compliance` - ESG Compliance Monitoring'
        description:
          type: string
          description: Dataset description and purpose
        geographic_scope:
          description: Geographic boundaries (countries, states, bounding boxes, facility locations)
        parameter_filters:
          description: Environmental parameters to monitor (pm25, no2, o3, etc.)
        temporal_scope:
          description: Time range and frequency requirements
        data_owner:
          type: string
          description: Who owns/manages this dataset
          maxLength: 255
        is_active:
          type: boolean
          description: Whether dataset is actively maintained
      required:
      - data_owner
      - dataset_type
      - description
      - name
    DatasetCreateRequest:
      type: object
      description: Serializer for creating Dataset.
      properties:
        name:
          type: string
          minLength: 1
          description: Dataset name
          maxLength: 255
        dataset_type:
          allOf:
          - $ref: '#/components/schemas/DatasetTypeEnum'
          description: 'Type of dataset


            * `facility_monitoring` - Facility Environmental Monitoring

            * `regional_air_quality` - Regional Air Quality Study

            * `industrial_corridor` - Industrial Corridor Analysis

            * `community_health` - Community Health Impact Study

            * `esg_compliance` - ESG Compliance Monitoring'
        description:
          type: string
          minLength: 1
          description: Dataset description and purpose
        geographic_scope:
          description: Geographic boundaries (countries, states, bounding boxes, facility locations)
        parameter_filters:
          description: Environmental parameters to monitor (pm25, no2, o3, etc.)
        temporal_scope:
          description: Time range and frequency requirements
        data_owner:
          type: string
          minLength: 1
          description: Who owns/manages this dataset
          maxLength: 255
        is_active:
          type: boolean
          description: Whether dataset is actively maintained
      required:
      - data_owner
      - dataset_type
      - description
      - name
    DatasetSummary:
      type: object
      description: Lightweight serializer for Dataset model (for lists).
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          description: Dataset name
          maxLength: 255
        dataset_type:
          allOf:
          - $ref: '#/components/schemas/DatasetTypeEnum'
          description: 'Type of dataset


            * `facility_monitoring` - Facility Environmental Monitoring

            * `regional_air_quality` - Regional Air Quality Study

            * `industrial_corridor` - Industrial Corridor Analysis

            * `community_health` - Community Health Impact Study

            * `esg_compliance` - ESG Compliance Monitoring'
        data_owner:
          type: string
          description: Who owns/manages this dataset
          maxLength: 255
        is_active:
          type: boolean
          description: Whether dataset is actively maintained
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Record last update timestamp
      required:
      - data_owner
      - dataset_type
      - id
      - name
      - updated_at
    DatasetTypeEnum:
      enum:
      - facility_monitoring
      - regional_air_quality
      - industrial_corridor
      - community_health
      - esg_compliance
      type: string
      description: '* `facility_monitoring` - Facility Environmental Monitoring

        * `regional_air_quality` - Regional Air Quality Study

        * `industrial_corridor` - Industrial Corridor Analysis

        * `community_health` - Community Health Impact Study

        * `esg_compliance` - ESG Compliance Monitoring'
    Emission:
      type: object
      description: Serializer for Climate TRACE emissions.
      properties:
        id:
          type: integer
          readOnly: true
        climatetrace_id:
          type: string
          description: Climate TRACE emission ID
          maxLength: 200
        asset:
          type: integer
          description: Associated emitting asset
        asset_name:
          type: string
          readOnly: true
        asset_owner:
          type: string
          readOnly: true
        climatetrace_asset_id:
          type: string
          description: Asset ID (denormalized for performance)
          maxLength: 200
        sector_name:
          type: string
          description: Sector name (denormalized for performance)
          maxLength: 200
        country_iso3:
          type: string
          description: Country code (denormalized for performance)
          maxLength: 3
        temporal_granularity:
          allOf:
          - $ref: '#/components/schemas/TemporalGranularityEnum'
          default: monthly
          description: 'Time period granularity


            * `monthly` - Monthly

            * `annual` - Annual'
        start_time:
          type: string
          format: date-time
          description: Emission period start time
        end_time:
          type: string
          format: date-time
          nullable: true
          description: Emission period end time
        gas:
          type: string
          description: Gas type
          maxLength: 10
        co2_tonnes:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,6})?$
          nullable: true
          description: CO2 emissions in tonnes
        ch4_tonnes:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,6})?$
          nullable: true
          description: CH4 emissions in tonnes
        n2o_tonnes:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,6})?$
          nullable: true
          description: N2O emissions in tonnes
        co2e_tonnes:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,6})?$
          description: CO2 equivalent emissions in tonnes
        total_ghg_tonnes:
          type: string
          readOnly: true
        emissions_factor:
          type: string
          format: decimal
          pattern: ^-?\d{0,9}(?:\.\d{0,6})?$
          nullable: true
          description: Emission factor used in calculation
        emissions_factor_unit:
          type: string
          description: Emission factor unit
          maxLength: 100
        activity_data:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,6})?$
          nullable: true
          description: Activity data used in calculation
        activity_data_unit:
          type: string
          description: Activity data unit
          maxLength: 100
        uncertainty_lower:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,6})?$
          nullable: true
          description: Lower bound of uncertainty range
        uncertainty_upper:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,6})?$
          nullable: true
          description: Upper bound of uncertainty range
        uncertainty_range:
          type: string
          readOnly: true
        data_quality_score:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,2})?$
          nullable: true
          description: Data quality score (0-1)
        ingested_at:
          type: string
          format: date-time
          description: Timestamp when record was ingested into the platform
      required:
      - asset
      - asset_name
      - asset_owner
      - climatetrace_asset_id
      - climatetrace_id
      - co2e_tonnes
      - country_iso3
      - id
      - sector_name
      - start_time
      - total_ghg_tonnes
      - uncertainty_range
    EmissionViolation:
      type: object
      description: Serializer for emission violations.
      properties:
        id:
          type: integer
          readOnly: true
        asset:
          type: integer
          description: Asset with violation
        asset_name:
          type: string
          readOnly: true
        asset_owner:
          type: string
          readOnly: true
        company_id:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          nullable: true
          description: Associated company ID if matched
        violation_type:
          allOf:
          - $ref: '#/components/schemas/ViolationTypeEnum'
          description: 'Type of emission violation


            * `threshold_exceeded` - Emission Threshold Exceeded

            * `trend_increase` - Significant Trend Increase

            * `sector_outlier` - Sector Emission Outlier

            * `regulatory_limit` - Regulatory Limit Exceeded'
        gas_type:
          allOf:
          - $ref: '#/components/schemas/GasTypeEnum'
          description: 'Gas type involved in violation


            * `co2` - CO2

            * `ch4` - CH4

            * `n2o` - N2O

            * `co2e` - CO2 Equivalent'
        threshold_value:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,3})?$
          nullable: true
          description: Threshold or expected value
        actual_value:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,3})?$
          description: Actual emission value that triggered violation
        violation_severity:
          allOf:
          - $ref: '#/components/schemas/ViolationSeverityEnum'
          description: 'Severity level of the violation


            * `low` - Low

            * `medium` - Medium

            * `high` - High

            * `critical` - Critical'
        detection_date:
          type: string
          format: date-time
          description: When violation was detected
        period_start:
          type: string
          format: date-time
          description: Start of emission period with violation
        period_end:
          type: string
          format: date-time
          description: End of emission period with violation
        description:
          type: string
          description: Detailed violation description
        resolved:
          type: boolean
          description: Whether violation has been resolved
        resolved_at:
          type: string
          format: date-time
          nullable: true
          description: Resolution timestamp
        resolution_notes:
          type: string
          description: Resolution details
      required:
      - actual_value
      - asset
      - asset_name
      - asset_owner
      - description
      - detection_date
      - id
      - period_end
      - period_start
    EntityCategoryEnum:
      enum:
      - GENERAL
      - FUND
      - BRANCH
      - SOLE_PROPRIETOR
      - RESIDENT_GOVERNMENT_ENTITY
      - INTERNATIONAL_ORGANIZATION
      type: string
      description: '* `GENERAL` - General

        * `FUND` - Fund

        * `BRANCH` - Branch

        * `SOLE_PROPRIETOR` - Sole Proprietor

        * `RESIDENT_GOVERNMENT_ENTITY` - Resident Government Entity

        * `INTERNATIONAL_ORGANIZATION` - International Organization'
    EntityRelationship:
      type: object
      description: Serializer for relationship records.
      properties:
        id:
          type: integer
          readOnly: true
        start_lei:
          type: string
          description: LEI of the child entity (start node of the relationship)
          maxLength: 20
        end_lei:
          type: string
          description: LEI of the parent entity (end node of the relationship)
          maxLength: 20
        relationship_type:
          allOf:
          - $ref: '#/components/schemas/EntityRelationshipRelationshipTypeEnum'
          description: 'Type of relationship between the two entities


            * `IS_DIRECTLY_CONSOLIDATED_BY` - Is Directly Consolidated By

            * `IS_ULTIMATELY_CONSOLIDATED_BY` - Is Ultimately Consolidated By

            * `IS_INTERNATIONAL_BRANCH_OF` - Is International Branch Of

            * `IS_FUND_MANAGED_BY` - Is Fund-Managed By

            * `IS_SUBFUND_OF` - Is Sub-Fund Of

            * `IS_FEEDER_TO` - Is Feeder To'
        relationship_status:
          allOf:
          - $ref: '#/components/schemas/RelationshipStatusEnum'
          description: 'Current status of the relationship


            * `ACTIVE` - Active

            * `INACTIVE` - Inactive'
        start_date:
          type: string
          format: date-time
          nullable: true
          description: Start date of the relationship period
        end_date:
          type: string
          format: date-time
          nullable: true
          description: End date of the relationship period (null if ongoing)
        ingested_at:
          type: string
          format: date-time
          description: Timestamp when record was ingested into the platform
      required:
      - end_lei
      - id
      - relationship_type
      - start_lei
    EntityRelationshipRelationshipTypeEnum:
      enum:
      - IS_DIRECTLY_CONSOLIDATED_BY
      - IS_ULTIMATELY_CONSOLIDATED_BY
      - IS_INTERNATIONAL_BRANCH_OF
      - IS_FUND_MANAGED_BY
      - IS_SUBFUND_OF
      - IS_FEEDER_TO
      type: string
      description: '* `IS_DIRECTLY_CONSOLIDATED_BY` - Is Directly Consolidated By

        * `IS_ULTIMATELY_CONSOLIDATED_BY` - Is Ultimately Consolidated By

        * `IS_INTERNATIONAL_BRANCH_OF` - Is International Branch Of

        * `IS_FUND_MANAGED_BY` - Is Fund-Managed By

        * `IS_SUBFUND_OF` - Is Sub-Fund Of

        * `IS_FEEDER_TO` - Is Feeder To'
    EntityStatusEnum:
      enum:
      - ACTIVE
      - INACTIVE
      type: string
      description: '* `ACTIVE` - Active

        * `INACTIVE` - Inactive'
    ExceptionCategoryEnum:
      enum:
      - DIRECT_ACCOUNTING_CONSOLIDATION_PARENT
      - ULTIMATE_ACCOUNTING_CONSOLIDATION_PARENT
      type: string
      description: '* `DIRECT_ACCOUNTING_CONSOLIDATION_PARENT` - Direct Accounting Consolidation Parent

        * `ULTIMATE_ACCOUNTING_CONSOLIDATION_PARENT` - Ultimate Accounting Consolidation Parent'
    ExceptionReasonEnum:
      enum:
      - NO_LEI
      - NO_KNOWN_PERSON
      - NON_CONSOLIDATING
      - NATURAL_PERSONS
      - NON_PUBLIC
      - BINDING_LEGAL_OBSTACLES
      - DETRIMENT_NOT_EXCLUDED
      - CONSENT_NOT_OBTAINED
      type: string
      description: '* `NO_LEI` - Parent exists but does not have an LEI

        * `NO_KNOWN_PERSON` - No known controlling person

        * `NON_CONSOLIDATING` - Not subject to consolidation

        * `NATURAL_PERSONS` - Controlled by natural person(s)

        * `NON_PUBLIC` - Non-public information

        * `BINDING_LEGAL_OBSTACLES` - Binding legal obstacles to disclosure

        * `DETRIMENT_NOT_EXCLUDED` - Detriment to entity not excluded

        * `CONSENT_NOT_OBTAINED` - Consent of parent not obtained'
    FastTrackEntry:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        country_code:
          type: string
          description: ISO 3166-1 alpha-3 country code
          maxLength: 3
        year:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Reporting year for emissions
        gas:
          type: string
          description: GHG gas type (CO2, CH4, N2O)
          maxLength: 50
        sector:
          type: string
          description: EDGAR economic sector classification code
          maxLength: 120
        value:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
          description: Provisional emission value in tonnes
        source_version:
          type: string
          description: EDGAR release version identifier
          maxLength: 50
        ingested_at:
          type: string
          format: date-time
          description: Timestamp when record was ingested into the platform
        provisional:
          type: boolean
          description: Always true for fast-track data
      required:
      - country_code
      - gas
      - id
      - sector
      - source_version
      - value
      - year
    GCPFossilEmissionsByFuel:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        year:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        coal_gtco2:
          type: number
          format: double
        oil_gtco2:
          type: number
          format: double
        gas_gtco2:
          type: number
          format: double
        cement_gtco2:
          type: number
          format: double
        flaring_gtco2:
          type: number
          format: double
        other_gtco2:
          type: number
          format: double
          nullable: true
        total_gtco2:
          type: number
          format: double
        budget_version:
          type: string
          maxLength: 10
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
      required:
      - budget_version
      - cement_gtco2
      - coal_gtco2
      - created_at
      - flaring_gtco2
      - gas_gtco2
      - id
      - oil_gtco2
      - total_gtco2
      - updated_at
      - year
    GCPGlobalCarbonBudget:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        year:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        fossil_emissions_gtco2:
          type: number
          format: double
          description: 'E_fos: fossil fuel + cement'
        land_use_emissions_gtco2:
          type: number
          format: double
          description: 'E_luc: land-use change'
        atmospheric_growth_gtco2:
          type: number
          format: double
          description: 'G_atm: atmospheric CO2 growth'
        ocean_sink_gtco2:
          type: number
          format: double
          description: 'S_ocean: ocean CO2 uptake'
        land_sink_gtco2:
          type: number
          format: double
          description: 'S_land: terrestrial CO2 uptake'
        budget_imbalance_gtco2:
          type: number
          format: double
          description: 'B_im: unaccounted residual'
        cement_carbonation_gtco2:
          type: number
          format: double
          nullable: true
        budget_version:
          type: string
          description: e.g. '2024'
          maxLength: 10
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
      required:
      - atmospheric_growth_gtco2
      - budget_imbalance_gtco2
      - budget_version
      - created_at
      - fossil_emissions_gtco2
      - id
      - land_sink_gtco2
      - land_use_emissions_gtco2
      - ocean_sink_gtco2
      - updated_at
      - year
    GCPMethaneBudget:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        year:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        fossil_fuels_tgch4:
          type: number
          format: double
          nullable: true
        agriculture_tgch4:
          type: number
          format: double
          nullable: true
        waste_tgch4:
          type: number
          format: double
          nullable: true
        biomass_burning_tgch4:
          type: number
          format: double
          nullable: true
        wetlands_tgch4:
          type: number
          format: double
          nullable: true
        other_natural_tgch4:
          type: number
          format: double
          nullable: true
        total_sources_tgch4:
          type: number
          format: double
        total_sinks_tgch4:
          type: number
          format: double
        atmospheric_growth_tgch4:
          type: number
          format: double
        budget_version:
          type: string
          maxLength: 10
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
      required:
      - atmospheric_growth_tgch4
      - budget_version
      - created_at
      - id
      - total_sinks_tgch4
      - total_sources_tgch4
      - updated_at
      - year
    GCPNationalEmissions:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        country_code:
          type: string
          description: ISO 3166-1 alpha-3
          maxLength: 3
        country_name:
          type: string
          maxLength: 200
        year:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        territorial_mtco2:
          type: number
          format: double
          description: Production-based emissions (MtCO2)
        consumption_mtco2:
          type: number
          format: double
          nullable: true
          description: Consumption-based
        transfer_mtco2:
          type: number
          format: double
          nullable: true
          description: Trade adjustment
        per_capita_tco2:
          type: number
          format: double
          nullable: true
        data_source_name:
          type: string
          description: CDIAC, GCP, etc.
          maxLength: 50
        budget_version:
          type: string
          maxLength: 10
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
      required:
      - budget_version
      - country_code
      - created_at
      - id
      - territorial_mtco2
      - updated_at
      - year
    GasTypeEnum:
      enum:
      - co2
      - ch4
      - n2o
      - co2e
      type: string
      description: '* `co2` - CO2

        * `ch4` - CH4

        * `n2o` - N2O

        * `co2e` - CO2 Equivalent'
    GridEmission:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        grid_id:
          type: string
          description: Grid cell identifier (lon:lat format)
          maxLength: 64
        year:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Reporting year for emissions
        gas:
          type: string
          description: GHG gas type (CO2, CH4, N2O, F-gases)
          maxLength: 50
        sector:
          type: string
          description: EDGAR economic sector classification code
          maxLength: 120
        value:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
          description: Emission value in tonnes for the grid cell
        lat:
          type: string
          format: decimal
          pattern: ^-?\d{0,4}(?:\.\d{0,6})?$
          description: Latitude in decimal degrees (synced with geometry field)
        lon:
          type: string
          format: decimal
          pattern: ^-?\d{0,4}(?:\.\d{0,6})?$
          description: Longitude in decimal degrees (synced with geometry field)
        source_version:
          type: string
          description: EDGAR release version identifier
          maxLength: 50
        ingested_at:
          type: string
          format: date-time
          description: Timestamp when record was ingested into the platform
      required:
      - gas
      - grid_id
      - id
      - lat
      - lon
      - sector
      - source_version
      - value
      - year
    JobSchedule:
      type: object
      description: Serializer for job scheduling configuration.
      properties:
        id:
          type: integer
          readOnly: true
        job:
          type: integer
          description: The job this schedule controls
        job_name:
          type: string
          readOnly: true
        cron_expression:
          type: string
          description: Cron expression defining the schedule (e.g., '0 2 * * *' for daily at 2am)
          maxLength: 100
        timezone:
          type: string
          description: IANA timezone for the cron expression
          maxLength: 50
        max_concurrent_executions:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Maximum number of concurrent executions allowed
        allow_overlapping:
          type: boolean
          description: Whether to allow a new execution if a previous one is still running
        start_date:
          type: string
          format: date-time
          nullable: true
          description: Earliest date this schedule is active (null = no start constraint)
        end_date:
          type: string
          format: date-time
          nullable: true
          description: Latest date this schedule is active (null = no end constraint)
        max_runtime_minutes:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          nullable: true
          description: Maximum runtime override for scheduled executions (minutes)
        resource_tags:
          description: Tags for worker selection and routing
        notify_on_failure:
          type: boolean
          description: Send notification when a scheduled execution fails
        notify_on_success:
          type: boolean
          description: Send notification when a scheduled execution succeeds
        notification_emails:
          description: Email addresses to notify on execution events
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: Record creation timestamp
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Record last update timestamp
      required:
      - created_at
      - cron_expression
      - id
      - job
      - job_name
      - updated_at
    JobScheduleRequest:
      type: object
      description: Serializer for job scheduling configuration.
      properties:
        job:
          type: integer
          description: The job this schedule controls
        cron_expression:
          type: string
          minLength: 1
          description: Cron expression defining the schedule (e.g., '0 2 * * *' for daily at 2am)
          maxLength: 100
        timezone:
          type: string
          minLength: 1
          description: IANA timezone for the cron expression
          maxLength: 50
        max_concurrent_executions:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Maximum number of concurrent executions allowed
        allow_overlapping:
          type: boolean
          description: Whether to allow a new execution if a previous one is still running
        start_date:
          type: string
          format: date-time
          nullable: true
          description: Earliest date this schedule is active (null = no start constraint)
        end_date:
          type: string
          format: date-time
          nullable: true
          description: Latest date this schedule is active (null = no end constraint)
        max_runtime_minutes:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          nullable: true
          description: Maximum runtime override for scheduled executions (minutes)
        resource_tags:
          description: Tags for worker selection and routing
        notify_on_failure:
          type: boolean
          description: Send notification when a scheduled execution fails
        notify_on_success:
          type: boolean
          description: Send notification when a scheduled execution succeeds
        notification_emails:
          description: Email addresses to notify on execution events
      required:
      - cron_expression
      - job
    JobTypeEnum:
      enum:
      - parameters
      - locations
      - sensors
      - measurements
      - measurements_sensor_loop
      - incremental_openaq_measurements
      - incremental_openaq_s3_bulk
      - climatetrace_assets
      - climatetrace_emissions
      - climatetrace_sectors
      - climatetrace_countries
      - assets
      - emissions
      - sectors
      - countries
      - edgar_totals
      - edgar_totals_load
      - edgar_gridmap
      - edgar_grid_load
      - edgar_air_pollutant_grid_load
      - edgar_temporal_profiles
      - edgar_temporal_profiles_load
      - edgar_fasttrack
      - edgar_fasttrack_load
      - edgar_bulk
      - edgar_bulk_ingestion
      - incremental_edgar_update
      - incremental_climatetrace_emissions
      - openaq_s3_replicator
      - openaq_s3_sync
      - openaq_db_ingest
      - bulk_ingestion
      - openaq_bulk_ingestion
      - correlations
      - platform_inventory
      - run_migrations
      - run_s3_script
      - gcp_all_load
      - noaa_storm_events_load
      type: string
      description: '* `parameters` - Parameter Definitions

        * `locations` - Location Data

        * `sensors` - Sensor Data

        * `measurements` - Measurement Data

        * `measurements_sensor_loop` - Sensor Measurement Loop

        * `incremental_openaq_measurements` - OpenAQ Incremental Measurements

        * `incremental_openaq_s3_bulk` - OpenAQ S3 Bulk Ingestion

        * `climatetrace_assets` - Climate TRACE Asset Data

        * `climatetrace_emissions` - Climate TRACE Emission Data

        * `climatetrace_sectors` - Climate TRACE Sector Data

        * `climatetrace_countries` - Climate TRACE Country Data

        * `assets` - Asset Data

        * `emissions` - Emission Data

        * `sectors` - Sector Data

        * `countries` - Country Data

        * `edgar_totals` - EDGAR National Totals

        * `edgar_totals_load` - EDGAR National Totals Load

        * `edgar_gridmap` - EDGAR Grid Emissions

        * `edgar_grid_load` - EDGAR Grid Load

        * `edgar_air_pollutant_grid_load` - EDGAR Air Pollutant Grid Load

        * `edgar_temporal_profiles` - EDGAR Temporal Profiles

        * `edgar_temporal_profiles_load` - EDGAR Temporal Profiles Load

        * `edgar_fasttrack` - EDGAR Fast Track Emissions

        * `edgar_fasttrack_load` - EDGAR Fast Track Load

        * `edgar_bulk` - EDGAR Bulk Ingestion

        * `edgar_bulk_ingestion` - EDGAR Bulk Ingestion Task

        * `incremental_edgar_update` - Incremental EDGAR Update

        * `incremental_climatetrace_emissions` - Incremental Climate TRACE Emissions

        * `openaq_s3_replicator` - OpenAQ S3 Replicator

        * `openaq_s3_sync` - OpenAQ S3 Sync

        * `openaq_db_ingest` - OpenAQ Database Ingestion

        * `bulk_ingestion` - Bulk Ingestion

        * `openaq_bulk_ingestion` - OpenAQ Bulk Ingestion

        * `correlations` - Cross-Source Correlations

        * `platform_inventory` - Platform Inventory Report

        * `run_migrations` - Run Django Migrations

        * `run_s3_script` - Run Python Script from S3

        * `gcp_all_load` - GCP Full Ingest (Global Carbon Project)

        * `noaa_storm_events_load` - NOAA Storm Events Ingest'
    LegalEntityDetail:
      type: object
      description: Full serializer for detail views.
      properties:
        id:
          type: integer
          readOnly: true
        lei:
          type: string
          description: 20-character Legal Entity Identifier (ISO 17442)
          maxLength: 20
        legal_name:
          type: string
          description: Official legal name of the entity
          maxLength: 500
        legal_name_language:
          type: string
          description: ISO 639-1 language code for the legal name
          maxLength: 10
        other_names:
          description: Alternative names [{name, language, type}]
        legal_address_lines:
          description: Legal address lines as JSON array
        legal_address_city:
          type: string
          description: Legal address city
          maxLength: 200
        legal_address_region:
          type: string
          description: Legal address region (ISO 3166-2 subdivision code)
          maxLength: 20
        legal_address_country:
          type: string
          description: Legal address country (ISO 3166-1 alpha-2)
          maxLength: 2
        legal_address_postal_code:
          type: string
          description: Legal address postal code
          maxLength: 50
        headquarters_city:
          type: string
          description: Headquarters city
          maxLength: 200
        headquarters_country:
          type: string
          description: Headquarters country (ISO 3166-1 alpha-2)
          maxLength: 2
        jurisdiction:
          type: string
          description: Jurisdiction of legal formation (ISO 3166-1/2 code)
          maxLength: 10
        entity_category:
          description: 'Entity category (GENERAL, FUND, BRANCH, etc.)


            * `GENERAL` - General

            * `FUND` - Fund

            * `BRANCH` - Branch

            * `SOLE_PROPRIETOR` - Sole Proprietor

            * `RESIDENT_GOVERNMENT_ENTITY` - Resident Government Entity

            * `INTERNATIONAL_ORGANIZATION` - International Organization'
          oneOf:
          - $ref: '#/components/schemas/EntityCategoryEnum'
          - $ref: '#/components/schemas/BlankEnum'
        entity_sub_category:
          type: string
          description: Entity sub-category (e.g., STATE_GOVERNMENT, CENTRAL_GOVERNMENT)
          maxLength: 50
        legal_form_code:
          type: string
          description: ELF (Entity Legal Form) code from GLEIF
          maxLength: 10
        legal_form_other:
          type: string
          description: Free-text legal form description when no ELF code applies
          maxLength: 200
        entity_status:
          allOf:
          - $ref: '#/components/schemas/EntityStatusEnum'
          description: 'Entity operating status (ACTIVE, INACTIVE)


            * `ACTIVE` - Active

            * `INACTIVE` - Inactive'
        entity_creation_date:
          type: string
          format: date-time
          nullable: true
          description: Date the legal entity was created/incorporated
        registration_status:
          allOf:
          - $ref: '#/components/schemas/RegistrationStatusEnum'
          description: 'LEI registration status (ISSUED, LAPSED, RETIRED, etc.)


            * `ISSUED` - Issued

            * `LAPSED` - Lapsed

            * `MERGED` - Merged

            * `RETIRED` - Retired

            * `ANNULLED` - Annulled

            * `CANCELLED` - Cancelled

            * `TRANSFERRED` - Transferred

            * `PENDING_TRANSFER` - Pending Transfer

            * `PENDING_ARCHIVAL` - Pending Archival'
        initial_registration_date:
          type: string
          format: date-time
          nullable: true
          description: When the LEI was first registered
        last_update_date:
          type: string
          format: date-time
          nullable: true
          description: When the LEI record was last updated by the managing LOU
        next_renewal_date:
          type: string
          format: date-time
          nullable: true
          description: When the LEI registration is next due for renewal
        managing_lou:
          type: string
          description: LEI of the Local Operating Unit managing this registration
          maxLength: 20
        bic:
          type: string
          nullable: true
          description: Business Identifier Code (SWIFT/BIC) if mapped
          maxLength: 20
        registered_as:
          type: string
          description: Entity identifier in local business registry
          maxLength: 200
        successor_lei:
          type: string
          nullable: true
          description: LEI of successor entity (for INACTIVE entities that merged/were acquired)
          maxLength: 20
        ingested_at:
          type: string
          format: date-time
          description: Timestamp when record was ingested into the platform
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Record last update timestamp
      required:
      - id
      - legal_name
      - lei
      - updated_at
    LegalEntityList:
      type: object
      description: Compact serializer for list views.
      properties:
        id:
          type: integer
          readOnly: true
        lei:
          type: string
          description: 20-character Legal Entity Identifier (ISO 17442)
          maxLength: 20
        legal_name:
          type: string
          description: Official legal name of the entity
          maxLength: 500
        legal_address_country:
          type: string
          description: Legal address country (ISO 3166-1 alpha-2)
          maxLength: 2
        headquarters_country:
          type: string
          description: Headquarters country (ISO 3166-1 alpha-2)
          maxLength: 2
        jurisdiction:
          type: string
          description: Jurisdiction of legal formation (ISO 3166-1/2 code)
          maxLength: 10
        entity_category:
          description: 'Entity category (GENERAL, FUND, BRANCH, etc.)


            * `GENERAL` - General

            * `FUND` - Fund

            * `BRANCH` - Branch

            * `SOLE_PROPRIETOR` - Sole Proprietor

            * `RESIDENT_GOVERNMENT_ENTITY` - Resident Government Entity

            * `INTERNATIONAL_ORGANIZATION` - International Organization'
          oneOf:
          - $ref: '#/components/schemas/EntityCategoryEnum'
          - $ref: '#/components/schemas/BlankEnum'
        entity_status:
          allOf:
          - $ref: '#/components/schemas/EntityStatusEnum'
          description: 'Entity operating status (ACTIVE, INACTIVE)


            * `ACTIVE` - Active

            * `INACTIVE` - Inactive'
        registration_status:
          allOf:
          - $ref: '#/components/schemas/RegistrationStatusEnum'
          description: 'LEI registration status (ISSUED, LAPSED, RETIRED, etc.)


            * `ISSUED` - Issued

            * `LAPSED` - Lapsed

            * `MERGED` - Merged

            * `RETIRED` - Retired

            * `ANNULLED` - Annulled

            * `CANCELLED` - Cancelled

            * `TRANSFERRED` - Transferred

            * `PENDING_TRANSFER` - Pending Transfer

            * `PENDING_ARCHIVAL` - Pending Archival'
      required:
      - id
      - legal_name
      - lei
    Location:
      type: object
      description: Serializer for Location model.
      properties:
        id:
          type: integer
          readOnly: true
        openaq_id:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: OpenAQ location ID
        name:
          type: string
          description: Location name
          maxLength: 255
        country_code:
          type: string
          description: ISO 3166-1 alpha-3 country code
          maxLength: 3
        coordinates:
          type: object
          additionalProperties:
            type: number
            format: double
          description: Get coordinates as GeoJSON-like structure.
          readOnly: true
        timezone:
          type: string
          description: Location timezone
          maxLength: 50
        is_mobile:
          type: boolean
          description: Is location mobile
        is_monitor:
          type: boolean
          description: Is location a monitor
        owner_name:
          type: string
          description: Data owner name
          maxLength: 255
        provider_name:
          type: string
          description: Data provider name
          maxLength: 255
        datetime_first:
          type: string
          format: date-time
          nullable: true
          description: First measurement timestamp
        datetime_last:
          type: string
          format: date-time
          nullable: true
          description: Last measurement timestamp
        sensor_count:
          type: integer
          readOnly: true
        ingested_at:
          type: string
          format: date-time
          readOnly: true
          description: When location was ingested
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Last update timestamp
      required:
      - coordinates
      - country_code
      - id
      - ingested_at
      - openaq_id
      - sensor_count
      - updated_at
    LocationSummary:
      type: object
      description: Lightweight serializer for Location model (for lists).
      properties:
        id:
          type: integer
          readOnly: true
        openaq_id:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: OpenAQ location ID
        name:
          type: string
          description: Location name
          maxLength: 255
        country_code:
          type: string
          description: ISO 3166-1 alpha-3 country code
          maxLength: 3
        coordinates:
          type: object
          additionalProperties:
            type: number
            format: double
          description: Get coordinates as GeoJSON-like structure.
          readOnly: true
        is_monitor:
          type: boolean
          description: Is location a monitor
        owner_name:
          type: string
          description: Data owner name
          maxLength: 255
        datetime_last:
          type: string
          format: date-time
          nullable: true
          description: Last measurement timestamp
      required:
      - coordinates
      - country_code
      - id
      - openaq_id
    MatchingMethodEnum:
      enum:
      - exact_name
      - fuzzy_name
      - spatial
      - subsidiary
      - manual
      type: string
      description: '* `exact_name` - Exact Name Match

        * `fuzzy_name` - Fuzzy Name Match

        * `spatial` - Spatial Proximity Match

        * `subsidiary` - Subsidiary Relationship Match

        * `manual` - Manual Verification'
    Measurement:
      type: object
      description: Serializer for Measurement model.
      properties:
        id:
          type: integer
          readOnly: true
        sensor:
          type: integer
          description: Associated sensor
        sensor_id:
          type: integer
          readOnly: true
        location:
          type: integer
          description: Associated location (denormalized for query performance)
        location_name:
          type: string
          readOnly: true
        parameter_name:
          type: string
          description: Parameter name (denormalized)
          maxLength: 50
        value:
          type: string
          format: decimal
          pattern: ^-?\d{0,9}(?:\.\d{0,6})?$
          description: Measurement value
        unit:
          type: string
          description: Measurement unit
          maxLength: 20
        coordinates:
          type: object
          additionalProperties:
            type: number
            format: double
          description: Get coordinates if available.
          readOnly: true
        measured_at:
          type: string
          format: date-time
          description: When measurement was taken
        period_label:
          type: string
          description: Measurement period label
          maxLength: 20
        period_interval:
          type: string
          description: Measurement interval
          maxLength: 20
        flag:
          type: string
          description: Quality flag
          maxLength: 50
        flag_description:
          type: string
          description: Quality flag description
        ingested_at:
          type: string
          format: date-time
          readOnly: true
          description: Timestamp when record was ingested into the platform
      required:
      - coordinates
      - id
      - ingested_at
      - location
      - location_name
      - measured_at
      - parameter_name
      - sensor
      - sensor_id
      - unit
      - value
    MeasurementSummary:
      type: object
      description: Lightweight serializer for Measurement model (for lists).
      properties:
        id:
          type: integer
          readOnly: true
        parameter_name:
          type: string
          description: Parameter name (denormalized)
          maxLength: 50
        value:
          type: string
          format: decimal
          pattern: ^-?\d{0,9}(?:\.\d{0,6})?$
          description: Measurement value
        unit:
          type: string
          description: Measurement unit
          maxLength: 20
        measured_at:
          type: string
          format: date-time
          description: When measurement was taken
      required:
      - id
      - measured_at
      - parameter_name
      - unit
      - value
    NOAAStormEvent:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        total_injuries:
          type: string
          readOnly: true
        total_deaths:
          type: string
          readOnly: true
        latitude:
          type: string
          format: decimal
          pattern: ^-?\d{0,4}(?:\.\d{0,6})?$
          nullable: true
          description: Latitude in decimal degrees
        longitude:
          type: string
          format: decimal
          pattern: ^-?\d{0,4}(?:\.\d{0,6})?$
          nullable: true
          description: Longitude in decimal degrees
        geometry:
          type: string
          nullable: true
          description: PostGIS Point geometry (lon, lat)
        event_id:
          type: string
          maxLength: 20
        episode_id:
          type: string
          maxLength: 20
        event_type:
          type: string
          maxLength: 100
        state:
          type: string
          maxLength: 100
        state_fips:
          type: string
          maxLength: 10
        cz_type:
          type: string
          description: C=County, Z=Zone, M=Marine
          maxLength: 1
        cz_fips:
          type: string
          maxLength: 10
        cz_name:
          type: string
          maxLength: 200
        begin_date:
          type: string
          format: date-time
        end_date:
          type: string
          format: date-time
          nullable: true
        injuries_direct:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        injuries_indirect:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        deaths_direct:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        deaths_indirect:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        damage_property:
          type: number
          format: double
          nullable: true
          description: Property damage in USD
        damage_crops:
          type: number
          format: double
          nullable: true
          description: Crop damage in USD
        source:
          type: string
          maxLength: 200
        magnitude:
          type: number
          format: double
          nullable: true
        magnitude_type:
          type: string
          description: EG, ES, MS, MG
          maxLength: 10
        tor_f_scale:
          type: string
          description: Tornado F/EF scale
          maxLength: 10
        year:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        month:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
      required:
      - begin_date
      - created_at
      - event_id
      - event_type
      - id
      - month
      - total_deaths
      - total_injuries
      - updated_at
      - year
    PaginatedAirPollutantGridList:
      type: object
      required:
      - results
      properties:
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cD00ODY%3D"
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3
        results:
          type: array
          items:
            $ref: '#/components/schemas/AirPollutantGrid'
    PaginatedAirPollutantTotalList:
      type: object
      required:
      - results
      properties:
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cD00ODY%3D"
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3
        results:
          type: array
          items:
            $ref: '#/components/schemas/AirPollutantTotal'
    PaginatedAnnualCountryEmissionList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/AnnualCountryEmission'
    PaginatedAssetList:
      type: object
      required:
      - results
      properties:
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cD00ODY%3D"
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3
        results:
          type: array
          items:
            $ref: '#/components/schemas/Asset'
    PaginatedCompanyAssetMatchList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/CompanyAssetMatch'
    PaginatedCountryList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Country'
    PaginatedCountryTotalList:
      type: object
      required:
      - results
      properties:
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cD00ODY%3D"
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3
        results:
          type: array
          items:
            $ref: '#/components/schemas/CountryTotal'
    PaginatedDataSourceList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/DataSource'
    PaginatedDatasetSummaryList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/DatasetSummary'
    PaginatedEmissionList:
      type: object
      required:
      - results
      properties:
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cD00ODY%3D"
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3
        results:
          type: array
          items:
            $ref: '#/components/schemas/Emission'
    PaginatedEmissionViolationList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/EmissionViolation'
    PaginatedEntityRelationshipList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/EntityRelationship'
    PaginatedFastTrackEntryList:
      type: object
      required:
      - results
      properties:
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cD00ODY%3D"
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3
        results:
          type: array
          items:
            $ref: '#/components/schemas/FastTrackEntry'
    PaginatedGCPFossilEmissionsByFuelList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/GCPFossilEmissionsByFuel'
    PaginatedGCPGlobalCarbonBudgetList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/GCPGlobalCarbonBudget'
    PaginatedGCPMethaneBudgetList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/GCPMethaneBudget'
    PaginatedGCPNationalEmissionsList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/GCPNationalEmissions'
    PaginatedGridEmissionList:
      type: object
      required:
      - results
      properties:
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cD00ODY%3D"
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3
        results:
          type: array
          items:
            $ref: '#/components/schemas/GridEmission'
    PaginatedJobScheduleList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/JobSchedule'
    PaginatedLegalEntityListList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/LegalEntityList'
    PaginatedLocationSummaryList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/LocationSummary'
    PaginatedMeasurementSummaryList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/MeasurementSummary'
    PaginatedNOAAStormEventList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/NOAAStormEvent'
    PaginatedParameterList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Parameter'
    PaginatedReportingExceptionList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/ReportingException'
    PaginatedSectorList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Sector'
    PaginatedSensorList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Sensor'
    PaginatedTemporalProfileList:
      type: object
      required:
      - results
      properties:
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cD00ODY%3D"
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3
        results:
          type: array
          items:
            $ref: '#/components/schemas/TemporalProfile'
    PaginatedUnifiedIngestionJobList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/UnifiedIngestionJob'
    PaginatedUnifiedJobExecutionListList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/UnifiedJobExecutionList'
    Parameter:
      type: object
      description: Serializer for Parameter model.
      properties:
        id:
          type: integer
          readOnly: true
        openaq_id:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: OpenAQ parameter ID
        name:
          type: string
          description: Parameter name (e.g., pm25, no2)
          maxLength: 50
        display_name:
          type: string
          description: Human readable parameter name
          maxLength: 100
        description:
          type: string
          description: Parameter description
        units:
          type: string
          description: Measurement units
          maxLength: 20
        preferred_unit:
          type: string
          description: Preferred display unit
          maxLength: 20
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: Record creation timestamp
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Record last update timestamp
      required:
      - created_at
      - display_name
      - id
      - name
      - openaq_id
      - preferred_unit
      - units
      - updated_at
    PatchedDataSourceRequest:
      type: object
      description: Serializer for data source registry.
      properties:
        name:
          type: string
          minLength: 1
          description: Machine-readable source identifier (e.g., openaq, climatetrace, edgar)
          maxLength: 50
        display_name:
          type: string
          minLength: 1
          description: Human-friendly source name for display
          maxLength: 100
        description:
          type: string
          description: Description of the data source and its contents
        base_url:
          type: string
          format: uri
          description: Base API URL for the data source
          maxLength: 200
        is_active:
          type: boolean
          description: Whether this data source is enabled for ingestion
        default_config:
          description: Default ingestion configuration JSON for this source
        rate_limit_config:
          description: Rate limiting configuration (requests/sec, burst limits)
    PatchedDatasetCreateRequest:
      type: object
      description: Serializer for creating Dataset.
      properties:
        name:
          type: string
          minLength: 1
          description: Dataset name
          maxLength: 255
        dataset_type:
          allOf:
          - $ref: '#/components/schemas/DatasetTypeEnum'
          description: 'Type of dataset


            * `facility_monitoring` - Facility Environmental Monitoring

            * `regional_air_quality` - Regional Air Quality Study

            * `industrial_corridor` - Industrial Corridor Analysis

            * `community_health` - Community Health Impact Study

            * `esg_compliance` - ESG Compliance Monitoring'
        description:
          type: string
          minLength: 1
          description: Dataset description and purpose
        geographic_scope:
          description: Geographic boundaries (countries, states, bounding boxes, facility locations)
        parameter_filters:
          description: Environmental parameters to monitor (pm25, no2, o3, etc.)
        temporal_scope:
          description: Time range and frequency requirements
        data_owner:
          type: string
          minLength: 1
          description: Who owns/manages this dataset
          maxLength: 255
        is_active:
          type: boolean
          description: Whether dataset is actively maintained
    PatchedJobScheduleRequest:
      type: object
      description: Serializer for job scheduling configuration.
      properties:
        job:
          type: integer
          description: The job this schedule controls
        cron_expression:
          type: string
          minLength: 1
          description: Cron expression defining the schedule (e.g., '0 2 * * *' for daily at 2am)
          maxLength: 100
        timezone:
          type: string
          minLength: 1
          description: IANA timezone for the cron expression
          maxLength: 50
        max_concurrent_executions:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Maximum number of concurrent executions allowed
        allow_overlapping:
          type: boolean
          description: Whether to allow a new execution if a previous one is still running
        start_date:
          type: string
          format: date-time
          nullable: true
          description: Earliest date this schedule is active (null = no start constraint)
        end_date:
          type: string
          format: date-time
          nullable: true
          description: Latest date this schedule is active (null = no end constraint)
        max_runtime_minutes:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          nullable: true
          description: Maximum runtime override for scheduled executions (minutes)
        resource_tags:
          description: Tags for worker selection and routing
        notify_on_failure:
          type: boolean
          description: Send notification when a scheduled execution fails
        notify_on_success:
          type: boolean
          description: Send notification when a scheduled execution succeeds
        notification_emails:
          description: Email addresses to notify on execution events
    PatchedUnifiedIngestionJobRequest:
      type: object
      description: Serializer for unified ingestion jobs.
      properties:
        name:
          type: string
          minLength: 1
          description: Human-readable job name
          maxLength: 200
        description:
          type: string
          description: Description of what this job does
        data_source:
          type: integer
          description: Data source this job ingests from
        job_type:
          allOf:
          - $ref: '#/components/schemas/JobTypeEnum'
          description: 'Type of ingestion job (determines which Celery task runs)


            * `parameters` - Parameter Definitions

            * `locations` - Location Data

            * `sensors` - Sensor Data

            * `measurements` - Measurement Data

            * `measurements_sensor_loop` - Sensor Measurement Loop

            * `incremental_openaq_measurements` - OpenAQ Incremental Measurements

            * `incremental_openaq_s3_bulk` - OpenAQ S3 Bulk Ingestion

            * `climatetrace_assets` - Climate TRACE Asset Data

            * `climatetrace_emissions` - Climate TRACE Emission Data

            * `climatetrace_sectors` - Climate TRACE Sector Data

            * `climatetrace_countries` - Climate TRACE Country Data

            * `assets` - Asset Data

            * `emissions` - Emission Data

            * `sectors` - Sector Data

            * `countries` - Country Data

            * `edgar_totals` - EDGAR National Totals

            * `edgar_totals_load` - EDGAR National Totals Load

            * `edgar_gridmap` - EDGAR Grid Emissions

            * `edgar_grid_load` - EDGAR Grid Load

            * `edgar_air_pollutant_grid_load` - EDGAR Air Pollutant Grid Load

            * `edgar_temporal_profiles` - EDGAR Temporal Profiles

            * `edgar_temporal_profiles_load` - EDGAR Temporal Profiles Load

            * `edgar_fasttrack` - EDGAR Fast Track Emissions

            * `edgar_fasttrack_load` - EDGAR Fast Track Load

            * `edgar_bulk` - EDGAR Bulk Ingestion

            * `edgar_bulk_ingestion` - EDGAR Bulk Ingestion Task

            * `incremental_edgar_update` - Incremental EDGAR Update

            * `incremental_climatetrace_emissions` - Incremental Climate TRACE Emissions

            * `openaq_s3_replicator` - OpenAQ S3 Replicator

            * `openaq_s3_sync` - OpenAQ S3 Sync

            * `openaq_db_ingest` - OpenAQ Database Ingestion

            * `bulk_ingestion` - Bulk Ingestion

            * `openaq_bulk_ingestion` - OpenAQ Bulk Ingestion

            * `correlations` - Cross-Source Correlations

            * `platform_inventory` - Platform Inventory Report

            * `run_migrations` - Run Django Migrations

            * `run_s3_script` - Run Python Script from S3

            * `gcp_all_load` - GCP Full Ingest (Global Carbon Project)

            * `noaa_storm_events_load` - NOAA Storm Events Ingest'
        priority:
          allOf:
          - $ref: '#/components/schemas/PriorityEnum'
          description: 'Job priority (low, normal, high, urgent)


            * `low` - Low

            * `normal` - Normal

            * `high` - High

            * `urgent` - Urgent'
        configuration:
          description: Job-specific configuration JSON (params passed to the Celery task)
        schedule:
          type: string
          description: Cron expression for scheduled runs
          maxLength: 100
        is_scheduled:
          type: boolean
          description: Whether this job runs on a schedule
        next_run:
          type: string
          format: date-time
          nullable: true
          description: Next scheduled execution time
        is_active:
          type: boolean
          description: Whether this job is enabled
        is_paused:
          type: boolean
          description: Whether this job is temporarily paused
        max_retries:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Maximum number of automatic retries on failure
        timeout_minutes:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Maximum runtime in minutes before the job is timed out
        created_by:
          type: string
          description: User or service that created this job
          maxLength: 100
    PriorityEnum:
      enum:
      - low
      - normal
      - high
      - urgent
      type: string
      description: '* `low` - Low

        * `normal` - Normal

        * `high` - High

        * `urgent` - Urgent'
    RegistrationStatusEnum:
      enum:
      - ISSUED
      - LAPSED
      - MERGED
      - RETIRED
      - ANNULLED
      - CANCELLED
      - TRANSFERRED
      - PENDING_TRANSFER
      - PENDING_ARCHIVAL
      type: string
      description: '* `ISSUED` - Issued

        * `LAPSED` - Lapsed

        * `MERGED` - Merged

        * `RETIRED` - Retired

        * `ANNULLED` - Annulled

        * `CANCELLED` - Cancelled

        * `TRANSFERRED` - Transferred

        * `PENDING_TRANSFER` - Pending Transfer

        * `PENDING_ARCHIVAL` - Pending Archival'
    RelationshipStatusEnum:
      enum:
      - ACTIVE
      - INACTIVE
      type: string
      description: '* `ACTIVE` - Active

        * `INACTIVE` - Inactive'
    ReportingException:
      type: object
      description: Serializer for reporting exceptions.
      properties:
        id:
          type: integer
          readOnly: true
        lei:
          type: string
          description: LEI of the entity reporting the exception
          maxLength: 20
        exception_category:
          allOf:
          - $ref: '#/components/schemas/ExceptionCategoryEnum'
          description: 'Which parent relationship the exception applies to


            * `DIRECT_ACCOUNTING_CONSOLIDATION_PARENT` - Direct Accounting Consolidation Parent

            * `ULTIMATE_ACCOUNTING_CONSOLIDATION_PARENT` - Ultimate Accounting Consolidation Parent'
        exception_reason:
          allOf:
          - $ref: '#/components/schemas/ExceptionReasonEnum'
          description: 'Reason the parent relationship cannot be reported


            * `NO_LEI` - Parent exists but does not have an LEI

            * `NO_KNOWN_PERSON` - No known controlling person

            * `NON_CONSOLIDATING` - Not subject to consolidation

            * `NATURAL_PERSONS` - Controlled by natural person(s)

            * `NON_PUBLIC` - Non-public information

            * `BINDING_LEGAL_OBSTACLES` - Binding legal obstacles to disclosure

            * `DETRIMENT_NOT_EXCLUDED` - Detriment to entity not excluded

            * `CONSENT_NOT_OBTAINED` - Consent of parent not obtained'
        ingested_at:
          type: string
          format: date-time
          description: Timestamp when record was ingested into the platform
      required:
      - exception_category
      - exception_reason
      - id
      - lei
    Sector:
      type: object
      description: 'Serializer for Climate TRACE sectors.


        Requires ViewSet to annotate: subsectors_count, assets_count'
      properties:
        id:
          type: integer
          readOnly: true
        climatetrace_id:
          type: string
          description: Climate TRACE sector ID
          maxLength: 100
        name:
          type: string
          description: Sector name
          maxLength: 200
        display_name:
          type: string
          description: Human readable sector name
          maxLength: 200
        description:
          type: string
          description: Sector description
        parent_sector:
          type: integer
          nullable: true
          description: Parent sector for hierarchical organization
        methodology_version:
          type: string
          description: Emission calculation methodology version
          maxLength: 50
        emission_factors:
          description: Emission factors by gas type
        subsectors_count:
          type: integer
          readOnly: true
        assets_count:
          type: integer
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: Record creation timestamp
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Record last update timestamp
      required:
      - assets_count
      - climatetrace_id
      - display_name
      - id
      - name
      - subsectors_count
      - updated_at
    Sensor:
      type: object
      description: Serializer for Sensor model.
      properties:
        id:
          type: integer
          readOnly: true
        openaq_id:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: OpenAQ sensor ID
        location:
          type: string
          readOnly: true
        location_name:
          type: string
          readOnly: true
        parameter:
          type: string
          readOnly: true
        parameter_name:
          type: string
          readOnly: true
        parameter_display:
          type: string
          readOnly: true
        parameter_units:
          type: string
          readOnly: true
        datetime_first:
          type: string
          format: date-time
          nullable: true
          description: First measurement timestamp
        datetime_last:
          type: string
          format: date-time
          nullable: true
          description: Last measurement timestamp
        latest_value:
          type: string
          format: decimal
          pattern: ^-?\d{0,9}(?:\.\d{0,6})?$
          nullable: true
          description: Most recent measurement value
        latest_datetime:
          type: string
          format: date-time
          nullable: true
          description: Most recent measurement timestamp
        ingested_at:
          type: string
          format: date-time
          readOnly: true
          description: Timestamp when sensor was first ingested
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Record last update timestamp
      required:
      - id
      - ingested_at
      - location
      - location_name
      - openaq_id
      - parameter
      - parameter_display
      - parameter_name
      - parameter_units
      - updated_at
    StatusEnum:
      enum:
      - pending
      - queued
      - running
      - completed
      - failed
      - cancelled
      - timeout
      type: string
      description: '* `pending` - Pending

        * `queued` - Queued

        * `running` - Running

        * `completed` - Completed

        * `failed` - Failed

        * `cancelled` - Cancelled

        * `timeout` - Timeout'
    TemporalGranularityEnum:
      enum:
      - monthly
      - annual
      type: string
      description: '* `monthly` - Monthly

        * `annual` - Annual'
    TemporalLevelEnum:
      enum:
      - monthly
      - hourly
      type: string
      description: '* `monthly` - Monthly

        * `hourly` - Hourly'
    TemporalProfile:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        sector:
          type: string
          description: EDGAR economic sector classification code
          maxLength: 120
        temporal_level:
          allOf:
          - $ref: '#/components/schemas/TemporalLevelEnum'
          description: 'Temporal resolution level (monthly or hourly)


            * `monthly` - Monthly

            * `hourly` - Hourly'
        month:
          type: integer
          maximum: 32767
          minimum: 0
          nullable: true
          description: Month number (1-12) for monthly profiles
        hour:
          type: integer
          maximum: 32767
          minimum: 0
          nullable: true
          description: Hour of day (0-23) for hourly profiles
        factor:
          type: string
          format: decimal
          pattern: ^-?\d{0,4}(?:\.\d{0,8})?$
          description: Temporal scaling factor applied to annual emissions
        profile_version:
          type: string
          description: Version of the temporal profile dataset
          maxLength: 50
        source_version:
          type: string
          description: EDGAR release version identifier
          maxLength: 50
        ingested_at:
          type: string
          format: date-time
          description: Timestamp when record was ingested into the platform
      required:
      - factor
      - id
      - profile_version
      - sector
      - source_version
      - temporal_level
    TriggerTypeEnum:
      enum:
      - scheduled
      - manual
      - api
      - dependency
      - retry
      type: string
      description: '* `scheduled` - Scheduled

        * `manual` - Manual

        * `api` - API Triggered

        * `dependency` - Dependency Triggered

        * `retry` - Retry'
    UnifiedIngestionJob:
      type: object
      description: Serializer for unified ingestion jobs.
      properties:
        id:
          type: integer
          readOnly: true
        job_id:
          type: string
          format: uuid
          readOnly: true
          description: Unique UUID for this job definition
        name:
          type: string
          description: Human-readable job name
          maxLength: 200
        description:
          type: string
          description: Description of what this job does
        data_source:
          type: integer
          description: Data source this job ingests from
        data_source_name:
          type: string
          readOnly: true
        job_type:
          allOf:
          - $ref: '#/components/schemas/JobTypeEnum'
          description: 'Type of ingestion job (determines which Celery task runs)


            * `parameters` - Parameter Definitions

            * `locations` - Location Data

            * `sensors` - Sensor Data

            * `measurements` - Measurement Data

            * `measurements_sensor_loop` - Sensor Measurement Loop

            * `incremental_openaq_measurements` - OpenAQ Incremental Measurements

            * `incremental_openaq_s3_bulk` - OpenAQ S3 Bulk Ingestion

            * `climatetrace_assets` - Climate TRACE Asset Data

            * `climatetrace_emissions` - Climate TRACE Emission Data

            * `climatetrace_sectors` - Climate TRACE Sector Data

            * `climatetrace_countries` - Climate TRACE Country Data

            * `assets` - Asset Data

            * `emissions` - Emission Data

            * `sectors` - Sector Data

            * `countries` - Country Data

            * `edgar_totals` - EDGAR National Totals

            * `edgar_totals_load` - EDGAR National Totals Load

            * `edgar_gridmap` - EDGAR Grid Emissions

            * `edgar_grid_load` - EDGAR Grid Load

            * `edgar_air_pollutant_grid_load` - EDGAR Air Pollutant Grid Load

            * `edgar_temporal_profiles` - EDGAR Temporal Profiles

            * `edgar_temporal_profiles_load` - EDGAR Temporal Profiles Load

            * `edgar_fasttrack` - EDGAR Fast Track Emissions

            * `edgar_fasttrack_load` - EDGAR Fast Track Load

            * `edgar_bulk` - EDGAR Bulk Ingestion

            * `edgar_bulk_ingestion` - EDGAR Bulk Ingestion Task

            * `incremental_edgar_update` - Incremental EDGAR Update

            * `incremental_climatetrace_emissions` - Incremental Climate TRACE Emissions

            * `openaq_s3_replicator` - OpenAQ S3 Replicator

            * `openaq_s3_sync` - OpenAQ S3 Sync

            * `openaq_db_ingest` - OpenAQ Database Ingestion

            * `bulk_ingestion` - Bulk Ingestion

            * `openaq_bulk_ingestion` - OpenAQ Bulk Ingestion

            * `correlations` - Cross-Source Correlations

            * `platform_inventory` - Platform Inventory Report

            * `run_migrations` - Run Django Migrations

            * `run_s3_script` - Run Python Script from S3

            * `gcp_all_load` - GCP Full Ingest (Global Carbon Project)

            * `noaa_storm_events_load` - NOAA Storm Events Ingest'
        priority:
          allOf:
          - $ref: '#/components/schemas/PriorityEnum'
          description: 'Job priority (low, normal, high, urgent)


            * `low` - Low

            * `normal` - Normal

            * `high` - High

            * `urgent` - Urgent'
        configuration:
          description: Job-specific configuration JSON (params passed to the Celery task)
        schedule:
          type: string
          description: Cron expression for scheduled runs
          maxLength: 100
        is_scheduled:
          type: boolean
          description: Whether this job runs on a schedule
        next_run:
          type: string
          format: date-time
          nullable: true
          description: Next scheduled execution time
        is_active:
          type: boolean
          description: Whether this job is enabled
        is_paused:
          type: boolean
          description: Whether this job is temporarily paused
        max_retries:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Maximum number of automatic retries on failure
        timeout_minutes:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Maximum runtime in minutes before the job is timed out
        created_by:
          type: string
          description: User or service that created this job
          maxLength: 100
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: Record creation timestamp
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Record last update timestamp
        last_run_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: Timestamp of the most recent execution
        total_executions:
          type: integer
          readOnly: true
          description: Total number of times this job has been executed
        successful_executions:
          type: integer
          readOnly: true
          description: Number of successful executions
        failed_executions:
          type: integer
          readOnly: true
          description: Number of failed executions
        success_rate:
          type: string
          readOnly: true
      required:
      - created_at
      - data_source
      - data_source_name
      - failed_executions
      - id
      - job_id
      - job_type
      - last_run_at
      - name
      - success_rate
      - successful_executions
      - total_executions
      - updated_at
    UnifiedIngestionJobRequest:
      type: object
      description: Serializer for unified ingestion jobs.
      properties:
        name:
          type: string
          minLength: 1
          description: Human-readable job name
          maxLength: 200
        description:
          type: string
          description: Description of what this job does
        data_source:
          type: integer
          description: Data source this job ingests from
        job_type:
          allOf:
          - $ref: '#/components/schemas/JobTypeEnum'
          description: 'Type of ingestion job (determines which Celery task runs)


            * `parameters` - Parameter Definitions

            * `locations` - Location Data

            * `sensors` - Sensor Data

            * `measurements` - Measurement Data

            * `measurements_sensor_loop` - Sensor Measurement Loop

            * `incremental_openaq_measurements` - OpenAQ Incremental Measurements

            * `incremental_openaq_s3_bulk` - OpenAQ S3 Bulk Ingestion

            * `climatetrace_assets` - Climate TRACE Asset Data

            * `climatetrace_emissions` - Climate TRACE Emission Data

            * `climatetrace_sectors` - Climate TRACE Sector Data

            * `climatetrace_countries` - Climate TRACE Country Data

            * `assets` - Asset Data

            * `emissions` - Emission Data

            * `sectors` - Sector Data

            * `countries` - Country Data

            * `edgar_totals` - EDGAR National Totals

            * `edgar_totals_load` - EDGAR National Totals Load

            * `edgar_gridmap` - EDGAR Grid Emissions

            * `edgar_grid_load` - EDGAR Grid Load

            * `edgar_air_pollutant_grid_load` - EDGAR Air Pollutant Grid Load

            * `edgar_temporal_profiles` - EDGAR Temporal Profiles

            * `edgar_temporal_profiles_load` - EDGAR Temporal Profiles Load

            * `edgar_fasttrack` - EDGAR Fast Track Emissions

            * `edgar_fasttrack_load` - EDGAR Fast Track Load

            * `edgar_bulk` - EDGAR Bulk Ingestion

            * `edgar_bulk_ingestion` - EDGAR Bulk Ingestion Task

            * `incremental_edgar_update` - Incremental EDGAR Update

            * `incremental_climatetrace_emissions` - Incremental Climate TRACE Emissions

            * `openaq_s3_replicator` - OpenAQ S3 Replicator

            * `openaq_s3_sync` - OpenAQ S3 Sync

            * `openaq_db_ingest` - OpenAQ Database Ingestion

            * `bulk_ingestion` - Bulk Ingestion

            * `openaq_bulk_ingestion` - OpenAQ Bulk Ingestion

            * `correlations` - Cross-Source Correlations

            * `platform_inventory` - Platform Inventory Report

            * `run_migrations` - Run Django Migrations

            * `run_s3_script` - Run Python Script from S3

            * `gcp_all_load` - GCP Full Ingest (Global Carbon Project)

            * `noaa_storm_events_load` - NOAA Storm Events Ingest'
        priority:
          allOf:
          - $ref: '#/components/schemas/PriorityEnum'
          description: 'Job priority (low, normal, high, urgent)


            * `low` - Low

            * `normal` - Normal

            * `high` - High

            * `urgent` - Urgent'
        configuration:
          description: Job-specific configuration JSON (params passed to the Celery task)
        schedule:
          type: string
          description: Cron expression for scheduled runs
          maxLength: 100
        is_scheduled:
          type: boolean
          description: Whether this job runs on a schedule
        next_run:
          type: string
          format: date-time
          nullable: true
          description: Next scheduled execution time
        is_active:
          type: boolean
          description: Whether this job is enabled
        is_paused:
          type: boolean
          description: Whether this job is temporarily paused
        max_retries:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Maximum number of automatic retries on failure
        timeout_minutes:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Maximum runtime in minutes before the job is timed out
        created_by:
          type: string
          description: User or service that created this job
          maxLength: 100
      required:
      - data_source
      - job_type
      - name
    UnifiedJobExecution:
      type: object
      description: Serializer for job executions.
      properties:
        id:
          type: integer
          readOnly: true
        execution_id:
          type: string
          format: uuid
          readOnly: true
          description: Unique UUID for this execution
        job:
          type: integer
          description: The job definition this execution belongs to
        job_name:
          type: string
          readOnly: true
        data_source_name:
          type: string
          readOnly: true
        trigger_type:
          allOf:
          - $ref: '#/components/schemas/TriggerTypeEnum'
          description: 'How this execution was triggered (scheduled, manual, api, dependency, retry)


            * `scheduled` - Scheduled

            * `manual` - Manual

            * `api` - API Triggered

            * `dependency` - Dependency Triggered

            * `retry` - Retry'
        triggered_by:
          type: string
          description: User or service that triggered this execution
          maxLength: 100
        status:
          allOf:
          - $ref: '#/components/schemas/StatusEnum'
          description: 'Current execution status (pending, queued, running, completed, failed, cancelled,
            timeout)


            * `pending` - Pending

            * `queued` - Queued

            * `running` - Running

            * `completed` - Completed

            * `failed` - Failed

            * `cancelled` - Cancelled

            * `timeout` - Timeout'
        progress_percent:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Completion percentage (0-100)
        current_step:
          type: string
          description: Human-readable description of the current processing step
          maxLength: 200
        records_processed:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Total number of records processed so far
        records_successful:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Number of records successfully ingested
        records_failed:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Number of records that failed to ingest
        queued_at:
          type: string
          format: date-time
          nullable: true
          description: When the execution was placed in the Celery queue
        started_at:
          type: string
          format: date-time
          nullable: true
          description: When the worker began processing
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: When the execution finished (success or failure)
        duration_seconds:
          type: integer
          readOnly: true
          nullable: true
          description: Total wall-clock execution time in seconds
        result_summary:
          description: Structured result data (inventory reports, export metadata, etc.)
        error_message:
          type: string
          description: Human-readable error message if execution failed
        error_details:
          description: Structured error details (traceback, error codes, context)
        worker_id:
          type: string
          description: Celery worker hostname that processed this execution
          maxLength: 100
        celery_task_id:
          type: string
          description: Celery task ID for tracking in the task queue
          maxLength: 100
        retry_count:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Number of retry attempts for this execution
        last_heartbeat:
          type: string
          format: date-time
          nullable: true
          description: Last heartbeat timestamp from the worker (for stale detection)
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: Record creation timestamp
        is_running:
          type: string
          readOnly: true
        is_finished:
          type: string
          readOnly: true
      required:
      - created_at
      - data_source_name
      - duration_seconds
      - execution_id
      - id
      - is_finished
      - is_running
      - job
      - job_name
      - trigger_type
    UnifiedJobExecutionList:
      type: object
      description: Lightweight serializer for execution list views — omits large JSON fields.
      properties:
        id:
          type: integer
          readOnly: true
        execution_id:
          type: string
          format: uuid
          readOnly: true
          description: Unique UUID for this execution
        job:
          type: integer
          description: The job definition this execution belongs to
        job_name:
          type: string
          readOnly: true
        data_source_name:
          type: string
          readOnly: true
        trigger_type:
          allOf:
          - $ref: '#/components/schemas/TriggerTypeEnum'
          description: 'How this execution was triggered (scheduled, manual, api, dependency, retry)


            * `scheduled` - Scheduled

            * `manual` - Manual

            * `api` - API Triggered

            * `dependency` - Dependency Triggered

            * `retry` - Retry'
        triggered_by:
          type: string
          description: User or service that triggered this execution
          maxLength: 100
        status:
          allOf:
          - $ref: '#/components/schemas/StatusEnum'
          description: 'Current execution status (pending, queued, running, completed, failed, cancelled,
            timeout)


            * `pending` - Pending

            * `queued` - Queued

            * `running` - Running

            * `completed` - Completed

            * `failed` - Failed

            * `cancelled` - Cancelled

            * `timeout` - Timeout'
        progress_percent:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Completion percentage (0-100)
        current_step:
          type: string
          description: Human-readable description of the current processing step
          maxLength: 200
        records_processed:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Total number of records processed so far
        records_successful:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Number of records successfully ingested
        records_failed:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Number of records that failed to ingest
        queued_at:
          type: string
          format: date-time
          nullable: true
          description: When the execution was placed in the Celery queue
        started_at:
          type: string
          format: date-time
          nullable: true
          description: When the worker began processing
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: When the execution finished (success or failure)
        duration_seconds:
          type: integer
          readOnly: true
          nullable: true
          description: Total wall-clock execution time in seconds
        error_message:
          type: string
          description: Human-readable error message if execution failed
        retry_count:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Number of retry attempts for this execution
        last_heartbeat:
          type: string
          format: date-time
          nullable: true
          description: Last heartbeat timestamp from the worker (for stale detection)
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: Record creation timestamp
        is_running:
          type: string
          readOnly: true
        is_finished:
          type: string
          readOnly: true
      required:
      - created_at
      - data_source_name
      - duration_seconds
      - execution_id
      - id
      - is_finished
      - is_running
      - job
      - job_name
      - trigger_type
    UnifiedJobExecutionRequest:
      type: object
      description: Serializer for job executions.
      properties:
        job:
          type: integer
          description: The job definition this execution belongs to
        trigger_type:
          allOf:
          - $ref: '#/components/schemas/TriggerTypeEnum'
          description: 'How this execution was triggered (scheduled, manual, api, dependency, retry)


            * `scheduled` - Scheduled

            * `manual` - Manual

            * `api` - API Triggered

            * `dependency` - Dependency Triggered

            * `retry` - Retry'
        triggered_by:
          type: string
          description: User or service that triggered this execution
          maxLength: 100
        status:
          allOf:
          - $ref: '#/components/schemas/StatusEnum'
          description: 'Current execution status (pending, queued, running, completed, failed, cancelled,
            timeout)


            * `pending` - Pending

            * `queued` - Queued

            * `running` - Running

            * `completed` - Completed

            * `failed` - Failed

            * `cancelled` - Cancelled

            * `timeout` - Timeout'
        progress_percent:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Completion percentage (0-100)
        current_step:
          type: string
          description: Human-readable description of the current processing step
          maxLength: 200
        records_processed:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Total number of records processed so far
        records_successful:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Number of records successfully ingested
        records_failed:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Number of records that failed to ingest
        queued_at:
          type: string
          format: date-time
          nullable: true
          description: When the execution was placed in the Celery queue
        started_at:
          type: string
          format: date-time
          nullable: true
          description: When the worker began processing
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: When the execution finished (success or failure)
        result_summary:
          description: Structured result data (inventory reports, export metadata, etc.)
        error_message:
          type: string
          description: Human-readable error message if execution failed
        error_details:
          description: Structured error details (traceback, error codes, context)
        worker_id:
          type: string
          description: Celery worker hostname that processed this execution
          maxLength: 100
        celery_task_id:
          type: string
          description: Celery task ID for tracking in the task queue
          maxLength: 100
        retry_count:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Number of retry attempts for this execution
        last_heartbeat:
          type: string
          format: date-time
          nullable: true
          description: Last heartbeat timestamp from the worker (for stale detection)
      required:
      - job
      - trigger_type
    ViolationSeverityEnum:
      enum:
      - low
      - medium
      - high
      - critical
      type: string
      description: '* `low` - Low

        * `medium` - Medium

        * `high` - High

        * `critical` - Critical'
    ViolationTypeEnum:
      enum:
      - threshold_exceeded
      - trend_increase
      - sector_outlier
      - regulatory_limit
      type: string
      description: '* `threshold_exceeded` - Emission Threshold Exceeded

        * `trend_increase` - Significant Trend Increase

        * `sector_outlier` - Sector Emission Outlier

        * `regulatory_limit` - Regulatory Limit Exceeded'
    JanUser_UserList:
      type: object
      description: 'Read serializer for the user list endpoint.

        Includes each user''s active org memberships.'
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        email:
          type: string
          format: email
          readOnly: true
        first_name:
          type: string
          readOnly: true
        last_name:
          type: string
          readOnly: true
        is_active:
          type: boolean
          readOnly: true
        is_individual:
          type: boolean
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        memberships:
          type: string
          readOnly: true
      required:
      - created_at
      - email
      - first_name
      - id
      - is_active
      - is_individual
      - last_name
      - memberships
    JanUser_UserListResponse:
      type: object
      properties:
        count:
          type: integer
          description: Total matching users.
        page:
          type: integer
        page_size:
          type: integer
        results:
          type: array
          items:
            $ref: '#/components/schemas/JanUser_UserList'
      required:
      - count
      - page
      - page_size
      - results
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: sessionid
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Send `Authorization: Bearer <jwt>` for JWT access tokens, or `Authorization: Token
        <key>` for legacy API tokens.'
servers:
- url: https://auth-dev.jana.earth
  description: Auth API (jana-user — /api/auth/*)
- url: https://api-dev.jana.earth
  description: Data API (fr-data-service — /api/v1/*)
- url: http://localhost:8000
  description: Local data API (Jana docker compose web)
- url: http://localhost:8001
  description: Local auth API (jana-user docker compose web)
tags:
- name: ESG Unified API
  description: Cross-source unified environmental data access
- name: OpenAQ
  description: Air quality data from OpenAQ (locations, sensors, measurements)
- name: Climate TRACE
  description: Greenhouse gas emissions from Climate TRACE (sectors, assets, emissions)
- name: EDGAR
  description: Global emissions data from EDGAR JRC (country totals, grid emissions)
- name: Authentication
  description: Login, logout, and token management
- name: auth
  description: Identity — jana-user (/api/auth/*)
