openapi: "3.0.2" info: description: "This page describes the REST services of the Géoclip API. Some examples are available on the documentation page" version: "0.1" title: "Géoclip API" servers: - url: "https://sirse.atlasante.fr/api/v1" tags: - name: "nivgeos" description: "Everything about nivgeos" externalDocs: description: "Find out more" url: "https://geoclip.fr/aide_admin/air/prise_en_main/en/geography/" - name: "views" description: "Everything about views" externalDocs: description: "Find out more" url: "https://geoclip.fr/aide_admin/air/prise_en_main/en/geography/" - name: "extents" description: "Everything about extents" externalDocs: description: "Find out more" url: "https://geoclip.fr/aide_admin/air/prise_en_main/en/geography/" - name: "trees" description: "Everything about trees" externalDocs: description: "Find out more" url: "https://geoclip.fr/aide_admin/air/prise_en_main/en/data/" - name: "reports" description: "Everything about reports" externalDocs: description: "Find out more" url: "https://geoclip.fr/aide_admin/air/prise_en_main/en/data/" - name: "functions" description: "Advanced function like search" paths: /metadata/nivgeos: get: summary: "Retrieve all available nivgeos" description: "Retrieve all available nivgeos" operationId: "getAllNivgeos" parameters: [] tags: - "nivgeos" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Nivgeos" /metadata/nivgeos/{nivgeoID}: get: summary: "Find nivgeo by ID" description: "Returns a single nivgeo" operationId: "getNivgeoByID" tags: - "nivgeos" parameters: - name: "nivgeoID" in: "path" description: "ID of nivgeo to return" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Nivgeos" /metadata/nomencs: get: summary: "Retrieve all available nomencs" description: "Retrieve all available nomencs" operationId: "getAllNomencs" parameters: [] tags: - "nomencs" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Nomencs" /metadata/nomencs/{nomencID}: get: summary: "Find nomenc by ID" description: "Returns a single nomenc" operationId: "getNomencByID" tags: - "nomencs" parameters: - name: "nomencID" in: "path" description: "ID of nomenc to return" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Nomencs" /metadata/views: get: summary: "Retrieve all available views" description: "Retrieve all available views" operationId: "getAllViews" parameters: [] tags: - "views" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Views" /metadata/views/{viewID}: get: summary: "Find view by ID" description: "Returns a single view" operationId: "getViewByID" tags: - "views" parameters: - name: "viewID" in: "path" description: "ID of view to return" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Views" /metadata/nivgeos/{nivgeoID}/views: get: summary: "Find views related to {nivgeoID}" description: "Returns every views related to the nivgeo with ID {nivgeoID}" operationId: "getViewsByNivgeo" tags: - "views" parameters: - name: "nivgeoID" in: "path" description: "ID of the nivgeo related to the searched views" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Views" /metadata/extents/{extentID}/views: get: summary: "Find views related to {extentID}" description: "Returns every views related to the extent with ID {extentID}" operationId: "getViewsByExtent" tags: - "views" parameters: - name: "extentID" in: "path" description: "ID of the extent related to the searched views" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Views" /metadata/extents: get: summary: "Retrieve all available extents" description: "Retrieve all available extents" operationId: "getAllExtents" parameters: [] tags: - "extents" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Extents" /metadata/extents/{extentID}: get: summary: "Find extent by ID" description: "Returns a single extent" operationId: "getExtentByID" tags: - "extents" parameters: - name: "extentID" in: "path" description: "ID of extent to return" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Extents" /metadata/trees: get: summary: "Retrieve all available trees" description: "Retrieve all available trees" operationId: "getAllTrees" parameters: [] tags: - "trees" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Trees" /metadata/trees/{treeID}: get: summary: "Find tree by ID" description: "Returns a single tree" operationId: "getTreeByID" tags: - "trees" parameters: - name: "treeID" in: "path" description: "ID of tree to return" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Trees" /metadata/datasets: get: summary: "Retrieve all available datasets" description: "Retrieve all available datasets" operationId: "getAllDatasets" parameters: [] tags: - "datasets" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Datasets" /metadata/datasets/{datasetID}: get: summary: "Find dataset by ID" description: "Returns a single dataset" operationId: "getDatasetByID" tags: - "datasets" parameters: - name: "datasetID" in: "path" description: "ID of dataset to return" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Datasets" /metadata/indicators: get: summary: "Retrieve all available indicators" description: "Retrieve all available indicators" operationId: "getAllIndicators" parameters: [] tags: - "indicators" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Indicators" /metadata/indicators/{indicatorID}: get: summary: "Find indicator by ID" description: "Returns a single indicator" operationId: "getIndicatorByID" tags: - "indicators" parameters: - name: "indicatorID" in: "path" description: "ID of indicator to return" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Indicators" /metadata/themes/{themeID}/indicators: get: summary: "Find indicators related to {themeID}" description: "Returns every indicators related to the theme with ID {themeID}" operationId: "getIndicatorsByTheme" tags: - "indicators" parameters: - name: "themeID" in: "path" description: "ID of the theme related to the searched indicators" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Indicators" /metadata/trees/{treeID}/themes: get: summary: "Find themes related to {treeID}" description: "Returns every themes related to the tree with ID {treeID}" operationId: "getThemesByTree" tags: - "themes" parameters: - name: "treeID" in: "path" description: "ID of the tree related to the searched themes" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Themes" /metadata/reports: get: summary: "Retrieve all available reports" description: "Retrieve all available reports" operationId: "getAllReports" parameters: [] tags: - "reports" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Reports" /metadata/reports/{reportID}: get: summary: "Find report by ID" description: "Returns a single report" operationId: "getReportByID" tags: - "reports" parameters: - name: "reportID" in: "path" description: "ID of report to return" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Reports" /metadata/reports/{reportID}/chapters: get: summary: "Find chapters related to {reportID}" description: "Returns every chapters related to the report with ID {reportID}" operationId: "getChaptersByReport" tags: - "chapters" parameters: - name: "reportID" in: "path" description: "ID of the report related to the searched chapters" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Chapters" /metadata/chapters/{chapterID}/datavizs: get: summary: "Find datavizs related to {chapterID}" description: "Returns every datavizs related to the chapter with ID {chapterID}" operationId: "getDatavizsByChapter" tags: - "datavizs" parameters: - name: "chapterID" in: "path" description: "ID of the chapter related to the searched datavizs" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Datavizs" /metadata/news: get: summary: "Retrieve all available news" description: "Retrieve all available news" operationId: "getAllNews" parameters: [] tags: - "news" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/News" /metadata/obs: get: summary: "Retrieve all available obs" description: "Retrieve all available obs" operationId: "getAllObs" parameters: [] tags: - "obs" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Obs" /metadata/obs/{observatoryID}: get: summary: "Find observatory by ID" description: "Returns a single observatory" operationId: "getObservatoryByID" tags: - "obs" parameters: - name: "observatoryID" in: "path" description: "ID of observatory to return" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Obs" /metadata/tours: get: summary: "Retrieve all available tours" description: "Retrieve all available tours" operationId: "getAllTours" parameters: [] tags: - "tours" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Tours" /metadata/tours/{tourID}: get: summary: "Find tour by ID" description: "Returns a single tour" operationId: "getTourByID" tags: - "tours" parameters: - name: "tourID" in: "path" description: "ID of tour to return" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Tours" /functions/search: get: summary: "Search some indicators and locations" description: "Search some indicators and locations" externalDocs: description: "Examples" url: "./api_search.html" operationId: "search" tags: - "functions" parameters: - name: "key" in: "query" description: "The term to search" required: true schema: type: "string" - name: "scope" in: "query" description: > "The object type to find * all - all type of objects are search * indic - search return only indicators * geo - search return only geographical references" required: false schema: type: "string" default: all enum: - "all" - "geo" - "indic" - name: "fast" in: "query" description: "If the query has to run fast (for autocompletion). The search is proceed only on one nivgeo for geo and only title for indic." required: false schema: type: "integer" default: 0 enum: - 0 - 1 - name: "nivgeos" in: "query" description: "The id of the nivgeo to search in for geo obj. Only for fast search." required: false schema: type: "string" - name: "lang" in: "query" description: "Language code for search result" required: false schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/SearchResponse" /functions/zoning/sup: get: summary: "Get encompassing zones" description: "Get encompassing zones of a territory" externalDocs: description: "Examples" url: "./api_zonage_englobant.html" operationId: "getEncompassingZoning" tags: - "functions" parameters: - name: "nivgeo" in: "query" description: "Geographical level of current territory" required: true schema: type: "string" - name: "codgeo" in: "query" description: "Code of current territory" required: true schema: type: "string" - name: "view" in: "query" description: "ID of view to search in. Is needed only if the nivgeo topo is PT (points)" required: false schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Territories" /functions/zoning/position: get: summary: "Get encompassing zones" description: "Get encompassing zones of a point" externalDocs: description: "Usage example" url: "./api_zonage_position.html" operationId: "getZonagesFromPosition" tags: - "functions" parameters: - name: "lat" in: "query" description: "Latitude of point" required: true schema: type: "string" - name: "lng" in: "query" description: "Longitude of point" required: true schema: type: "string" - name: "view" in: "query" description: "View to search in" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/Territories" /functions/download/indics: get: summary: Download list of indicators description: Download list of indicators tags: - functions operationId: downloadIndicatorList responses: '200': description: Successful operation content: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: schema: type: string format: binary application/json: schema: type: string default: description: Unexpected error content: text/html: schema: type: string /functions/download/refgeo: get: summary: Download geographic referential data description: Download geographic referential data tags: - functions operationId: downloadRefGeo parameters: - name: nivgeos in: query description: List of geografical levels required: true schema: type: string responses: '200': description: Successful operation content: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: schema: type: string format: binary application/json: schema: type: string default: description: Unexpected error content: text/html: schema: type: string /functions/download/stat: get: summary: Download indicators data description: Download dataset or indicator data. If no indicator set, all indicator data of dataset will be downloaded. tags: - functions operationId: downloadIndicData parameters: - name: nivgeo in: query description: Geographic level, required if view parameter is missing required: false schema: type: string - name: dataset in: query description: ID of dataset required: true schema: type: string - name: indic in: query description: Identifier of indicator (simple id. without dataset) required: false schema: type: string - name: view in: query description: ID of view, required if nivgeo parameter is missing required: false schema: type: string - name: filter in: query description: Keyword \"last\" or a specific year/period to filter the data required: false schema: type: string responses: '200': description: Successful operation content: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: schema: type: string format: binary application/json: schema: type: string default: description: Unexpected error content: text/html: schema: type: string /functions/GC_API_getMillesime.php: post: summary: Find the best geografic level for territories description: Find the best geografic level for territories tags: - functions operationId: getMillesime requestBody: required: true content: application/x-www-form-urlencoded: schema: type: object properties: codgeos: description: "List of geographical codes. Accepted separators are : comma, semicolon, space, tab and line break. Codes may only contain unaccented alphanumeric characters (A to Z and 0 to 9)." type: string required: - codgeos responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/GetMillesimesResponse" /functions/GC_API_agreg.php: post: summary: Aggreg data from nivgeo description: Aggreg data from nivgeo tags: - functions operationId: agregDataService parameters: - name: nivgeobase in: query description: "ID of nivgeo of data to aggreg" schema: type: string - name: nivgeoscibles in: query description: "Comma separated list of nivgeo ids" schema: type: string requestBody: required: true content: application/x-www-form-urlencoded: schema: type: object properties: data: description: "CSV like data" type: string required: - data responses: '200': description: Successful operation content: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: schema: type: string format: binary application/json: schema: type: string default: description: Unexpected error content: text/html: schema: type: string /functions/statdata: get: summary: "Statistical data retrieval" description: "Statistical data retrieval from territories and indicators" externalDocs: description: "Examples" url: "./api_statdata.html" operationId: "statdata" tags: - "functions" parameters: - name: "lang" in: "query" description: "Language code for result" required: false schema: type: "string" - name: "nivgeo" in: "query" description: "Geographical level of the mandatory territory" required: true schema: type: "string" - name: "codgeo" in: "query" description: "Geographical code of the mandatory territory" required: true schema: type: "string" - name: "indics" in: "query" description: "List of indicators defined by [dataset code].[indicator code] delimited by char ','" required: true schema: type: "string" responses: 200: description: "Successful operation" content: application/json: schema: $ref: "#/components/schemas/GetStatDataResponse" components: schemas: Nivgeo: type: "object" properties: c_id_nivgeo: type: "string" c_lib_nivgeo: type: "string" c_source: type: "string" c_ordre: type: "integer" c_topo: type: "string" c_fwk_date: type: "string" c_lang: type: "string" Nivgeos: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: nivgeos: type: array items: $ref: "#/components/schemas/Nivgeo" Nomenc: type: "object" properties: c_id_nomenc: type: "string" c_lang: type: "string" Nomencs: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: nomencs: type: array items: $ref: "#/components/schemas/Nomenc" View: type: "object" properties: c_id_view: type: "string" c_id_nivgeo: type: "string" c_id_extent: type: "string" c_ordre: type: "integer" c_lib_view: type: "string" c_lang: type: "string" Views: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: views: type: array items: $ref: "#/components/schemas/View" Extent: type: "object" properties: c_id_extent: type: "string" c_ordre: type: "integer" c_lib_extent: type: "string" c_lang: type: "string" Extents: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: extents: type: array items: $ref: "#/components/schemas/Extent" Tree: type: "object" properties: c_id_tree: type: "string" c_ordre: type: "integer" c_lib: type: "string" c_lang: type: "string" children: type: array description: Array of sub Themes. items: $ref: "#/components/schemas/Theme" Trees: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: trees: type: array items: $ref: "#/components/schemas/Tree" Dataset: type: "object" properties: c_id_dataset: type: "string" c_lib_dataset: type: "string" c_abstract: type: "string" c_source: type: "string" c_url_dataset: type: "string" c_id_variable: type: "array" items: type: "string" c_type_axis: type: "array" items: type: "string" c_mods: type: "integer" c_lang: type: "string" Datasets: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: datasets: type: array items: $ref: "#/components/schemas/Dataset" Indicator: type: "object" properties: c_id_indicateur: type: "string" c_id_dataset: type: "string" c_lib_indicateur: type: "string" c_lib_indicateur_court: type: "string" c_desc_indicateur: type: "string" c_source: type: "string" c_id_typind: type: "string" c_id_view: type: "array" items: type: "string" c_id_theme: type: "array" items: type: "string" c_precisions: type: "string" c_formule: type: "string" c_formula_indicateur: type: "string" c_indic_assoc: type: "string" c_unite: type: "string" c_url_indicateur: type: "string" c_urllib_indicateur: type: "string" c_url_data: type: "string" c_urllib_data: type: "string" c_lang: type: "string" Indicators: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: indicators: type: array items: $ref: "#/components/schemas/Indicator" Theme: type: "object" properties: c_id_theme: type: "string" c_id_tree: type: "string" c_lib: type: "string" c_desc_theme: type: "string" c_lang: type: "string" children: type: array description: Array of sub Themes. items: $ref: "#/components/schemas/Theme" Themes: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: themes: type: array items: $ref: "#/components/schemas/Theme" Report: type: "object" properties: c_id_report: type: "string" c_ordre: type: "integer" c_lib_report: type: "string" c_description: type: "string" c_lang: type: "string" Reports: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: reports: type: array items: $ref: "#/components/schemas/Report" Chapter: type: "object" properties: c_id_chapter: type: "string" c_id_report: type: "string" c_lib: type: "string" c_tree_path: type: "string" c_lang: type: "string" Chapters: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: chapters: type: array items: $ref: "#/components/schemas/Chapter" Dataviz: type: "object" properties: c_id_dataviz: type: "string" c_title: type: "string" c_source: type: "string" c_subtitle: type: "string" c_lang: type: "string" Datavizs: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: datavizs: type: array items: $ref: "#/components/schemas/Dataviz" New: type: "object" properties: c_id_news: type: "string" c_isindic: type: "integer" c_id_dataset: type: "string" c_id_indicateur: type: "string" c_ordre: type: "integer" c_date_news: type: "string" c_id_view: type: "string" c_lib_news: type: "string" c_lib_long: type: "string" c_desc_news: type: "string" c_content_news: type: "integer" c_urlimg: type: "string" c_lang: type: "string" News: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: news: type: array items: $ref: "#/components/schemas/New" Observatory: type: "object" properties: c_id_obs: type: "string" c_preferred_url: type: "string" c_lib_obs_court: type: "string" c_lib_obs: type: "string" c_description: type: "string" c_lang: type: "string" Obs: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: obs: type: array items: $ref: "#/components/schemas/Observatory" Tour: type: "object" properties: c_id_tour: type: "string" c_lib_tour: type: "string" c_ordre: type: "integer" c_abstract: type: "string" c_lang: type: "string" Tours: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: tours: type: array items: $ref: "#/components/schemas/Tour" DefaultResponse: type: "object" properties: header: type: "object" footer: type: "object" SearchResponse: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: res: type: array items: anyOf: - $ref: "#/components/schemas/Indicator" - $ref: "#/components/schemas/Territory" - $ref: "#/components/schemas/FastSearchObject" FastSearchObject: type: "object" properties: id: type: "string" lib: type: "string" type: type: "string" enum: - "geo" - "indic" Territory: type: "object" properties: codgeo: type: "string" libgeo: type: "string" nivgeo: type: "string" Territories: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: terrList: type: array items: $ref: "#/components/schemas/Territory" MillesimeComparisonItem: type: object properties: nivgeo: type: string diffs: type: array items: type: string MillesimeComparison: type: object properties: best_matches: type: array items: $ref: "#/components/schemas/MillesimeComparisonItem" others: type: array items: $ref: "#/components/schemas/MillesimeComparisonItem" GetMillesimesResponse: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: result: type: object properties: invalid: type: integer comparison: $ref: "#/components/schemas/MillesimeComparison" GetStatDataResponse: allOf: - $ref: "#/components/schemas/DefaultResponse" - type: object properties: content: type: object properties: territories: type: array description: List all the territories with their code and their name. items: $ref: "#/components/schemas/Territory" indicators: type: array items: $ref: "#/components/schemas/Indicator" datasets: type: array items: $ref: "#/components/schemas/Dataset" data: type: array items: $ref: "#/components/schemas/StatDataIndic" StatDataIndic: type: object properties: c_id_indic: type: string c_id_dataset: type: string territories: type: array items: $ref: "#/components/schemas/StatTerritoryValues" StatTerritoryValues: type: object description: Gives all the values of an indicator for a territory. properties: territory: description: The code of the territory. type: string values: type: array items: $ref: "#/components/schemas/StatTerritoryValue" StatTerritoryValue: type: object properties: value: required: true oneOf: - type: string - type: number tAxis: description: If the values are distributed along a temporal axis (e.g values per year), this is the value of the axis (e.g 2020). type: string fAxis: description: If the values are distributed along a filter axis (e.g values related to an age range), this is the value of the axis (e.g "10-20" for 10-20 years old). type: string