Here is the basic structure for the Users Upsert API, assuming your account name with Evergage is "account" and your dataset is "engage"
Example JSON file format for User Upsert
The following is example JSON that can be posted to the user upsert path to update user attributes.
Example JSON file format for Account Upsert
The following is example JSON that can be posted to the account upsert path to update account attributes.
Example CSV file format for Updates
See CSV Users and Accounts Import for a detailed document on how the CSV file should look.
Update Language Examples
For all examples, we will be using the following values:
Evergage Account Key (this is the subdomain you use to login to Evergage with, if your account is "testaccount.evergage.com", then use "testaccount"):
Evergage Dataset (by default this is "engage"):
API Token (this is used to authenticate your requests and can be found in our UI under Settings -> API Tokens:
File name. When using file names (CURL), we assume you've named your files fileName.json and fileName.csv (for JSON and CSV formats respectively):
fileName.json / fileName.csv
CURL Example for User Upsert
Upserting data through CURL on the command line can be done with both CSV and JSON files.
The syntax is slightly different for both formats, so be sure to use the correct command depending on the format of your data.
For both commands you will need a few key values. In the commands listed below be sure to replace the accountKey, datasetName, apiToken, and fileName fields to their correct values. The account token value is available under the API Tokens Settings.
curl -k -X POST -d @fileName.json -H "Content-Type:application/json" "https://testaccount.evergage.com/api/dataset/engage/users/upsert?_at=1234567A-1A2B-DEF1-A123-123A456B789C"
curl -k -X POST -F "file=@fileName.csv" "https://testaccount.evergage.com/api/dataset/engage/users/upsert?_at=1234567A-1A2B-DEF1-A123-123A456B789C"
Java Example for User Upsert
- Jersey REST Client: https://jersey.java.net/documentation/latest/client.html
- Jackson JSON serialization provider (jackson-jaxrs-providers):https://github.com/FasterXML/jackson-jaxrs-providers
PHP Example for User Upsert
User update Example (PHP)
Python Example for User Upsert
This page has no comments.