UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 39.7 kB
{"openapi":"3.0.0","info":{"contact":{"x-twitter":"opendatasoft"},"title":"opendatasoft","version":"2.1.0","x-apisguru-categories":["open_data"],"x-logo":{"url":"https://twitter.com/opendatasoft/profile_image?size=original"},"x-origin":[{"format":"swagger","url":"http://public.opendatasoft.com/api/v2/swagger.json","version":"2.0"},{"format":"swagger","url":"http://public.opendatasoft.com/api/v2/swagger.json","version":"2.0"}],"x-providerName":"opendatasoft.com"},"security":[{"api_key":[]},{"basic":[]}],"tags":[{"name":"root"},{"name":"metadata"},{"name":"catalog"},{"name":"export catalog"},{"name":"dataset"},{"name":"export dataset"}],"paths":{"/":{"get":{"description":"API entry point\n\nProvides links for:\n* catalog, your domain's list of datasets\n* opendatasoft, all datasets on the Opendatasoft network\n","operationId":"getRoot","responses":{"200":{"description":"Provide a set of links to the most basic entry points in the API (sources)","content":{"application/json":{"schema":{"properties":{"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"}}}}}}},"tags":["root","ods"]}},"/pages":{"get":{"description":"List of all pages from this portal.\n","operationId":"getPages","responses":{"200":{"description":"List of all pages, each with their endpoint.","content":{"application/json":{"schema":{"properties":{"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"},"pages":{"items":{"properties":{"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"},"page":{"$ref":"#/components/schemas/page"}},"type":"object"},"type":"array"}}}}}}},"tags":["page","ods"]}},"/pages/{slug}":{"get":{"description":"A single page's metadata from this portal\n","operationId":"getPage","parameters":[{"$ref":"#/components/parameters/slug"}],"responses":{"200":{"description":"A single page's metadata.","content":{"application/json":{"schema":{"properties":{"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"},"page":{"$ref":"#/components/schemas/page"}}}}}}},"tags":["page","ods"]}},"/{source}":{"get":{"description":"Source entry points\n\nProvides links for the source's datasets and metadata.\n","operationId":"getSource","parameters":[{"$ref":"#/components/parameters/source"}],"responses":{"200":{"description":"Provide a set of links to the basic entry points for the given source.","content":{"application/json":{"schema":{"properties":{"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"}}}}}}},"tags":["catalog","ods"]}},"/{source}/aggregates":{"get":{"description":"**Deprecated, use `/datasets` instead.**\n","operationId":"aggregateDatasets","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/group_by"},{"$ref":"#/components/parameters/order_by"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"}],"responses":{"200":{"description":"Aggregation result","content":{"application/json":{"schema":{"properties":{"aggregations":{"items":{"$ref":"#/components/schemas/aggregation"},"type":"array"},"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"}},"type":"object"}}}}},"tags":["catalog","aggregations","ods"]}},"/{source}/datasets":{"get":{"description":"List of available datasets, each with their endpoints, paginated.\n\nLinks provided:\n* previous page\n* next page\n* last page\n* first page\n","operationId":"getDatasets","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/group_by"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/order_by"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/pretty"},{"$ref":"#/components/parameters/timezone"},{"$ref":"#/components/parameters/include_app_metas"}],"responses":{"200":{"description":"List of available datasets","content":{"application/json":{"schema":{"properties":{"datasets":{"items":{"properties":{"dataset":{"$ref":"#/components/schemas/dataset"},"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"}},"type":"object"},"type":"array"},"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"},"total_count":{"type":"integer"}}}}}}},"tags":["catalog","ods"]}},"/{source}/datasets/{dataset_id}":{"get":{"description":"List of available endpoints for the specified dataset, with metadata and endpoints.\n\nWill provide links for:\n* the attachments endpoint\n* the files endpoint\n* the records endpoint\n* the catalog endpoint\n","operationId":"getDataset","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/pretty"},{"$ref":"#/components/parameters/timezone"},{"$ref":"#/components/parameters/include_app_metas"}],"responses":{"200":{"description":"The dataset","content":{"application/json":{"schema":{"properties":{"dataset":{"$ref":"#/components/schemas/dataset"},"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"}}}}}}},"tags":["dataset","ods"]}},"/{source}/datasets/{dataset_id}/aggregates":{"get":{"description":"**Deprecated, use `/records` instead.**\n","operationId":"aggregateRecords","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/group_by"},{"$ref":"#/components/parameters/order_by"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"}],"responses":{"200":{"description":"Aggregation result","content":{"application/json":{"schema":{"properties":{"aggregations":{"items":{"$ref":"#/components/schemas/aggregation"},"type":"array"},"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"}}}}}}},"tags":["dataset","aggregations","ods"]}},"/{source}/datasets/{dataset_id}/attachments":{"get":{"description":"Get list of all available attachments\n","operationId":"getDatasetAttachements","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"}],"responses":{"200":{"description":"List of all available attachments","content":{"application/json":{"schema":{"properties":{"attachments":{"items":{"$ref":"#/components/schemas/attachment"},"type":"array"},"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"}}}}}}},"tags":["dataset","ods"]}},"/{source}/datasets/{dataset_id}/attachments/{attachment_id}":{"get":{"description":"Download attachment\n","operationId":"downloadDatasetAttachement","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/attachment_id"}],"responses":{"200":{"description":"The requested attachment"}},"tags":["dataset","ods"]}},"/{source}/datasets/{dataset_id}/exports/csv":{"get":{"description":"Export dataset in CSV format\n","operationId":"exportRecordsCSV","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/order_by"},{"$ref":"#/components/parameters/limit_export"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/timezone"},{"description":"Provide a different delimiter (default ',').","in":"query","name":"delimiter","required":false,"schema":{"type":"string","enum":[",",";","|"],"default":";"}}],"responses":{"200":{"description":"Return a CSV file","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["export dataset","ods"]}},"/{source}/datasets/{dataset_id}/exports/geojson":{"get":{"description":"Export dataset in GEOJSON format\n","operationId":"exportRecordsGEOJSON","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/order_by"},{"$ref":"#/components/parameters/limit_export"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/timezone"},{"$ref":"#/components/parameters/pretty"}],"responses":{"200":{"description":"Return a GEOJSON file","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["export dataset","ods"]}},"/{source}/datasets/{dataset_id}/exports/ical":{"get":{"description":"Export dataset in ICAL format\n","operationId":"exportRecordsICAL","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/order_by"},{"$ref":"#/components/parameters/limit_export"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/timezone"}],"responses":{"200":{"description":"Return an ICAL file","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["export dataset","ods"]}},"/{source}/datasets/{dataset_id}/exports/json":{"get":{"description":"Export dataset in JSON format\n","operationId":"exportRecordsJSON","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/order_by"},{"$ref":"#/components/parameters/limit_export"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/pretty"},{"$ref":"#/components/parameters/timezone"}],"responses":{"200":{"description":"Return a JSON file","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["export dataset","ods"]}},"/{source}/datasets/{dataset_id}/exports/ov2":{"get":{"description":"Export dataset in OV2 format\n","operationId":"exportRecordsOV2","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/order_by"},{"$ref":"#/components/parameters/limit_export"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/timezone"}],"responses":{"200":{"description":"Return an ov2 file","content":{"text/plain":{"schema":{"type":"string","format":"binary"}}}}},"tags":["export dataset","ods"]}},"/{source}/datasets/{dataset_id}/exports/shp":{"get":{"description":"Export dataset in Esri shapefile (shp) format\n","operationId":"exportRecordsSHP","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/order_by"},{"$ref":"#/components/parameters/limit_export"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/timezone"}],"responses":{"200":{"description":"Return a Shapefile zip","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}}},"tags":["export dataset","ods"]}},"/{source}/datasets/{dataset_id}/exports/xls":{"get":{"description":"Export dataset in XLS (Excel) format\n","operationId":"exportRecordsXLS","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/order_by"},{"$ref":"#/components/parameters/limit_export"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/timezone"}],"responses":{"200":{"description":"Return an XLS file","content":{"xls":{"schema":{"type":"string","format":"binary"}}}}},"tags":["export dataset","ods"]}},"/{source}/datasets/{dataset_id}/facets":{"get":{"description":"Enumerate facets values for records and return a list of values for each facet.\nCan be used to implement guided navigation in large result sets.\n\nRead [the facets documentation](https://help.opendatasoft.com/apis/ods-search-v2/#enumerating-facets-values) for more details.\n","operationId":"getRecordsFacets","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/timezone"}],"responses":{"200":{"description":"Facets enumeration","content":{"application/json":{"schema":{"properties":{"facets":{"items":{"$ref":"#/components/schemas/facet_enumeration"},"type":"array"}},"type":"object"}}}}},"tags":["dataset","facet","ods"]}},"/{source}/datasets/{dataset_id}/feedback":{"put":{"description":"Create new feedback entry.\n","operationId":"sendDatasetFeedback","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"comment":{"type":"string"},"newValues":{"description":"New record value","type":"object"},"recordid":{"description":"Feedback entry's recordid","type":"string"},"schema":{"description":"Record schema","type":"object"}}}}},"description":"Feedback entry","required":true},"responses":{"201":{"description":"Success message: {status: 'ok'}\n"}},"tags":["dataset","ods"]}},"/{source}/datasets/{dataset_id}/files/{file_id}":{"get":{"description":"Download file\n","operationId":"getDatasetFile","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/file_id"},{"$ref":"#/components/parameters/thumbnail_size"}],"responses":{"200":{"description":"The requested file, or its thumbnail (if thumbnail_size is specified)"}},"tags":["dataset","ods"]}},"/{source}/datasets/{dataset_id}/records":{"get":{"description":"Search dataset's records.\n","operationId":"getRecords","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/group_by"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/order_by"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/pretty"},{"$ref":"#/components/parameters/timezone"}],"responses":{"200":{"description":"Records","content":{"application/json":{"schema":{"properties":{"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"},"records":{"items":{"properties":{"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"},"record":{"$ref":"#/components/schemas/record"}},"type":"object"},"type":"array"},"total_count":{"type":"integer"}}}}}}},"tags":["dataset","ods"]}},"/{source}/datasets/{dataset_id}/records/{record_id}":{"get":{"description":"Retrieve a single record based on its ID.\n","operationId":"getRecord","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/record_id"},{"$ref":"#/components/parameters/select"},{"$ref":"#/components/parameters/pretty"},{"$ref":"#/components/parameters/timezone"}],"responses":{"200":{"description":"A single record","content":{"application/json":{"schema":{"properties":{"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"},"record":{"$ref":"#/components/schemas/record"}}}}}}},"tags":["dataset","ods"]}},"/{source}/datasets/{dataset_id}/reuses":{"get":{"description":"Get list of reuses\n","operationId":"getDatasetReuses","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/timezone"}],"responses":{"200":{"description":"A paginated list of reuses\n","content":{"application/json":{"schema":{"properties":{"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"},"reuses":{"items":{"$ref":"#/components/schemas/reuse"},"type":"array"}}}}}}},"tags":["dataset","ods"]}},"/{source}/datasets/{dataset_id}/reuses/{reuse_id}":{"get":{"description":"Retrieve a single reuse based on its ID.\n","operationId":"getDatasetReuse","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/reuse_id"},{"$ref":"#/components/parameters/timezone"}],"responses":{"200":{"description":"A paginated list of reuses\n","content":{"application/json":{"schema":{"properties":{"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"},"reuse":{"$ref":"#/components/schemas/reuse"}}}}}}},"tags":["dataset","ods"]}},"/{source}/datasets/{dataset_id}/snapshots":{"get":{"description":"List of all snapshots for this dataset.\n","operationId":"getDatasetSnapshots","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/timezone"}],"responses":{"200":{"description":"List of all snapshots, each with their endpoint.","content":{"application/json":{"schema":{"properties":{"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"},"snapshots":{"items":{"$ref":"#/components/schemas/snapshot"},"type":"array"}}}}}}},"tags":["dataset","ods"]}},"/{source}/datasets/{dataset_id}/snapshots/{snapshot_id}":{"get":{"description":"List of all snapshots for this dataset.\n","operationId":"downloadDatasetSnapshot","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/dataset_id"},{"$ref":"#/components/parameters/snapshot_id"},{"$ref":"#/components/parameters/timezone"}],"responses":{"200":{"description":"The full dataset in the state it was in when the snapshot was created, in CSV"}},"tags":["dataset","ods"]}},"/{source}/exports/csv":{"get":{"description":"Export catalog (source) in CSV format\n","operationId":"exportDatasetsCSV","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/timezone"},{"$ref":"#/components/parameters/include_app_metas"},{"description":"Provide a different delimiter (default ',').","in":"query","name":"delimiter","required":false,"schema":{"type":"string","enum":[",",";","|"],"default":";"}}],"responses":{"200":{"description":"Return a CSV file","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["export catalog","ods"]}},"/{source}/exports/json":{"get":{"description":"Export catalog (source) in JSON format\n","operationId":"exportDatasetsJson","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/pretty"},{"$ref":"#/components/parameters/timezone"},{"$ref":"#/components/parameters/include_app_metas"}],"responses":{"200":{"description":"Return a JSON file","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["export catalog","ods"]}},"/{source}/exports/rdf":{"get":{"description":"Export catalog (source) in RDF/XML format\n","operationId":"exportDatasetsRDF","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/timezone"},{"$ref":"#/components/parameters/include_app_metas"}],"responses":{"200":{"description":"Return a RDF XML file","content":{"application/rdf+xml":{"schema":{"type":"string","format":"binary"}}}}},"tags":["export catalog","ods"]}},"/{source}/exports/rss":{"get":{"description":"Export catalog (source) in RSS format\n","operationId":"exportDatasetsRSS","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/timezone"},{"$ref":"#/components/parameters/include_app_metas"}],"responses":{"200":{"description":"Return a JSON file","content":{"text/xml":{"schema":{"type":"string","format":"binary"}}}}},"tags":["export catalog","ods"]}},"/{source}/exports/ttl":{"get":{"description":"Export catalog (source) in TTL (turtle/rdf) format\n","operationId":"exportDatasetsTTL","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/timezone"},{"$ref":"#/components/parameters/include_app_metas"}],"responses":{"200":{"description":"Return a TTL file","content":{"text/turtle":{"schema":{"type":"string","format":"binary"}}}}},"tags":["export catalog","ods"]}},"/{source}/exports/xls":{"get":{"description":"Export catalog (source) in XLS (Excel) format\n","operationId":"exportDatasetsXLS","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/timezone"},{"$ref":"#/components/parameters/include_app_metas"}],"responses":{"200":{"description":"Return an XLS file","content":{"xls":{"schema":{"type":"string","format":"binary"}}}}},"tags":["export catalog","ods"]}},"/{source}/facets":{"get":{"description":"Enumerate facets values for datasets and return a list of values for each facet.\nCan be used to implement guided navigation in large result sets.\n\nRead [the facets documentation](https://help.opendatasoft.com/apis/ods-search-v2/#enumerating-facets-values) for more details.\n","operationId":"getDatasetsFacets","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/facet"},{"$ref":"#/components/parameters/refine"},{"$ref":"#/components/parameters/exclude"},{"$ref":"#/components/parameters/where"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/timezone"}],"responses":{"200":{"description":"Facets enumeration","content":{"application/json":{"schema":{"properties":{"facets":{"items":{"$ref":"#/components/schemas/facet_enumeration"},"type":"array"}},"type":"object"}}}}},"tags":["catalog","facet","ods"]}},"/{source}/metadata_templates":{"get":{"description":"List of available metadata templates types, each with their endpoints.\n","operationId":"getMetadataTemplatesTypes","parameters":[{"$ref":"#/components/parameters/source"}],"responses":{"200":{"description":"List of available metadata templates types","content":{"application/json":{"schema":{"properties":{"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"}}}}}}},"tags":["metadata","ods"]}},"/{source}/metadata_templates/{metadata_template_type}":{"get":{"description":"List of metadata templates available for this type.\n","operationId":"getMetadataTemplatesType","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/metadata_template_type"}],"responses":{"200":{"description":"List of metadata templates","content":{"application/json":{"schema":{"properties":{"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"},"metadata_templates":{"items":{"properties":{"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"},"metadata_template":{"$ref":"#/components/schemas/metadata_template"}},"type":"object"},"type":"array"}}}}}}},"tags":["metadata","ods"]}},"/{source}/metadata_templates/{metadata_template_type}/{metadata_template_name}":{"get":{"description":"A single metadata_template\n","operationId":"getMetadataTemplate","parameters":[{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/metadata_template_type"},{"$ref":"#/components/parameters/metadata_template_name"}],"responses":{"200":{"description":"A metadata template selected by ID.","content":{"application/json":{"schema":{"properties":{"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"},"metadata_template":{"$ref":"#/components/schemas/metadata_template"}}}}}}},"tags":["metadata","ods"]}}},"servers":[{"url":"https://public.opendatasoft.com/api/v2"}],"components":{"parameters":{"attachment_id":{"in":"path","name":"attachment_id","required":true,"schema":{"type":"string"}},"dataset_id":{"description":"Dataset identifier.\n\nCan be found in the \"information\" tab of the dataset page.\n","in":"path","name":"dataset_id","required":true,"schema":{"type":"string"}},"exclude":{"description":"An array of facet filters. For example **city:Paris** or **modified:2019/12**.\nThe request will exclude the defined facet value.\n\nRead [filtering with facets value](https://help.opendatasoft.com/apis/ods-search-v2/#filtering-with-facets-values) for more details.\n\n*Not to be confused with a where filter. Excluding a facet value is equivalent to removing an entry in the left navigation panel.*\n\n*exclude is not available for monitoring sources*\n","in":"query","name":"exclude","required":false,"explode":true,"schema":{"type":"array","items":{"type":"string"}}},"facet":{"description":"A facet is a field used for simple filtering (through the parameters refine and exclude) or exploration (with the endpoint `/facets`).\n\nFacets can be configured in the back-office or with this parameter.\n\nRead [the facets documentation](https://help.opendatasoft.com/apis/ods-search-v2/#facets) for more details.\n","in":"query","name":"facet","explode":true,"schema":{"type":"array","items":{"type":"string"}}},"file_id":{"in":"path","name":"file_id","required":true,"schema":{"type":"string"}},"group_by":{"description":"A group by expression defines a grouping function for an aggregation.\nIt can be:\n - a field name: group result by each value of this field\n - a range function: group result by range\n - a date function: group result by date\nIt is possible to specify a custom name with the 'as name' notation. For instance: group_by='city_field as city'.\n","in":"query","name":"group_by","required":false,"schema":{"type":"string"}},"include_app_metas":{"description":"Explicitely request application metas for each datasets.\n","in":"query","name":"include_app_metas","schema":{"type":"boolean","default":false}},"limit":{"description":"Number of items to return.\n\nTo use in conjonction with offset to implement pagination.\n\nLimit maximum value is 100. To retrive more data use export entry points.\nThe default value is 10.\n","in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":-1,"maximum":100,"default":10}},"limit_export":{"description":"Number of items to return in export.\n\nUse -1 (default) to retrieve all records\n","in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":-1,"default":-1}},"metadata_template_name":{"in":"path","name":"metadata_template_name","required":true,"schema":{"type":"string"}},"metadata_template_type":{"in":"path","name":"metadata_template_type","required":true,"schema":{"type":"string","enum":["basic","interop","extra"],"default":"basic"}},"mime_type":{"description":"Specify one (or many) mime type(s) and return only the files matching said type(s).","in":"query","name":"mime_type","required":false,"schema":{"type":"string"}},"offset":{"description":"Index of the first item to return (starting at 0).\n\nTo use in conjonction with limit to implement pagination.\n","in":"query","name":"offset","required":false,"schema":{"type":"integer","minimum":0,"default":0}},"order_by":{"description":"A comma-separated list of field names or aggregations to sort on, followed by an order (`asc` or `desc`).\n\nSorts results according to the specified fields' values in ascending order by default.\nTo sort results in descending order, use the `desc` keyword.\n\nExample: `sum(age) desc, name asc`\n","in":"query","name":"order_by","required":false,"style":"form","explode":false,"schema":{"type":"array","items":{"type":"string"}}},"pretty":{"description":"Activate pretty print","in":"query","name":"pretty","schema":{"type":"boolean","default":false}},"record_id":{"in":"path","name":"record_id","required":true,"schema":{"type":"string"}},"refine":{"description":"An array of facet filters. For example **city:Paris** or **modified:2019/12**.\nThe request will only include the selected facet value.\n\nRead [filtering with facets value](https://help.opendatasoft.com/apis/ods-search-v2/#filtering-with-facets-values) for more details.\n\n*Not to be confused with a where filter. Refining with a facet is equivalent to selecting an entry in the left navigation panel.*\n\n*refine is not available for monitoring sources*\n","in":"query","name":"refine","required":false,"explode":true,"schema":{"type":"array","items":{"type":"string"}}},"reuse_id":{"in":"path","name":"reuse_id","required":true,"schema":{"type":"string"}},"search":{"description":"An array of full text search.\n\nA full text search performs a prefixed text search for each provided terms in all visible fields of a catalog/dataset.\n","in":"query","name":"search","required":false,"explode":true,"schema":{"type":"array","items":{"type":"string"}}},"select":{"description":"A select expression can be used to add, remove or change fields to return.\nAn expression can be:\n - a wildcard ('*'): return all fields\n - a field name: return only this field\n - an include/exclude function. Include (resp exclude) all field matching include/exclude expression. This expression can contain wildcard. For example: include(spa*) will return all fields begining with 'spa'\n - a complex expression: return the result of this expression. A label can be set for this expression, in that case, field will be named with this label. For instance: 'size * 2 as bigger_size' will return a new field named bigger_size and containing the double of size field value.\n","in":"query","name":"select","required":false,"schema":{"type":"string"}},"slug":{"description":"Page slug.\n","in":"path","name":"slug","required":true,"schema":{"type":"string"}},"snapshot_id":{"in":"path","name":"snapshot_id","required":true,"schema":{"type":"string"}},"sort":{"description":"**Deprecated, use `order_by` instead.**\n\nA list of field names, each possibly prefixed with a minus (-).\n\nSorts results according to the specified fields' values. By default, the sort is ascending (from the smallest\nvalue to the biggest value). A minus sign (‘-‘) may be used to perform a descending sort. Sorting is only\navailable on numeric fields (int, double, date and datetime) and on text fields which have the sortable\nannotation.\n","in":"query","name":"sort","required":false,"style":"form","explode":false,"schema":{"type":"array","items":{"type":"string"}}},"source":{"description":"Each source represents a different catalog of datasets you'll be able to query.\n\nThere are 2 sources available:\n\n* catalog: the catalog of datasets on your portal\n* opendatasoft: Opendatasoft's repository of public datasets, also available at\n [data.opendatasoft.com](https://data.opendatasoft.com/page/home/)\n","in":"path","name":"source","required":true,"schema":{"type":"string","enum":["catalog","opendatasoft","monitoring"],"default":"catalog"}},"thumbnail_size":{"description":"Set the size of the thumbnail representing the resource (attachment, image or file)","in":"query","name":"thumbnail_size","schema":{"type":"string"}},"timezone":{"description":"Set timezone for datetime fields","in":"query","name":"timezone","schema":{"type":"string","default":"UTC"}},"where":{"description":"An array of filters.\n\nA filter is a text expression performing a simple full-text search that can also include logical operations\n(NOT, AND, OR...) as well as lots of other functions, thus performing more complex and more precise searches.\n\nRead [the query language reference](https://docs.opendatasoft.com/api/explore/v2.html#where-clause) for more details.\n","in":"query","name":"where","required":false,"explode":true,"schema":{"type":"array","items":{"type":"string"}}}},"securitySchemes":{"api_key":{"in":"query","name":"apikey","type":"apiKey"},"basic":{"type":"http","scheme":"basic"}},"schemas":{"aggregation":{"description":"Result of an aggregation request.","example":{"count(*)":86},"type":"object"},"attachment":{"properties":{"href":{"type":"string"},"metas":{"type":"object"}},"type":"object"},"dataset":{"properties":{"attachments":{"items":{"type":"object"},"type":"array"},"data_visible":{"type":"boolean"},"dataset_id":{"type":"string"},"features":{"description":"A map of available features for a dataset, with the fields they apply to.\n","items":{"type":"string"},"type":"array"},"fields":{"items":{"properties":{"annotations":{"type":"object"},"description":{"type":"string"},"label":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"type":"object"},"type":"array"},"has_records":{"type":"boolean"},"metas":{"type":"object"}},"type":"object"},"datasets":{"items":{"$ref":"#/components/schemas/dataset"},"type":"array"},"facet_enumeration":{"properties":{"facets":{"items":{"$ref":"#/components/schemas/facet_value_enumeration"},"type":"array"},"name":{"type":"string"}},"type":"object"},"facet_value_enumeration":{"properties":{"count":{"type":"integer"},"facets":{"items":{"$ref":"#/components/schemas/facet_value_enumeration"},"type":"array"},"name":{"type":"string"},"value":{"type":"string"}},"type":"object"},"link":{"properties":{"href":{"type":"string"},"rel":{"type":"string"}},"type":"object"},"links":{"items":{"$ref":"#/components/schemas/link"},"type":"array"},"metadata_template":{"properties":{"name":{"type":"string"},"schema":{"items":{"type":"object"},"type":"array"},"type":{"type":"string"}},"type":"object"},"page":{"properties":{"description":{"type":"string"},"slug":{"type":"string"},"title":{"description":"A localized string (that is an object where the keys are language codes and the values translations of a same\nstring).\n","properties":{"en":{"type":"string"},"fr":{"type":"string"}},"type":"object"}},"type":"object"},"query_string":{"description":"Query string using the query language.\nExample: (field1=\"value1\" or field1=\"value2\") and field2=value2 and \"full text search\"\n\nSupports geo queries with the following functions:\n* distance(myfield, center, radius): restrict entries to those where {myfield} is less than {radius} from {center} (center being defined 'lat,lon')\n* bbox(myfield, topleft, bottomright): restrict entries to those where {myfield} is within the bounds defined by the two sets of coordinates {topleft} and {bottomright}\n* polygon(myfield, mypolygon): restrict entries to those where {myfield} is within the bounds of {mypolygon}; {mypolygon} being a list of 'lat,lon' vertices\n* wkt(myfield, mywkt): restrict entries to those where {myfield} is within the body of {mywkt}; {mywkt} being a Well Known Text (see 'http://en.wikipedia.org/wiki/Well-known_text' for reference)\n","type":"string"},"record":{"properties":{"fields":{"type":"object"},"id":{"type":"string"},"size":{"type":"integer"},"timestamp":{"format":"dateTime","type":"string"}},"type":"object"},"records":{"items":{"$ref":"#/components/schemas/record"},"type":"array"},"reuse":{"properties":{"created_at":{"description":"Date when the reuse was submitted.","format":"dateTime","type":"string"},"description":{"description":"Slightly longer description of what was achieved using the dataset."},"id":{"description":"reuse id","type":"string"},"thumbnail":{"description":"URL illustrating the work.","type":"string"},"title":{"description":"Short description of the user's work.","type":"string"},"url":{"description":"URL where the work can be accessed publicly.","type":"string"},"user":{"properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"username":{"type":"string"}},"type":"object"}},"type":"object"},"snapshot":{"properties":{"created_at":{"format":"dateTime","type":"string"},"description":{"type":"string"},"href":{"type":"string"},"snapshot_id":{"type":"string"}},"type":"object"},"timezone":{"description":"A timezone\n\nIf used as a parameter, defines the timezone the calculations will be performed in. If left empty, 'UTC' is\nassumed.\n","example":"Europe/Paris","type":"string"}}}}