Posting an occurrence set from Comma-Separated Values
More detailed documentation about this service is available on the Lifemapper web services WADL document.
To post an occurrence set from CSV points, you will need to send an HTTP POST request to the proper URL and include the CSV points as the message body of the request.
Lets first start with determining the correct URL that the post request should be sent to. You will need to know which Lifemapper user should own the new occurrence set and the display name you would like to use. For this example, we will use the public anonymous user, "anon". If you have a Lifemapper user and are logged in, you can use your user id instead and only you will be able to see your occurrence set. We will also use "example" for the display name for this occurrence set. The resulting url is:
Please note that the "pointsType" url parameter indicates that the incoming data is in CSV format. This is required so that it can be processed.
Now on to the message body. This is where the actual data about the points will be uploaded. We strongly recommend that you include a header row in your CSV. If it is not present, then the service will assume that you are only uploading the minimum required data (local id, longitude, latitude) and that it is in that order. For this example, we will use more complete data. You can also see a sample occurrence set in CSV format by following this link.
Now after the above message is posted the response from the service will be something like:
The HTTP response code should be 201. If it is 400 check your request. If it is anything else, contact us at: lifemapper [at] ku [dot] edu for help.
When you read the response, note that the element in: lm:response/lm:urls/lm:url will contain a url pointing to your new occurrence set. Keep note of the occurrence set id which is the number listed at the end of the url. In this case, the occurrence set id is 3740257.