{"openapi":"3.1.0","info":{"title":"Gen318 Partner Data API","description":"Read-only, quality-graded access to Gen318 operational data. Start with the Quickstart before using the generated reference.\n\n[Quickstart](/partner/docs/quickstart) · [Authentication](/partner/docs/authentication) · [The honesty contract](/partner/docs/honesty-contract) · [Endpoint reference](/partner/docs/reference) · [Error catalogue](/partner/docs/errors) · [Pagination](/partner/docs/pagination) · [Rate limits](/partner/docs/rate-limits) · [Versioning and deprecation](/partner/docs/versioning) · [Changelog](/partner/docs/changelog)\n\nEvery time-series response carries both trust and delivery coverage. Do not publish one without the other.","contact":{"name":"Gen318 API support","email":"support@gen318.com"},"license":{"name":"Gen318 partner API terms","url":"https://gen318.com/terms"},"version":"1.0.0"},"servers":[{"url":"https://app.gen318.com","description":"Gen318 public API"}],"paths":{"/api/v1/data/catalog":{"get":{"tags":["data-api"],"summary":"Get Catalog","description":"The wire vocabulary: every metric's unit, kind, aggregation behaviour,\nexpected cadence, asset ownership and plausibility bounds, plus\n``CATALOG_VERSION``.\n\nIdentical payload to the operator API's ``/telemetry/catalog`` — one\n``catalog_payload()``, so a partner and an operator can never be reading\ntwo different vocabularies.","operationId":"get_catalog_api_v1_data_catalog_get","security":[{"ApiKey":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Catalog Api V1 Data Catalog Get"}}},"headers":{"RateLimit-Policy":{"description":"Effective quota and window (IETF structured field).","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and effective reset window.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Effective quota and window (IETF structured field).","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and effective reset window.","schema":{"type":"string"}}}}}}},"/api/v1/data/assets":{"get":{"tags":["data-api"],"summary":"List Assets","description":"The asset inventory this principal may read.\n\n``adapter_config`` is deliberately absent: it holds vendor credentials\n(``adapters/config_secrets.py``), and a read API is not a credential\nexport.","operationId":"list_assets_api_v1_data_assets_get","security":[{"ApiKey":[]}],"parameters":[{"name":"site_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Site Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"default":1000,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Assets Api V1 Data Assets Get"}}},"headers":{"RateLimit-Policy":{"description":"Effective quota and window (IETF structured field).","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and effective reset window.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Effective quota and window (IETF structured field).","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and effective reset window.","schema":{"type":"string"}}}}}}},"/api/v1/data/sites/{site_id}/topology":{"get":{"tags":["data-api"],"summary":"Get Site Topology","description":"The typed electrical connection graph for one site.\n\nNodes and edges are Gen318's flattening of the IEC 61970 CIM\nConnectivityNode/Terminal layering; ``topology_role='pcc'`` marks the\nIEEE 1547-2018 §3 Point of Common Coupling. Both are documented in\n``services/topology/graph.py`` and restated in the published spec.","operationId":"get_site_topology_api_v1_data_sites__site_id__topology_get","security":[{"ApiKey":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Site Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Site Topology Api V1 Data Sites  Site Id  Topology Get"}}},"headers":{"RateLimit-Policy":{"description":"Effective quota and window (IETF structured field).","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and effective reset window.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Effective quota and window (IETF structured field).","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and effective reset window.","schema":{"type":"string"}}}}}}},"/api/v1/data/timeseries":{"get":{"tags":["data-api"],"summary":"Get Timeseries","description":"Quality-graded time series with the honesty contract attached.\n\nThe value column is chosen from the metric's declared\n``bucket_aggregation`` — a gauge's trusted mean, a state's last trusted\nvalue, a counter's non-negative within-bucket delta. Averaging a state\ncode or a cumulative counter is silently wrong and no test downstream\nwould catch it, so the choice is made from the catalog rather than left\nto the caller.\n\nEmpty buckets are omitted (``sample_count > 0``), which means a gap in the\nseries is a gap in the array — a client that plots what it receives draws\na straight line across an outage. ``coverage.delivered_pct`` and\n``coverage.silent_series`` are how a reader detects that without\nreconstructing the expected bucket grid themselves.","operationId":"get_timeseries_api_v1_data_timeseries_get","security":[{"ApiKey":[]}],"parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Site Id"}},{"name":"metric_name","in":"query","required":true,"schema":{"type":"string","description":"Canonical catalog metric name","title":"Metric Name"},"description":"Canonical catalog metric name"},{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Window start, ISO 8601, inclusive","title":"Start"},"description":"Window start, ISO 8601, inclusive"},{"name":"end","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Window end, ISO 8601, exclusive","title":"End"},"description":"Window end, ISO 8601, exclusive"},{"name":"resolution","in":"query","required":false,"schema":{"enum":["5m","1h","1d"],"type":"string","default":"1h","title":"Resolution"}},{"name":"aggregation","in":"query","required":false,"schema":{"enum":["semantic","avg","min","max","sum","first","last"],"type":"string","description":"Catalog semantics by default, or an explicit bucket aggregate.","default":"semantic","title":"Aggregation"},"description":"Catalog semantics by default, or an explicit bucket aggregate."},{"name":"asset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Asset Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor from a previous page's `next_cursor`","title":"Cursor"},"description":"Opaque cursor from a previous page's `next_cursor`"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"default":1000,"title":"Limit"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Timeseries Api V1 Data Timeseries Get"}}},"headers":{"RateLimit-Policy":{"description":"Effective quota and window (IETF structured field).","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and effective reset window.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Effective quota and window (IETF structured field).","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and effective reset window.","schema":{"type":"string"}}}}}}},"/api/v1/data/views/{view_id}/export":{"get":{"tags":["data-api"],"summary":"Export Saved View","description":"Export a governed saved view as CSV or Parquet.\n\nThe view supplies the site, the series and the window; the caller supplies\nonly the format. That is deliberate — a saved view is a governed,\nshareable, schedulable object, and letting the exporter override its\nwindow would turn \"export this view\" into \"run this arbitrary query with\nthis view's name on it\".\n\nVisibility is enforced exactly as the console enforces it, including the\nrule that a `private` view is invisible to an API key: a key's principal\nis the key, not the human who minted it.","operationId":"export_saved_view_api_v1_data_views__view_id__export_get","security":[{"ApiKey":[]}],"parameters":[{"name":"view_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"View Id"}},{"name":"format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Format"}},{"name":"excel","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Excel"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Effective quota and window (IETF structured field).","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and effective reset window.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Effective quota and window (IETF structured field).","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and effective reset window.","schema":{"type":"string"}}}}}}},"/api/v1/data/exports/{job_id}":{"get":{"tags":["data-api"],"summary":"Get Export Job","operationId":"get_export_job_api_v1_data_exports__job_id__get","security":[{"ApiKey":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Export Job Api V1 Data Exports  Job Id  Get"}}},"headers":{"RateLimit-Policy":{"description":"Effective quota and window (IETF structured field).","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and effective reset window.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Effective quota and window (IETF structured field).","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and effective reset window.","schema":{"type":"string"}}}}}}},"/api/v1/data/exports/{job_id}/manifest":{"get":{"tags":["data-api"],"summary":"Get Export Manifest","operationId":"get_export_manifest_api_v1_data_exports__job_id__manifest_get","security":[{"ApiKey":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Export Manifest Api V1 Data Exports  Job Id  Manifest Get"}}},"headers":{"RateLimit-Policy":{"description":"Effective quota and window (IETF structured field).","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and effective reset window.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Effective quota and window (IETF structured field).","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and effective reset window.","schema":{"type":"string"}}}}}}},"/api/v1/data/exports/{job_id}/download":{"get":{"tags":["data-api"],"summary":"Download Export Job","operationId":"download_export_job_api_v1_data_exports__job_id__download_get","security":[{"ApiKey":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"headers":{"RateLimit-Policy":{"description":"Effective quota and window (IETF structured field).","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and effective reset window.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"headers":{"RateLimit-Policy":{"description":"Effective quota and window (IETF structured field).","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and effective reset window.","schema":{"type":"string"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"ApiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"A g318_ key created in Data access. It is shown once."}}},"tags":[{"name":"data-api","description":"Read-only operational data. Timeseries responses carry both trusted_pct and delivered_pct plus provisionality."}]}