Skip to content

Instantly share code, notes, and snippets.

@kueda
Created October 14, 2014 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kueda/a466810f4f5495c43f67 to your computer and use it in GitHub Desktop.
Save kueda/a466810f4f5495c43f67 to your computer and use it in GitHub Desktop.
curl request to POST and observation to iNaturalist
> curl -H 'Authorization: Bearer MY_ACCESS_TOKEN' \
> --data "observation[species_guess]=test1" \
> --verbose \
> 'https://inaturalist.org/observations.json'
* Adding handle: conn: 0x7fe173818800
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fe173818800) send_pipe: 1, recv_pipe: 0
* About to connect() to inaturalist.org port 443 (#0)
* Trying 166.78.84.170...
* Connected to inaturalist.org (166.78.84.170) port 443 (#0)
* TLS 1.1 connection using TLS_RSA_WITH_RC4_128_SHA
* Server certificate: www.inaturalist.org (V9i2ibmSFO5wRnvL)
* Server certificate: StartCom Class 1 Primary Intermediate Server CA
* Server certificate: StartCom Certification Authority
> POST /observations.json HTTP/1.1
> User-Agent: curl/7.30.0
> Host: inaturalist.org
> Accept: */*
> Authorization: Bearer MY_ACCESS_TOKEN
> Content-Length: 32
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 32 out of 32 bytes
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Status: 200 OK
< X-UA-Compatible: IE=Edge,chrome=1
< ETag: "5675e87b14f728cb2e452df40dab97da"
< Cache-Control: max-age=0, private, must-revalidate
< Set-Cookie: _session_id=MY_SESSION_ID; path=/; HttpOnly
< X-Request-Id: 26c10add900d1811b08c2be7165d1660
< X-Runtime: 0.452938
< Date: Tue, 14 Oct 2014 18:52:31 GMT
< X-Rack-Cache: invalidate, pass
< X-Powered-By: Phusion Passenger 4.0.46
* Server nginx/1.6.0 + Phusion Passenger 4.0.46 is not blacklisted
< Server: nginx/1.6.0 + Phusion Passenger 4.0.46
<
* Connection #0 to host inaturalist.org left intact
[{"captive":false,"comments_count":0,"community_taxon_id":null,"created_at":"2014-10-14T11:52:31-07:00","delta":true,"description":null,"geoprivacy":null,"iconic_taxon_id":null,"id":1019065,"id_please":false,"identifications_count":0,"latitude":null,"license":"CC-BY","location_is_exact":false,"longitude":null,"map_scale":null,"num_identification_agreements":0,"num_identification_disagreements":0,"oauth_application_id":1,"observation_photos_count":0,"observation_sounds_count":0,"observed_on":null,"observed_on_string":null,"out_of_range":null,"place_guess":null,"positional_accuracy":null,"positioning_device":null,"positioning_method":null,"private_latitude":null,"private_longitude":null,"private_positional_accuracy":null,"quality_grade":"casual","site_id":null,"species_guess":"test1","taxon_id":null,"time_observed_at":null,"time_zone":"Pacific Time (US & Canada)","timeframe":null,"updated_at":"2014-10-14T11:52:31-07:00","uri":null,"user_id":1,"uuid":null,"zic_time_zone":"America/Linaturalist (master) >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment