Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger docs: include JSON example in /observations/bulk_import/ #302

Open
PietrH opened this issue Jan 20, 2025 · 2 comments
Open

Swagger docs: include JSON example in /observations/bulk_import/ #302

PietrH opened this issue Jan 20, 2025 · 2 comments

Comments

@PietrH
Copy link
Member

PietrH commented Jan 20, 2025

It would be nice if there was a populated example of how bulk imports should be formatted in JSON on the swagger docs:

Currently the example includes an empty array:
Image

@jrhillae
Copy link
Collaborator

jrhillae commented Jan 20, 2025

The old example provided by Steven was this one:

example_import_7_augustus_2024.json

[
    {
        "modified_by": 1,
        "province": 1,
        "observation_datetime": "2024-06-22T12:17:00+02:00",
        "eradication_problems": "",
        "anb": false,
        "source": "",
        "eradication_notes": "",
        "images": ["https://waarnemingen.be/media/photo/94623222.jpg"],
        "modified_datetime": "2024-06-26T23:14:11.495901+02:00",
        "species": 8807,
        "created_datetime": "2024-06-26T23:14:11.495899+02:00",
        "municipality": 5,
        "location": "SRID=4326;POINT (4.693350791931152 51.067758870436975)",
        "observer_email": "[email protected]",
        "eradication_persons": "",
        "created_by": 1,
        "nest_size": "",
        "visible": true,
        "nest_location": "",
        "eradication_date": "",
        "created_by_first_name": "vespadb",
        "eradication_product": "",
        "observer_phone_number": "0498/501940",
        "nest_type": "",
        "observer_name": "",
        "wn_created_datetime": "2024-06-22T12:41:36.828012+02:00",
        "eradicator_name": "",
        "eradication_method": "",
        "eradication_aftercare": "",
        "modified_by_first_name": "vespadb",
        "reserved_datetime": "",
        "public_domain": "",
        "eradication_duration": "",
        "nest_height": "",
        "eradication_result": "",
        "municipality_name": "Heist-op-den-Berg",
        "reserved_by_first_name": "",
        "wn_modified_datetime": "2024-06-22T13:49:48.119723+02:00"
    }
]

@stevegerrits : om de import langs onze zijde optimaal voor te bereiden is een geüpdate versie hiervan zeer handig (na aanpassen import obv issues).

@PietrH
Copy link
Member Author

PietrH commented Jan 20, 2025

Jasmijn sent me a slightly edited one:

[
    {
        "source_id":200,
        "observation_datetime": "2025-01-17T12:17:00+02:00",
        "eradication_problems": "steken",
        "anb": true,
        "source": "inaturalist",
        "eradication_notes": "test",
        "images": ["https://waarnemingen.be/media/photo/94623222.jpg"],
        "created_datetime": "2024-06-26T23:14:11.495899+02:00",
        "longitude": 4.693350791931152,
	"latitude": 51.067758870436975,
        "eradication_persons": 7,
        "nest_size": "kleiner_dan_25_cm",
        "visible": true,
        "nest_location": "buiten_onbedekt_op_gebouw",
        "eradication_date": "2024-12-11",
        "eradication_product": "vloeibare_stikstof",
        "nest_type": "actief_embryonaal_nest",
        "eradicator_name": "jasmijn_test",
        "eradication_method": "diepvries",
        "eradication_aftercare": "nest_volledig_verwijderd",
        "public_domain": "true",
        "eradication_duration": "60",
        "nest_height": "lager_dan_4_meter",
        "eradication_result": "successful",
        "notes": "test",
        "admin_notes":     
    }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants