Before making any calls to the SpatialKey Data Management API you need to authenticate. You will use your username and password to obtain a session token. Once you have this token you can make additional calls to the API.
Before you start you will need the following:
- Your SpatialKey domain: This is in the format of https://yoursite.spatialkey.com
- Your Username & Password: Make sure that your account has permission to upload data. You can manually test this through the SpatialKey client
Authenticating
The authentication call should be made directly to your SpatialKey custom URL {yoursite}.spatialkey.com. Each time you make a call to the A. This call will log in a user and provide a JSESSIONID for subsequent calls. It is important to pass the JSESSIONID as a cookie on each call made after the authentication operation.
HTTP Call: POST OR GET
https://[spatialkey URL]/SpatialKeyFramework/dataImportAPI?action=login&orgName=um&user=test@spatialkey.com&password=12345
Required Parameters
Parameter | Description |
---|---|
action | The action to perform, in this case “login” |
orgName | The first portion of the SpatialKey organization domain name. If the organization domain is um.spatialkey.com then the orgName would be “um” |
user | The username (email) of the SpatialKey user to perform the authentication and subsequent Data Import API calls with |
password | password – the password of the user to authenticate with |
Returns: XML Document and HTTP status of 200 if successful
Root element: <sk_dia>
Child elements:
- <error> – empty or contains error message
- <result_message> – result message text
- <result> – same as result_message for login operation