Fandom

Resighting Wiki

CreateLocatorSighting Method

71pages on
this wiki
Add New Page
Comments0 Share

Add a Sighting to a locator.

The locator to add the Sighting to is specified by the locator Id in the url. If the locator does not exist a method_not_found (404) error is returned.

If the Sighting does not exist a sighting_not_found error is returned.

The Sighting must not already be in the locator otherwise a sighting_already_in_locator error is returned.

The owner of the access token must be a member of the locator otherwise a permission_denied error is returned.

If the Sighting is on hold, the owner of the access token must be the creator of the Sighting otherwise a held_sighting error is returned.

Url: https://resighting-api.appspot.com/api/1/locators/<locator_id>/sightings

HTTP Method: POST

ParametersEdit

Name Type Mandatory Description
access_token String(32) Yes A valid access token.
sandbox Boolean No Whether the method should run in sandbox mode - no writes will be made to the datastore.
sighting_id Long Yes The Id of the Sighting to add to the locator.
user_id String(32) Yes The user Id of the user who created the Sighting.

ReturnsEdit

Returns a LocatorSighting object and HTTP status 200, or an Error object and HTTP status 4xx or 5xx. If the sandbox parameter was set then the returned object will contain dummy data and a boolean attribute named sandbox which will have the value True. See the section on sandboxing for more details.

Example UsageEdit

curl https://resighting-api.appspot.com/api/1/locators/118001/sightings --data access_token=ACCESS_TOKEN --data user_id=bf10ad015e7b4ceea9279c1b9e8889a5 --data sighting_id=1912002

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.