From b1e5ebd1e5eb9ddd82b41c67ec15d2f5d6d432ac Mon Sep 17 00:00:00 2001 From: TheoLechemia Date: Thu, 20 Aug 2020 10:56:17 +0200 Subject: [PATCH] Occtax: remove diffusion level --- backend/tests/sample_data.sql | 2 - contrib/occtax/backend/utils.py | 1 - contrib/occtax/data/sample_data.sql | 2 - .../form-param/form-param.dialog.html | 10 - .../form-param/form-param.dialog.ts | 163 ++- .../form-param/form-param.service.ts | 182 +-- .../occurrence/occurrence.component.html | 10 - .../occurrence/occurrence.service.ts | 5 - .../taxa-list/taxa-list.component.html | 5 - .../occtax-map-info.component.html | 11 - .../occtax-map-list/filter/filters-list.ts | 7 - test/Geonature v2.postman_collection.json | 1122 ++++++++--------- test/create_contact.json | 112 +- test/update_contact.json | 129 +- 14 files changed, 860 insertions(+), 901 deletions(-) diff --git a/backend/tests/sample_data.sql b/backend/tests/sample_data.sql index 2af1fc874e..94d13ea1f6 100644 --- a/backend/tests/sample_data.sql +++ b/backend/tests/sample_data.sql @@ -228,7 +228,6 @@ INSERT INTO pr_occtax.t_occurrences_occtax ( id_nomenclature_bio_status, id_nomenclature_naturalness, id_nomenclature_exist_proof, - id_nomenclature_diffusion_level, id_nomenclature_observation_status, id_nomenclature_blurring, determiner, @@ -250,7 +249,6 @@ VALUES ref_nomenclatures.get_id_nomenclature('STATUT_BIO', '1'), ref_nomenclatures.get_id_nomenclature('NATURALITE', '1'), ref_nomenclatures.get_id_nomenclature('PREUVE_EXIST', '0'), - ref_nomenclatures.get_id_nomenclature('NIV_PRECIS', '0'), ref_nomenclatures.get_id_nomenclature('STATUT_OBS', 'Pr'), ref_nomenclatures.get_id_nomenclature('DEE_FLOU', 'NON'), 'Gil', diff --git a/contrib/occtax/backend/utils.py b/contrib/occtax/backend/utils.py index f61288a5b8..30cf79372e 100644 --- a/contrib/occtax/backend/utils.py +++ b/contrib/occtax/backend/utils.py @@ -13,7 +13,6 @@ "id_nomenclature_bio_status", "id_nomenclature_naturalness", "id_nomenclature_exist_proof", - "id_nomenclature_diffusion_level", "id_nomenclature_observation_status", "id_nomenclature_blurring", "id_nomenclature_determination_method", diff --git a/contrib/occtax/data/sample_data.sql b/contrib/occtax/data/sample_data.sql index cd6accb928..9b4223c772 100644 --- a/contrib/occtax/data/sample_data.sql +++ b/contrib/occtax/data/sample_data.sql @@ -200,7 +200,6 @@ INSERT INTO pr_occtax.t_occurrences_occtax ( id_nomenclature_bio_status, id_nomenclature_naturalness, id_nomenclature_exist_proof, - id_nomenclature_diffusion_level, id_nomenclature_observation_status, id_nomenclature_blurring, determiner, @@ -222,7 +221,6 @@ VALUES ref_nomenclatures.get_id_nomenclature('STATUT_BIO', '1'), ref_nomenclatures.get_id_nomenclature('NATURALITE', '1'), ref_nomenclatures.get_id_nomenclature('PREUVE_EXIST', '0'), - ref_nomenclatures.get_id_nomenclature('NIV_PRECIS', '0'), ref_nomenclatures.get_id_nomenclature('STATUT_OBS', 'Pr'), ref_nomenclatures.get_id_nomenclature('DEE_FLOU', 'NON'), 'Gil', diff --git a/contrib/occtax/frontend/app/occtax-form/form-param/form-param.dialog.html b/contrib/occtax/frontend/app/occtax-form/form-param/form-param.dialog.html index 3d34d34ad9..266ff35c5a 100644 --- a/contrib/occtax/frontend/app/occtax-form/form-param/form-param.dialog.html +++ b/contrib/occtax/frontend/app/occtax-form/form-param/form-param.dialog.html @@ -294,16 +294,6 @@

-
- - -
-
diff --git a/contrib/occtax/frontend/app/occtax-form/form-param/form-param.dialog.ts b/contrib/occtax/frontend/app/occtax-form/form-param/form-param.dialog.ts index f077c6edb9..565dfee9a4 100644 --- a/contrib/occtax/frontend/app/occtax-form/form-param/form-param.dialog.ts +++ b/contrib/occtax/frontend/app/occtax-form/form-param/form-param.dialog.ts @@ -1,39 +1,63 @@ import { Component, OnInit } from "@angular/core"; -import { animate, state, style, transition, trigger } from '@angular/animations'; -import { MatDialogRef } from '@angular/material'; +import { + animate, + state, + style, + transition, + trigger, +} from "@angular/animations"; +import { MatDialogRef } from "@angular/material"; import { FormBuilder, FormGroup, Validators } from "@angular/forms"; import { combineLatest } from "rxjs"; import { filter, map } from "rxjs/operators"; -import { ModuleConfig } from "../../module.config"; -import { OcctaxFormMapService } from '../map/map.service'; -import { OcctaxFormReleveService } from '../releve/releve.service'; -import { OcctaxFormOccurrenceService } from '../occurrence/occurrence.service'; -import { OcctaxFormParamService } from './form-param.service'; - +import { ModuleConfig } from "../../module.config"; +import { OcctaxFormMapService } from "../map/map.service"; +import { OcctaxFormReleveService } from "../releve/releve.service"; +import { OcctaxFormOccurrenceService } from "../occurrence/occurrence.service"; +import { OcctaxFormParamService } from "./form-param.service"; @Component({ selector: "pnx-occtax-form-param", templateUrl: "./form-param.dialog.html", styleUrls: ["./form-param.dialog.scss"], animations: [ - trigger('detailExpand', [ - state('collapsed', style({height: '0px', minHeight: '0', margin: '-1px', overflow: 'hidden', padding: '0'})), - state('expanded', style({height: '*'})), - transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')), + trigger("detailExpand", [ + state( + "collapsed", + style({ + height: "0px", + minHeight: "0", + margin: "-1px", + overflow: "hidden", + padding: "0", + }) + ), + state("expanded", style({ height: "*" })), + transition( + "expanded <=> collapsed", + animate("225ms cubic-bezier(0.4, 0.0, 0.2, 1)") + ), ]), ], }) export class OcctaxFormParamDialog implements OnInit { - public occtaxConfig: any; public paramsForm: FormGroup; public selectedIndex: number = null; - public state: string = 'collapsed'; + public state: string = "collapsed"; - get geometryParamForm() { return this.paramsForm.get('geometry'); } - get releveParamForm() { return this.paramsForm.get('releve'); } - get occurrenceParamForm() { return this.paramsForm.get('occurrence'); } - get countingParamForm() { return this.paramsForm.get('counting'); } + get geometryParamForm() { + return this.paramsForm.get("geometry"); + } + get releveParamForm() { + return this.paramsForm.get("releve"); + } + get occurrenceParamForm() { + return this.paramsForm.get("occurrence"); + } + get countingParamForm() { + return this.paramsForm.get("counting"); + } constructor( public dialogRef: MatDialogRef, @@ -45,22 +69,31 @@ export class OcctaxFormParamDialog implements OnInit { ) { this.occtaxConfig = ModuleConfig; } - - ngOnInit() { + ngOnInit() { this.paramsForm = this.fb.group({ - geometry:null, + geometry: null, releve: this.fb.group({ id_dataset: null, date_min: null, date_max: null, - hour_min: [null, Validators.pattern("^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$")], - hour_max: [null, Validators.pattern("^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$")], + hour_min: [ + null, + Validators.pattern( + "^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$" + ), + ], + hour_max: [ + null, + Validators.pattern( + "^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$" + ), + ], comment: null, id_nomenclature_obs_technique: null, observers: null, observers_txt: null, - id_nomenclature_grp_typ: null + id_nomenclature_grp_typ: null, }), occurrence: this.fb.group({ id_nomenclature_obs_meth: null, @@ -69,13 +102,12 @@ export class OcctaxFormParamDialog implements OnInit { id_nomenclature_naturalness: null, id_nomenclature_exist_proof: null, id_nomenclature_observation_status: null, - id_nomenclature_diffusion_level: null, id_nomenclature_blurring: null, id_nomenclature_source_status: null, determiner: null, id_nomenclature_determination_method: null, sample_number_proof: null, - comment: null + comment: null, }), counting: this.fb.group({ id_nomenclature_life_stage: null, @@ -83,41 +115,56 @@ export class OcctaxFormParamDialog implements OnInit { id_nomenclature_obj_count: null, id_nomenclature_type_count: null, count_min: null, - count_max: null - }) + count_max: null, + }), }); - + this.paramsForm.patchValue(this.occtaxFormParamService.parameters); //a chaque changement du formulairen on patch le service des paramètres this.paramsForm.valueChanges - .pipe( - filter(()=>this.paramsForm.valid) - ) - .subscribe(values=>this.occtaxFormParamService.parameters = values); + .pipe(filter(() => this.paramsForm.valid)) + .subscribe((values) => (this.occtaxFormParamService.parameters = values)); //Observe l'état des switchs pour activer ou non le formulaire - this.occtaxFormParamService.releveState - .subscribe((value: boolean)=>{value ? this.paramsForm.get('releve').enable() : this.paramsForm.get('releve').disable()}); - this.occtaxFormParamService.occurrenceState - .subscribe((value: boolean)=>{value ? this.paramsForm.get('occurrence').enable() : this.paramsForm.get('occurrence').disable()}); - this.occtaxFormParamService.countingState - .subscribe((value: boolean)=>{value ? this.paramsForm.get('counting').enable() : this.paramsForm.get('counting').disable()}); + this.occtaxFormParamService.releveState.subscribe((value: boolean) => { + value + ? this.paramsForm.get("releve").enable() + : this.paramsForm.get("releve").disable(); + }); + this.occtaxFormParamService.occurrenceState.subscribe((value: boolean) => { + value + ? this.paramsForm.get("occurrence").enable() + : this.paramsForm.get("occurrence").disable(); + }); + this.occtaxFormParamService.countingState.subscribe((value: boolean) => { + value + ? this.paramsForm.get("counting").enable() + : this.paramsForm.get("counting").disable(); + }); //On observe les cases cochées pour savoir quel onglet affiché //Uniquement si un seul switch est activé combineLatest( - this.occtaxFormParamService.geometryState, - this.occtaxFormParamService.releveState, - this.occtaxFormParamService.occurrenceState, + this.occtaxFormParamService.geometryState, + this.occtaxFormParamService.releveState, + this.occtaxFormParamService.occurrenceState, this.occtaxFormParamService.countingState ) .pipe( - filter(([geometryState, releveState, occurrenceState, countingState])=>{ - //si un unique switch est activé - return ((geometryState ? 1 : 0) + (releveState ? 1 : 0) + (occurrenceState ? 1 : 0) + (countingState ? 1 : 0)) === 1 - }), - map(([geometryState, releveState, occurrenceState, countingState])=>{ + filter( + ([geometryState, releveState, occurrenceState, countingState]) => { + //si un unique switch est activé + return ( + (geometryState ? 1 : 0) + + (releveState ? 1 : 0) + + (occurrenceState ? 1 : 0) + + (countingState ? 1 : 0) === + 1 + ); + } + ), + map(([geometryState, releveState, occurrenceState, countingState]) => { //convertit la case coché en index de tab à activer if (geometryState) { return 0; @@ -133,24 +180,28 @@ export class OcctaxFormParamDialog implements OnInit { } }) ) - .subscribe(index=>this.selectedIndex = index) + .subscribe((index) => (this.selectedIndex = index)); } geometryFormMapper() { - this.paramsForm.get('geometry').patchValue(this.occtaxFormMapService.geometry.value); + this.paramsForm + .get("geometry") + .patchValue(this.occtaxFormMapService.geometry.value); } releveFormMapper() { - this.paramsForm.get('releve').patchValue(this.occtaxFormReleveService.propertiesForm.value); + this.paramsForm + .get("releve") + .patchValue(this.occtaxFormReleveService.propertiesForm.value); } occurrenceFormMapper() { - this.paramsForm.get('occurrence').patchValue(this.occtaxFormOccurrenceService.form.value); + this.paramsForm + .get("occurrence") + .patchValue(this.occtaxFormOccurrenceService.form.value); } - collapse(){ - this.state = (this.state === 'collapsed' ? 'expanded' : 'collapsed'); + collapse() { + this.state = this.state === "collapsed" ? "expanded" : "collapsed"; } - - -} \ No newline at end of file +} diff --git a/contrib/occtax/frontend/app/occtax-form/form-param/form-param.service.ts b/contrib/occtax/frontend/app/occtax-form/form-param/form-param.service.ts index fe22675a4c..fcd1adc9b4 100644 --- a/contrib/occtax/frontend/app/occtax-form/form-param/form-param.service.ts +++ b/contrib/occtax/frontend/app/occtax-form/form-param/form-param.service.ts @@ -1,96 +1,93 @@ import { Injectable } from "@angular/core"; -import { BehaviorSubject } from 'rxjs'; +import { BehaviorSubject } from "rxjs"; import { ModuleConfig } from "../../module.config"; interface OCCTAX_FORM_PARAM { - geometry?: any, + geometry?: any; releve?: { - id_dataset?: number, - id_digitiser?: number, - date_min?: string, - date_max?: string, - hour_min?: string, - hour_max?: string, - altitude_min?: number, - altitude_max?: number, - meta_device_entry?: string, - comment?: string, - id_nomenclature_obs_technique?: number, - observers?: Array, - observers_txt?: string, - id_nomenclature_grp_typ?: number - }, + id_dataset?: number; + id_digitiser?: number; + date_min?: string; + date_max?: string; + hour_min?: string; + hour_max?: string; + altitude_min?: number; + altitude_max?: number; + meta_device_entry?: string; + comment?: string; + id_nomenclature_obs_technique?: number; + observers?: Array; + observers_txt?: string; + id_nomenclature_grp_typ?: number; + }; occurrence?: { - id_nomenclature_obs_meth?: number, - id_nomenclature_bio_condition?: number, - id_nomenclature_bio_status?: number, - id_nomenclature_naturalness?: number, - id_nomenclature_exist_proof?: number, - id_nomenclature_observation_status?: number, - id_nomenclature_diffusion_level?: number, - id_nomenclature_blurring?: number, - id_nomenclature_source_status?: number, - determiner?: string, - id_nomenclature_determination_method?: number, - sample_number_proof?: string, - comment?: string - }, + id_nomenclature_obs_meth?: number; + id_nomenclature_bio_condition?: number; + id_nomenclature_bio_status?: number; + id_nomenclature_naturalness?: number; + id_nomenclature_exist_proof?: number; + id_nomenclature_observation_status?: number; + id_nomenclature_blurring?: number; + id_nomenclature_source_status?: number; + determiner?: string; + id_nomenclature_determination_method?: number; + sample_number_proof?: string; + comment?: string; + }; counting?: { - id_nomenclature_life_stage: number, - id_nomenclature_sex: number, - id_nomenclature_obj_count: number, - id_nomenclature_type_count: number, - count_min: number, - count_max: number - } -}; + id_nomenclature_life_stage: number; + id_nomenclature_sex: number; + id_nomenclature_obj_count: number; + id_nomenclature_type_count: number; + count_min: number; + count_max: number; + }; +} @Injectable() export class OcctaxFormParamService { - private occtaxConfig = ModuleConfig; parameters: OCCTAX_FORM_PARAM = { - geometry: null, - releve: { - id_dataset: null, - id_digitiser: null, - date_min: null, - date_max: null, - hour_min: null, - hour_max: null, - altitude_min: null, - altitude_max: null, - meta_device_entry: null, - comment: null, - id_nomenclature_obs_technique: null, - observers: null, - observers_txt: null, - id_nomenclature_grp_typ: null - }, - occurrence: { - id_nomenclature_obs_meth: null, - id_nomenclature_bio_condition: null, - id_nomenclature_bio_status: null, - id_nomenclature_naturalness: null, - id_nomenclature_exist_proof: null, - id_nomenclature_observation_status: null, - id_nomenclature_diffusion_level: null, - id_nomenclature_blurring: null, - id_nomenclature_source_status: null, - determiner: null, - id_nomenclature_determination_method: null, - sample_number_proof: null, - comment: null - }, - counting: { - id_nomenclature_life_stage: null, - id_nomenclature_sex: null, - id_nomenclature_obj_count: null, - id_nomenclature_type_count: null, - count_min: null, - count_max: null - } - }; + geometry: null, + releve: { + id_dataset: null, + id_digitiser: null, + date_min: null, + date_max: null, + hour_min: null, + hour_max: null, + altitude_min: null, + altitude_max: null, + meta_device_entry: null, + comment: null, + id_nomenclature_obs_technique: null, + observers: null, + observers_txt: null, + id_nomenclature_grp_typ: null, + }, + occurrence: { + id_nomenclature_obs_meth: null, + id_nomenclature_bio_condition: null, + id_nomenclature_bio_status: null, + id_nomenclature_naturalness: null, + id_nomenclature_exist_proof: null, + id_nomenclature_observation_status: null, + id_nomenclature_blurring: null, + id_nomenclature_source_status: null, + determiner: null, + id_nomenclature_determination_method: null, + sample_number_proof: null, + comment: null, + }, + counting: { + id_nomenclature_life_stage: null, + id_nomenclature_sex: null, + id_nomenclature_obj_count: null, + id_nomenclature_type_count: null, + count_min: null, + count_max: null, + }, + }; geometryState: BehaviorSubject = new BehaviorSubject(false); releveState: BehaviorSubject = new BehaviorSubject(false); @@ -111,39 +108,42 @@ export class OcctaxFormParamService { } get numberOfActive() { - return (this.geometryState.getValue() ? 1 : 0) + (this.releveState.getValue() ? 1 : 0) + (this.occurrenceState.getValue() ? 1 : 0) + (this.countingState.getValue() ? 1 : 0); + return ( + (this.geometryState.getValue() ? 1 : 0) + + (this.releveState.getValue() ? 1 : 0) + + (this.occurrenceState.getValue() ? 1 : 0) + + (this.countingState.getValue() ? 1 : 0) + ); } - constructor() { } + constructor() {} get(element: string) { - let keys = element.split('.'); + let keys = element.split("."); let temp_value = this.parameters; let value = null; - //vérification de l'activation du paramètre en config occtax + //vérification de l'activation du paramètre en config occtax if (this.occtaxConfig.DISPLAY_SETTINGS_TOOLS) { - - for (let i=0; i Ajout d'un taxon

-
- - -
-
diff --git a/contrib/occtax/frontend/app/occtax-form/occurrence/occurrence.service.ts b/contrib/occtax/frontend/app/occtax-form/occurrence/occurrence.service.ts index 5939cb809b..2dd3fb8057 100644 --- a/contrib/occtax/frontend/app/occtax-form/occurrence/occurrence.service.ts +++ b/contrib/occtax/frontend/app/occtax-form/occurrence/occurrence.service.ts @@ -46,7 +46,6 @@ export class OcctaxFormOccurrenceService { id_nomenclature_naturalness: null, id_nomenclature_exist_proof: null, id_nomenclature_observation_status: null, - id_nomenclature_diffusion_level: null, id_nomenclature_blurring: null, id_nomenclature_source_status: null, determiner: [null, Validators.required], @@ -195,10 +194,6 @@ export class OcctaxFormOccurrenceService { this.occtaxParamS.get( "occurrence.id_nomenclature_observation_status" ) || DATA["STATUT_OBS"], - id_nomenclature_diffusion_level: - this.occtaxParamS.get( - "occurrence.id_nomenclature_diffusion_level" - ) || DATA["NIV_PRECIS"], id_nomenclature_blurring: this.occtaxParamS.get("occurrence.id_nomenclature_blurring") || DATA["DEE_FLOU"], diff --git a/contrib/occtax/frontend/app/occtax-form/taxa-list/taxa-list.component.html b/contrib/occtax/frontend/app/occtax-form/taxa-list/taxa-list.component.html index cc3fefcf60..0a6beac8b3 100644 --- a/contrib/occtax/frontend/app/occtax-form/taxa-list/taxa-list.component.html +++ b/contrib/occtax/frontend/app/occtax-form/taxa-list/taxa-list.component.html @@ -118,11 +118,6 @@
{{ occtaxTaxaListService.getLibelleByID(occurrence?.id_nomenclature_source_status) || "-" }}
-
-
{{ 'Taxon.DiffusionLevel' | translate }} :
-
{{ occtaxTaxaListService.getLibelleByID(occurrence?.id_nomenclature_diffusion_level) || "-" }}
-
-
{{ 'Taxon.Blurring' | translate }} :
{{ occtaxTaxaListService.getLibelleByID(occurrence?.id_nomenclature_blurring) || "-" }}
diff --git a/contrib/occtax/frontend/app/occtax-map-info/occtax-map-info.component.html b/contrib/occtax/frontend/app/occtax-map-info/occtax-map-info.component.html index 9ae5214dc7..541538e454 100644 --- a/contrib/occtax/frontend/app/occtax-map-info/occtax-map-info.component.html +++ b/contrib/occtax/frontend/app/occtax-map-info/occtax-map-info.component.html @@ -262,17 +262,6 @@

Relevé

-
-
- - -
-
diff --git a/contrib/occtax/frontend/app/occtax-map-list/filter/filters-list.ts b/contrib/occtax/frontend/app/occtax-map-list/filter/filters-list.ts index ac88d1c922..0e4a8de6dc 100644 --- a/contrib/occtax/frontend/app/occtax-map-list/filter/filters-list.ts +++ b/contrib/occtax/frontend/app/occtax-map-list/filter/filters-list.ts @@ -81,13 +81,6 @@ export const FILTERSLIST = [ attribut_name: "non_digital_proof", required: false, }, - { - type_widget: "nomenclature", - attribut_label: "Niveau de diffusion", - attribut_name: "id_nomenclature_diffusion_level", - code_nomenclature_type: "NIV_PRECIS", - required: false, - }, { type_widget: "nomenclature", attribut_label: "Statut source", diff --git a/test/Geonature v2.postman_collection.json b/test/Geonature v2.postman_collection.json index 98e1ec4049..3804ee88ad 100644 --- a/test/Geonature v2.postman_collection.json +++ b/test/Geonature v2.postman_collection.json @@ -1,576 +1,548 @@ { - "variables": [], - "info": { - "name": "Geonature v2", - "_postman_id": "cded4135-a800-2752-4888-307196ec8f51", - "description": "GeoNature is a web application for naturalist data management developed by Ecrins National Park and Cevennes Nation Park.\nHere is the documentation about its web API.\n\nMore information :\nhttp://geonature.fr/\nhttps://github.com/PnX-SI/GeoNature", - "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" - }, - "item": [ - { - "name": "Occurrence de taxons", - "description": "Routes of 'Occurrence de taxon' module.\n\nAccess to the naturalist observations entered in the 'Occurrence de taxon' module.\n\nAll data are exchanges in GeoJson format", - "item": [ - { - "name": "occtax/vreleve?cd_nom=351", - "request": { - "url": { - "raw": "http://localhost:8000/contact/vreleve?cd_nom=351&date_up=2016-01-01&date_low=2018-01-01&date_eq=2017-01-01&observer=1&observer=3", - "protocol": "http", - "host": [ - "localhost" - ], - "port": "8000", - "path": [ - "contact", - "vreleve" - ], - "query": [ - { - "key": "cd_nom", - "value": "351", - "equals": true - }, - { - "key": "date_up", - "value": "2016-01-01", - "equals": true - }, - { - "key": "date_low", - "value": "2018-01-01", - "equals": true - }, - { - "key": "date_eq", - "value": "2017-01-01", - "equals": true - }, - { - "key": "observer", - "value": "1", - "equals": true - }, - { - "key": "observer", - "value": "3", - "equals": true - } - ], - "variable": [] - }, - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "Return all the observations in GeoJson format with the current filter" - }, - "response": [] - }, - { - "name": "occtax/vrelevecontact", - "request": { - "url": { - "raw": "http://localhost:8000/contact/vrelevecontact?cd_nom=67111&orderby=cd_nom&order=desc&limit=1", - "protocol": "http", - "host": [ - "localhost" - ], - "port": "8000", - "path": [ - "contact", - "vrelevecontact" - ], - "query": [ - { - "key": "cd_nom", - "value": "67111", - "equals": true - }, - { - "key": "orderby", - "value": "cd_nom", - "equals": true - }, - { - "key": "order", - "value": "desc", - "equals": true - }, - { - "key": "limit", - "value": "1", - "equals": true - } - ], - "variable": [] - }, - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" - }, - "response": [] - }, - { - "name": "occtax/releve/1", - "request": { - "url": "http://localhost:8000/contact/releve/1", - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" - }, - "response": [] - }, - { - "name": "occtax/releves", - "request": { - "url": "http://localhost:8000/contact/releves", - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "Return all releves" - }, - "response": [] - }, - { - "name": "occtax/occurrences", - "request": { - "url": "http://localhost:8000/contact/occurrences", - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "Return all occurences" - }, - "response": [] - }, - { - "name": "occtax/releve", - "request": { - "url": "http://localhost:8000/contact/releve", - "method": "POST", - "header": [ - { - "key": "Authorization", - "value": "Basic Og==" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"geometry\": {\"type\": \"Point\", \"coordinates\": [4.563980749, 45.19474135]},\n \"properties\": { \n \"id_dataset\": 1,\n \"id_digitiser\": 1, \n \"date_min\": \"2017-01-01 00:00:00\",\n \"date_max\": \"2017-01-01 00:00:00\", \n \"altitude_min\": 1500,\n \"altitude_max\": 1565, \n \"meta_device_entry\": \"web\",\n \"comment\": \"exemple test comment\",\n \"observers\": [1,2,3],\n \"id_releve_contact\": 7,\n \"t_occurrences_contact\": [\n {\n \"id_nomenclature_obs_technique\": 343,\n \"id_nomenclature_obs_meth\": 65,\n \"id_nomenclature_bio_condition\": 177,\n \"id_nomenclature_bio_status\": 30,\n \"id_nomenclature_naturalness\": 182,\n \"id_nomenclature_exist_proof\": 91,\n \"id_nomenclature_valid_status\": 347, \n \"id_nomenclature_diffusion_level\": 163,\n \"id_validator\": 1,\n \"determiner\": \"gil\",\n \"determination_method\": \"gees\", \n \"cd_nom\": 60612,\n \"nom_cite\": \"Lynx Bor\\u00e9al\",\n \"meta_v_taxref\": \"Taxref V9.0\",\n \"sample_number_proof\": \"Herbier_Dentant-15-37869\", \n \"digital_proof\": \"\", \n \"non_digital_proof\": \"plante en herbier\",\n \"comment\": \"MODIF\",\n \"cor_counting_contact\": [\n {\n \"id_nomenclature_life_stage\": 4,\n \"id_nomenclature_sex\": 190,\n \"id_nomenclature_obj_count\": 166,\n \"id_nomenclature_type_count\": 107, \n \"count_min\": 15,\n \"count_max\": 20\n },\n {\n \"id_nomenclature_life_stage\": 4,\n \"id_nomenclature_sex\": 191,\n \"id_nomenclature_obj_count\": 166,\n \"id_nomenclature_type_count\": 107, \n \"count_min\": 1,\n \"count_max\": 1\n }\n ] \n }\n ] \n }\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "occtax/releveWithObserversTxt", - "request": { - "url": "http://localhost:8000/contact/releve", - "method": "POST", - "header": [ - { - "key": "Authorization", - "value": "Basic Og==" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"geometry\": {\"type\": \"Point\", \"coordinates\": [4.563980749, 45.19474135]},\n \"properties\": { \n \"id_dataset\": 1,\n \"id_digitiser\": 1, \n \"date_min\": \"2017-01-01 00:00:00\",\n \"date_max\": \"2017-01-01 00:00:00\", \n \"altitude_min\": 1500,\n \"altitude_max\": 1565, \n \"meta_device_entry\": \"web\",\n \"comment\": \"exemple test comment\",\n \"observers_txt\":\"Super Obs, Pouet\",\n \"id_releve_contact\": 7,\n \"t_occurrences_contact\": [\n {\n \"id_nomenclature_obs_technique\": 343,\n \"id_nomenclature_obs_meth\": 65,\n \"id_nomenclature_bio_condition\": 177,\n \"id_nomenclature_bio_status\": 30,\n \"id_nomenclature_naturalness\": 182,\n \"id_nomenclature_exist_proof\": 91,\n \"id_nomenclature_valid_status\": 347, \n \"id_nomenclature_diffusion_level\": 163,\n \"id_validator\": 1,\n \"determiner\": \"gil\",\n \"determination_method\": \"gees\", \n \"cd_nom\": 60612,\n \"nom_cite\": \"Lynx Bor\\u00e9al\",\n \"meta_v_taxref\": \"Taxref V9.0\",\n \"sample_number_proof\": \"Herbier_Dentant-15-37869\", \n \"digital_proof\": \"\", \n \"non_digital_proof\": \"plante en herbier\",\n \"comment\": \"MODIF\",\n \"cor_counting_contact\": [\n {\n \"id_nomenclature_life_stage\": 4,\n \"id_nomenclature_sex\": 190,\n \"id_nomenclature_obj_count\": 166,\n \"id_nomenclature_type_count\": 107, \n \"count_min\": 15,\n \"count_max\": 20\n },\n {\n \"id_nomenclature_life_stage\": 4,\n \"id_nomenclature_sex\": 191,\n \"id_nomenclature_obj_count\": 166,\n \"id_nomenclature_type_count\": 107, \n \"count_min\": 1,\n \"count_max\": 1\n }\n ] \n }\n ] \n }\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "occtax/releve/7", - "request": { - "url": "http://localhost:8000/contact/releve/7", - "method": "DELETE", - "header": [], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" - }, - "response": [] - }, - { - "name": "/occtax/releve/occurrence_counting/21", - "request": { - "url": "http://localhost:8000/contact/releve/occurrence_counting/21", - "method": "DELETE", - "header": [], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" - }, - "response": [] - }, - { - "name": "occtax/releve/occurrence/21", - "request": { - "url": "http://localhost:8000/contact/releve/occurrence/21", - "method": "DELETE", - "header": [], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "Metadata", - "description": "Routes of the metadata module.\nInformations about datasets, acqusition framework, protocols, programs...", - "item": [ - { - "name": "meta/parameters//", - "request": { - "url": "http://localhost:8000/meta/parameters/taxref_version", - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "Return the value of the parameter for an organism.\nThe second parameter is optional (return the default paramater value)" - }, - "response": [] - }, - { - "name": "meta/datasets", - "request": { - "url": "http://localhost:8000/meta/datasets", - "method": "GET", - "header": [ - { - "key": "Cookie", - "value": "token=eyJleHAiOjE1MTU2NjY4NzIsImFsZyI6IkhTMjU2IiwiaWF0IjoxNTE1NjU5NjcyfQ.eyJpZGVudGlmaWFudCI6ImFnZW50IiwiaWRfYXBwbGljYXRpb24iOjE0LCJpZF9vcmdhbmlzbWUiOi0xLCJpZF9kcm9pdF9tYXgiOjMsImlkX3JvbGUiOjJ9.kwj4kOifWDo4WHMQXA2X4_lC3sQBUQuT6eRN46IDIVw" - } - ], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "Liste des datasets" - }, - "response": [] - }, - { - "name": "meta/aquisition_framework_mtd/", - "request": { - "url": "http://localhost:8000/meta/aquisition_framework_mtd/60dac805-2568-13eb-e053-2614a8c0d040", - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "Post an acquisition framework using the MTD webservice\nParameter:\nuuid_af: uuid of the acquisition framework" - }, - "response": [] - }, - { - "name": "meta/dataset_mtd//", - "request": { - "url": "http://localhost:8000/meta/dataset_mtd/9188", - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "Post all the datasets created by a user using the MTD webservice\nparameter:\nid_user: an user ID send back by INPN CAS authentification\nid_organism:(Optional) a organism ID send back by INPN CAS authentification " - }, - "response": [] - } - ] - }, - { - "name": "Nomenclatures", - "description": "Routes of the nomenclature sub module.\n\nThis submodule is use to get the dropdown list's values of the differents forms.\nIn GeoNature we use the nomenclature of the SINP: http://standards-sinp.mnhn.fr/nomenclature/\n\nhttps://github.com/PnX-SI/Nomenclature-api-module", - "item": [ - { - "name": "nomenclatures/nomenclature/STADE_VIE?regne=Animalia", - "request": { - "url": { - "raw": "http://localhost:8000/nomenclatures/nomenclature/STADE_VIE?regne=Animalia", - "protocol": "http", - "host": [ - "localhost" - ], - "port": "8000", - "path": [ - "nomenclatures", - "nomenclature", - "STADE_VIE" - ], - "query": [ - { - "key": "regne", - "value": "Animalia", - "equals": true - } - ], - "variable": [] - }, - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "Return all nomenclatures for one type from its mnemonique code " - }, - "response": [] - }, - { - "name": "nomenclatures/nomenclatures?code_type=TYP_DENBR&code_type=STADE_VIE", - "request": { - "url": { - "raw": "http://localhost:8000/nomenclatures/nomenclatures?code_type=TYP_DENBR&code_type=STADE_VIE", - "protocol": "http", - "host": [ - "localhost" - ], - "port": "8000", - "path": [ - "nomenclatures", - "nomenclatures" - ], - "query": [ - { - "key": "code_type", - "value": "TYP_DENBR", - "equals": true - }, - { - "key": "code_type", - "value": "STADE_VIE", - "equals": true - } - ], - "variable": [] - }, - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "Return all nomenclature for several code types" - }, - "response": [] - } - ] - }, - { - "name": "Ref_geo", - "description": "Routes of the geographic referential module", - "item": [ - { - "name": "geo/info", - "request": { - "url": "http://localhost:8000/geo/info", - "method": "POST", - "header": [ - { - "key": "conte", - "value": "application/json" - }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"geometry\": {\"type\": \"Point\", \"coordinates\": [3.6054, 44.31736339]}\n}" - }, - "description": "From a posted geojson, the route return the municipalities intersected and the altitude min/max" - }, - "response": [] - }, - { - "name": "geo/areas - alltype", - "request": { - "url": "http://localhost:8000/geo/areas", - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"geometry\": {\"type\": \"Point\", \"coordinates\": [3.6054, 44.31736339]}\n}" - }, - "description": "From a posted geojson, the route return all the area intersected from l_areas" - }, - "response": [] - }, - { - "name": "geo/areas - filterby communes", - "request": { - "url": "http://localhost:8000/geo/areas", - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"geometry\": {\"type\": \"Point\", \"coordinates\": [3.6054, 44.31736339]},\n \"id_type\":25\n}" - }, - "description": "From a posted geojson, the route return all the municipalities intersected" - }, - "response": [] - } - ] - }, - { - "name": "Users", - "description": "Routes of the user referential module", - "item": [ - { - "name": "users/menu/9", - "request": { - "url": "http://localhost:8000/users/menu/9", - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "" - }, - "description": "Return all role for one menu" - }, - "response": [] - }, - { - "name": "users/role", - "request": { - "url": "http://localhost:8000/users/role", - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n\t\"id_role\":45,\n\t\"identifiant\": \"test\",\n\t\"nom_role\": \"test.test\",\n\t\"prenom_role\": \"nom test\",\n\t\"id_organisme\": 1\n}" - }, - "description": "Post a user" - }, - "response": [] - } - ] - }, - { - "name": "Taxonomy", - "description": "Routes of Taxhub app.\nFrom taxonomie schema in database", - "item": [ - { - "name": "Taxon autocomplete", - "request": { - "url": { - "raw": "http://localhost:5000/api/taxref/allnamebylist/100?search_name=abl%20an", - "protocol": "http", - "host": [ - "localhost" - ], - "port": "5000", - "path": [ - "api", - "taxref", - "allnamebylist", - "100" - ], - "query": [ - { - "key": "search_name", - "value": "abl%20an", - "equals": true, - "description": "" - } - ], - "variable": [] - }, - "method": "GET", - "header": [], - "body": {}, - "description": "Return all taxons matching with \"search_name\"='abl' in the list 102" - }, - "response": [] - }, - { - "name": "Kingdom and group2Inpn", - "request": { - "url": "http://localhost:5000/api/taxref/regnewithgroupe2", - "method": "GET", - "header": [], - "body": {}, - "description": "Retunr all the kingdom and their 'group2_inpn'" - }, - "response": [] - }, - { - "name": "Taxon info", - "request": { - "url": "http://localhost:5000/api/taxref/212", - "method": "GET", - "header": [], - "body": {}, - "description": "Return the info of a taxon from its cd_nom" - }, - "response": [] - }, - { - "name": "Bib_nom info", - "request": { - "url": "http://localhost:5000/api/taxref/212", - "method": "GET", - "header": [], - "body": {}, - "description": "Return attributes info from a cd_nom.\nAttributes are complementary info of a taxon for each structure (ex: patrimonial, description locale...)\nWithout the id_attribut parameter, return all the attributes" - }, - "response": [] - } - ] - } - ] -} \ No newline at end of file + "variables": [], + "info": { + "name": "Geonature v2", + "_postman_id": "cded4135-a800-2752-4888-307196ec8f51", + "description": "GeoNature is a web application for naturalist data management developed by Ecrins National Park and Cevennes Nation Park.\nHere is the documentation about its web API.\n\nMore information :\nhttp://geonature.fr/\nhttps://github.com/PnX-SI/GeoNature", + "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" + }, + "item": [ + { + "name": "Occurrence de taxons", + "description": "Routes of 'Occurrence de taxon' module.\n\nAccess to the naturalist observations entered in the 'Occurrence de taxon' module.\n\nAll data are exchanges in GeoJson format", + "item": [ + { + "name": "occtax/vreleve?cd_nom=351", + "request": { + "url": { + "raw": "http://localhost:8000/contact/vreleve?cd_nom=351&date_up=2016-01-01&date_low=2018-01-01&date_eq=2017-01-01&observer=1&observer=3", + "protocol": "http", + "host": ["localhost"], + "port": "8000", + "path": ["contact", "vreleve"], + "query": [ + { + "key": "cd_nom", + "value": "351", + "equals": true + }, + { + "key": "date_up", + "value": "2016-01-01", + "equals": true + }, + { + "key": "date_low", + "value": "2018-01-01", + "equals": true + }, + { + "key": "date_eq", + "value": "2017-01-01", + "equals": true + }, + { + "key": "observer", + "value": "1", + "equals": true + }, + { + "key": "observer", + "value": "3", + "equals": true + } + ], + "variable": [] + }, + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "Return all the observations in GeoJson format with the current filter" + }, + "response": [] + }, + { + "name": "occtax/vrelevecontact", + "request": { + "url": { + "raw": "http://localhost:8000/contact/vrelevecontact?cd_nom=67111&orderby=cd_nom&order=desc&limit=1", + "protocol": "http", + "host": ["localhost"], + "port": "8000", + "path": ["contact", "vrelevecontact"], + "query": [ + { + "key": "cd_nom", + "value": "67111", + "equals": true + }, + { + "key": "orderby", + "value": "cd_nom", + "equals": true + }, + { + "key": "order", + "value": "desc", + "equals": true + }, + { + "key": "limit", + "value": "1", + "equals": true + } + ], + "variable": [] + }, + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "occtax/releve/1", + "request": { + "url": "http://localhost:8000/contact/releve/1", + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "occtax/releves", + "request": { + "url": "http://localhost:8000/contact/releves", + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "Return all releves" + }, + "response": [] + }, + { + "name": "occtax/occurrences", + "request": { + "url": "http://localhost:8000/contact/occurrences", + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "Return all occurences" + }, + "response": [] + }, + { + "name": "occtax/releve", + "request": { + "url": "http://localhost:8000/contact/releve", + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Basic Og==" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"geometry\": {\"type\": \"Point\", \"coordinates\": [4.563980749, 45.19474135]},\n \"properties\": { \n \"id_dataset\": 1,\n \"id_digitiser\": 1, \n \"date_min\": \"2017-01-01 00:00:00\",\n \"date_max\": \"2017-01-01 00:00:00\", \n \"altitude_min\": 1500,\n \"altitude_max\": 1565, \n \"meta_device_entry\": \"web\",\n \"comment\": \"exemple test comment\",\n \"observers\": [1,2,3],\n \"id_releve_contact\": 7,\n \"t_occurrences_contact\": [\n {\n \"id_nomenclature_obs_technique\": 343,\n \"id_nomenclature_obs_meth\": 65,\n \"id_nomenclature_bio_condition\": 177,\n \"id_nomenclature_bio_status\": 30,\n \"id_nomenclature_naturalness\": 182,\n \"id_nomenclature_exist_proof\": 91,\n \"id_nomenclature_valid_status\": 347, \n \"id_nomenclature_diffusion_level\": 163,\n \"id_validator\": 1,\n \"determiner\": \"gil\",\n \"determination_method\": \"gees\", \n \"cd_nom\": 60612,\n \"nom_cite\": \"Lynx Bor\\u00e9al\",\n \"meta_v_taxref\": \"Taxref V9.0\",\n \"sample_number_proof\": \"Herbier_Dentant-15-37869\", \n \"digital_proof\": \"\", \n \"non_digital_proof\": \"plante en herbier\",\n \"comment\": \"MODIF\",\n \"cor_counting_contact\": [\n {\n \"id_nomenclature_life_stage\": 4,\n \"id_nomenclature_sex\": 190,\n \"id_nomenclature_obj_count\": 166,\n \"id_nomenclature_type_count\": 107, \n \"count_min\": 15,\n \"count_max\": 20\n },\n {\n \"id_nomenclature_life_stage\": 4,\n \"id_nomenclature_sex\": 191,\n \"id_nomenclature_obj_count\": 166,\n \"id_nomenclature_type_count\": 107, \n \"count_min\": 1,\n \"count_max\": 1\n }\n ] \n }\n ] \n }\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "occtax/releveWithObserversTxt", + "request": { + "url": "http://localhost:8000/contact/releve", + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Basic Og==" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"geometry\": {\"type\": \"Point\", \"coordinates\": [4.563980749, 45.19474135]},\n \"properties\": { \n \"id_dataset\": 1,\n \"id_digitiser\": 1, \n \"date_min\": \"2017-01-01 00:00:00\",\n \"date_max\": \"2017-01-01 00:00:00\", \n \"altitude_min\": 1500,\n \"altitude_max\": 1565, \n \"meta_device_entry\": \"web\",\n \"comment\": \"exemple test comment\",\n \"observers_txt\":\"Super Obs, Pouet\",\n \"id_releve_contact\": 7,\n \"t_occurrences_contact\": [\n {\n \"id_nomenclature_obs_technique\": 343,\n \"id_nomenclature_obs_meth\": 65,\n \"id_nomenclature_bio_condition\": 177,\n \"id_nomenclature_bio_status\": 30,\n \"id_nomenclature_naturalness\": 182,\n \"id_nomenclature_exist_proof\": 91,\n \"id_nomenclature_valid_status\": 347, \n \"id_validator\": 1,\n \"determiner\": \"gil\",\n \"determination_method\": \"gees\", \n \"cd_nom\": 60612,\n \"nom_cite\": \"Lynx Bor\\u00e9al\",\n \"meta_v_taxref\": \"Taxref V9.0\",\n \"sample_number_proof\": \"Herbier_Dentant-15-37869\", \n \"digital_proof\": \"\", \n \"non_digital_proof\": \"plante en herbier\",\n \"comment\": \"MODIF\",\n \"cor_counting_contact\": [\n {\n \"id_nomenclature_life_stage\": 4,\n \"id_nomenclature_sex\": 190,\n \"id_nomenclature_obj_count\": 166,\n \"id_nomenclature_type_count\": 107, \n \"count_min\": 15,\n \"count_max\": 20\n },\n {\n \"id_nomenclature_life_stage\": 4,\n \"id_nomenclature_sex\": 191,\n \"id_nomenclature_obj_count\": 166,\n \"id_nomenclature_type_count\": 107, \n \"count_min\": 1,\n \"count_max\": 1\n }\n ] \n }\n ] \n }\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "occtax/releve/7", + "request": { + "url": "http://localhost:8000/contact/releve/7", + "method": "DELETE", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "/occtax/releve/occurrence_counting/21", + "request": { + "url": "http://localhost:8000/contact/releve/occurrence_counting/21", + "method": "DELETE", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "occtax/releve/occurrence/21", + "request": { + "url": "http://localhost:8000/contact/releve/occurrence/21", + "method": "DELETE", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "Metadata", + "description": "Routes of the metadata module.\nInformations about datasets, acqusition framework, protocols, programs...", + "item": [ + { + "name": "meta/parameters//", + "request": { + "url": "http://localhost:8000/meta/parameters/taxref_version", + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "Return the value of the parameter for an organism.\nThe second parameter is optional (return the default paramater value)" + }, + "response": [] + }, + { + "name": "meta/datasets", + "request": { + "url": "http://localhost:8000/meta/datasets", + "method": "GET", + "header": [ + { + "key": "Cookie", + "value": "token=eyJleHAiOjE1MTU2NjY4NzIsImFsZyI6IkhTMjU2IiwiaWF0IjoxNTE1NjU5NjcyfQ.eyJpZGVudGlmaWFudCI6ImFnZW50IiwiaWRfYXBwbGljYXRpb24iOjE0LCJpZF9vcmdhbmlzbWUiOi0xLCJpZF9kcm9pdF9tYXgiOjMsImlkX3JvbGUiOjJ9.kwj4kOifWDo4WHMQXA2X4_lC3sQBUQuT6eRN46IDIVw" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "Liste des datasets" + }, + "response": [] + }, + { + "name": "meta/aquisition_framework_mtd/", + "request": { + "url": "http://localhost:8000/meta/aquisition_framework_mtd/60dac805-2568-13eb-e053-2614a8c0d040", + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "Post an acquisition framework using the MTD webservice\nParameter:\nuuid_af: uuid of the acquisition framework" + }, + "response": [] + }, + { + "name": "meta/dataset_mtd//", + "request": { + "url": "http://localhost:8000/meta/dataset_mtd/9188", + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "Post all the datasets created by a user using the MTD webservice\nparameter:\nid_user: an user ID send back by INPN CAS authentification\nid_organism:(Optional) a organism ID send back by INPN CAS authentification " + }, + "response": [] + } + ] + }, + { + "name": "Nomenclatures", + "description": "Routes of the nomenclature sub module.\n\nThis submodule is use to get the dropdown list's values of the differents forms.\nIn GeoNature we use the nomenclature of the SINP: http://standards-sinp.mnhn.fr/nomenclature/\n\nhttps://github.com/PnX-SI/Nomenclature-api-module", + "item": [ + { + "name": "nomenclatures/nomenclature/STADE_VIE?regne=Animalia", + "request": { + "url": { + "raw": "http://localhost:8000/nomenclatures/nomenclature/STADE_VIE?regne=Animalia", + "protocol": "http", + "host": ["localhost"], + "port": "8000", + "path": ["nomenclatures", "nomenclature", "STADE_VIE"], + "query": [ + { + "key": "regne", + "value": "Animalia", + "equals": true + } + ], + "variable": [] + }, + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "Return all nomenclatures for one type from its mnemonique code " + }, + "response": [] + }, + { + "name": "nomenclatures/nomenclatures?code_type=TYP_DENBR&code_type=STADE_VIE", + "request": { + "url": { + "raw": "http://localhost:8000/nomenclatures/nomenclatures?code_type=TYP_DENBR&code_type=STADE_VIE", + "protocol": "http", + "host": ["localhost"], + "port": "8000", + "path": ["nomenclatures", "nomenclatures"], + "query": [ + { + "key": "code_type", + "value": "TYP_DENBR", + "equals": true + }, + { + "key": "code_type", + "value": "STADE_VIE", + "equals": true + } + ], + "variable": [] + }, + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "Return all nomenclature for several code types" + }, + "response": [] + } + ] + }, + { + "name": "Ref_geo", + "description": "Routes of the geographic referential module", + "item": [ + { + "name": "geo/info", + "request": { + "url": "http://localhost:8000/geo/info", + "method": "POST", + "header": [ + { + "key": "conte", + "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"geometry\": {\"type\": \"Point\", \"coordinates\": [3.6054, 44.31736339]}\n}" + }, + "description": "From a posted geojson, the route return the municipalities intersected and the altitude min/max" + }, + "response": [] + }, + { + "name": "geo/areas - alltype", + "request": { + "url": "http://localhost:8000/geo/areas", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"geometry\": {\"type\": \"Point\", \"coordinates\": [3.6054, 44.31736339]}\n}" + }, + "description": "From a posted geojson, the route return all the area intersected from l_areas" + }, + "response": [] + }, + { + "name": "geo/areas - filterby communes", + "request": { + "url": "http://localhost:8000/geo/areas", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"geometry\": {\"type\": \"Point\", \"coordinates\": [3.6054, 44.31736339]},\n \"id_type\":25\n}" + }, + "description": "From a posted geojson, the route return all the municipalities intersected" + }, + "response": [] + } + ] + }, + { + "name": "Users", + "description": "Routes of the user referential module", + "item": [ + { + "name": "users/menu/9", + "request": { + "url": "http://localhost:8000/users/menu/9", + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "Return all role for one menu" + }, + "response": [] + }, + { + "name": "users/role", + "request": { + "url": "http://localhost:8000/users/role", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"id_role\":45,\n\t\"identifiant\": \"test\",\n\t\"nom_role\": \"test.test\",\n\t\"prenom_role\": \"nom test\",\n\t\"id_organisme\": 1\n}" + }, + "description": "Post a user" + }, + "response": [] + } + ] + }, + { + "name": "Taxonomy", + "description": "Routes of Taxhub app.\nFrom taxonomie schema in database", + "item": [ + { + "name": "Taxon autocomplete", + "request": { + "url": { + "raw": "http://localhost:5000/api/taxref/allnamebylist/100?search_name=abl%20an", + "protocol": "http", + "host": ["localhost"], + "port": "5000", + "path": ["api", "taxref", "allnamebylist", "100"], + "query": [ + { + "key": "search_name", + "value": "abl%20an", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [], + "body": {}, + "description": "Return all taxons matching with \"search_name\"='abl' in the list 102" + }, + "response": [] + }, + { + "name": "Kingdom and group2Inpn", + "request": { + "url": "http://localhost:5000/api/taxref/regnewithgroupe2", + "method": "GET", + "header": [], + "body": {}, + "description": "Retunr all the kingdom and their 'group2_inpn'" + }, + "response": [] + }, + { + "name": "Taxon info", + "request": { + "url": "http://localhost:5000/api/taxref/212", + "method": "GET", + "header": [], + "body": {}, + "description": "Return the info of a taxon from its cd_nom" + }, + "response": [] + }, + { + "name": "Bib_nom info", + "request": { + "url": "http://localhost:5000/api/taxref/212", + "method": "GET", + "header": [], + "body": {}, + "description": "Return attributes info from a cd_nom.\nAttributes are complementary info of a taxon for each structure (ex: patrimonial, description locale...)\nWithout the id_attribut parameter, return all the attributes" + }, + "response": [] + } + ] + } + ] +} diff --git a/test/create_contact.json b/test/create_contact.json index fb6b1a4917..decf07f857 100644 --- a/test/create_contact.json +++ b/test/create_contact.json @@ -1,59 +1,55 @@ { - "geometry": { - "type": "Point", - "coordinates": [ - 6.5, - 44.85 - ] - }, - "properties": { - "id_dataset": 1, - "id_digitiser": 1, - "date_min": "2017-01-01 00:00:00", - "date_max": "2017-01-01 00:00:00", - "altitude_min": 1500, - "altitude_max": 1565, - "meta_device_entry": "web", - "comment": "exemple test", - "observers": [1,2,3], - "t_occurrences_occtax": [ - { - "id_nomenclature_obs_meth": 65, - "id_nomenclature_bio_condition": 177, - "id_nomenclature_bio_status": 30, - "id_nomenclature_naturalness": 182, - "id_nomenclature_exist_proof": 91, - "id_nomenclature_valid_status": 347, - "id_nomenclature_diffusion_level": 163, - "id_validator": 1, - "determiner": "gil", - "determination_method": "gees", - "cd_nom": 60612, - "nom_cite": "Lynx Bor\u00e9al", - "meta_v_taxref": "Taxref V9.0", - "sample_number_proof": "Herbier_Dentant-15-37869", - "digital_proof": "", - "non_digital_proof": "plante en herbier", - "comment": "Première observation de cette plante rare pour le territoire", - "cor_counting_occtax": [ - { - "id_nomenclature_life_stage": 4, - "id_nomenclature_sex": 190, - "id_nomenclature_obj_count": 166, - "id_nomenclature_type_count": 107, - "count_min": 15, - "count_max": 20 - }, - { - "id_nomenclature_life_stage": 4, - "id_nomenclature_sex": 191, - "id_nomenclature_obj_count": 166, - "id_nomenclature_type_count": 107, - "count_min": 1, - "count_max": 1 - } - ] - } - ] - } -} \ No newline at end of file + "geometry": { + "type": "Point", + "coordinates": [6.5, 44.85] + }, + "properties": { + "id_dataset": 1, + "id_digitiser": 1, + "date_min": "2017-01-01 00:00:00", + "date_max": "2017-01-01 00:00:00", + "altitude_min": 1500, + "altitude_max": 1565, + "meta_device_entry": "web", + "comment": "exemple test", + "observers": [1, 2, 3], + "t_occurrences_occtax": [ + { + "id_nomenclature_obs_meth": 65, + "id_nomenclature_bio_condition": 177, + "id_nomenclature_bio_status": 30, + "id_nomenclature_naturalness": 182, + "id_nomenclature_exist_proof": 91, + "id_nomenclature_valid_status": 347, + "id_validator": 1, + "determiner": "gil", + "determination_method": "gees", + "cd_nom": 60612, + "nom_cite": "Lynx Bor\u00e9al", + "meta_v_taxref": "Taxref V9.0", + "sample_number_proof": "Herbier_Dentant-15-37869", + "digital_proof": "", + "non_digital_proof": "plante en herbier", + "comment": "Première observation de cette plante rare pour le territoire", + "cor_counting_occtax": [ + { + "id_nomenclature_life_stage": 4, + "id_nomenclature_sex": 190, + "id_nomenclature_obj_count": 166, + "id_nomenclature_type_count": 107, + "count_min": 15, + "count_max": 20 + }, + { + "id_nomenclature_life_stage": 4, + "id_nomenclature_sex": 191, + "id_nomenclature_obj_count": 166, + "id_nomenclature_type_count": 107, + "count_min": 1, + "count_max": 1 + } + ] + } + ] + } +} diff --git a/test/update_contact.json b/test/update_contact.json index e75c7e9dbf..d391588dfe 100644 --- a/test/update_contact.json +++ b/test/update_contact.json @@ -1,69 +1,62 @@ { - "geometry": { - "type": "Point", - "coordinates": [ - 6.5, - 44.85 - ] - }, - "properties": { - "id_releve_occtax": 1, - "id_dataset": 1, - "id_digitiser": 1, - "date_min": "2017-01-01 00:00:00", - "date_max": "2017-01-01 00:00:00", - "altitude_min": 1500, - "altitude_max": 1565, - "meta_device_entry": "web", - "comment": "exemple test", - "observers": [1,2,3], - "t_occurrences_occtax": [ - { - - "id_occurrence_occtax": 1, - "id_releve_occtax": 1, - "id_nomenclature_obs_meth": 65, - "id_nomenclature_bio_condition": 177, - "id_nomenclature_bio_status": 30, - "id_nomenclature_naturalness": 182, - "id_nomenclature_exist_proof": 91, - "id_nomenclature_valid_status": 347, - "id_nomenclature_diffusion_level": 163, - "id_validator": 1, - "determiner": "gil", - "determination_method": "gees", - "cd_nom": 60612, - "nom_cite": "Lynx Bor\u00e9al", - "meta_v_taxref": "Taxref V9.0", - "sample_number_proof": "Herbier_Dentant-15-37869", - "digital_proof": "", - "non_digital_proof": "plante en herbier", - "comment": "Première observation de cette plante rare pour le territoire", - "cor_counting_occtax": [ - { - - "id_counting_occtax": 1, - "id_occurrence_occtax": 1, - "id_nomenclature_life_stage": 4, - "id_nomenclature_sex": 190, - "id_nomenclature_obj_count": 166, - "id_nomenclature_type_count": 107, - "count_min": 15, - "count_max": 20 - }, - { - - "id_counting_occtax": 2, - "id_occurrence_occtax": 1, - "id_nomenclature_life_stage": 4, - "id_nomenclature_sex": 191, - "id_nomenclature_obj_count": 166, - "id_nomenclature_type_count": 107, - "count_min": 1, - "count_max": 1 - } - ] - } - ] - } -} \ No newline at end of file + "geometry": { + "type": "Point", + "coordinates": [6.5, 44.85] + }, + "properties": { + "id_releve_occtax": 1, + "id_dataset": 1, + "id_digitiser": 1, + "date_min": "2017-01-01 00:00:00", + "date_max": "2017-01-01 00:00:00", + "altitude_min": 1500, + "altitude_max": 1565, + "meta_device_entry": "web", + "comment": "exemple test", + "observers": [1, 2, 3], + "t_occurrences_occtax": [ + { + "id_occurrence_occtax": 1, + "id_releve_occtax": 1, + "id_nomenclature_obs_meth": 65, + "id_nomenclature_bio_condition": 177, + "id_nomenclature_bio_status": 30, + "id_nomenclature_naturalness": 182, + "id_nomenclature_exist_proof": 91, + "id_nomenclature_valid_status": 347, + "id_validator": 1, + "determiner": "gil", + "determination_method": "gees", + "cd_nom": 60612, + "nom_cite": "Lynx Bor\u00e9al", + "meta_v_taxref": "Taxref V9.0", + "sample_number_proof": "Herbier_Dentant-15-37869", + "digital_proof": "", + "non_digital_proof": "plante en herbier", + "comment": "Première observation de cette plante rare pour le territoire", + "cor_counting_occtax": [ + { + "id_counting_occtax": 1, + "id_occurrence_occtax": 1, + "id_nomenclature_life_stage": 4, + "id_nomenclature_sex": 190, + "id_nomenclature_obj_count": 166, + "id_nomenclature_type_count": 107, + "count_min": 15, + "count_max": 20 + }, + { + "id_counting_occtax": 2, + "id_occurrence_occtax": 1, + "id_nomenclature_life_stage": 4, + "id_nomenclature_sex": 191, + "id_nomenclature_obj_count": 166, + "id_nomenclature_type_count": 107, + "count_min": 1, + "count_max": 1 + } + ] + } + ] + } +}