API: modify observation description

Is it possible to modify just an observation’s description via the API?
This modifies the description but removes the photos:

    payload = { observation: { description: updated_description } }
    headers = { authorization: "Bearer #{@inat_import.token}",
                content_type: :json, accept: :json }

    response = RestClient.put("#{API_BASE}/observations/#{inat_obs.inat_id}",
                              payload.to_json, headers)

This gets a 404. (I’m guessing it’s because of the patch.)

   payload = { observation: { description: updated_description } }
    headers = { authorization: "Bearer #{@inat_import.token}",
                content_type: :json, accept: :json }
    response = RestClient.patch("#{API_BASE}/observations/#{@inat_obs.inat_id}",
                                payload.to_json, headers)

start here and read the rest of the thread where this quote comes from, if it doesn’t make sense:

2 Likes

@pisum: Thanks so much for the speedy response.
That worked perfectly.

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.