Instructions
Before you start
Make sure you have noted the following information:
- The application "User key" from the last exercise.
- The application "Secret" from the last exercise.
- Your CDC site "API key".
- Your CDC site "Data Centre" (US, EU, AU).
Disable email verification
- Go into the "Policies" section of your CDC site / API key.
- Make sure that email verification is disabled.
Performing a search via REST API
- For this exercise you will use the Gigya API Tool site, click this link to open it.
- Enter your "API key", "user key", "secret", and select the correct "Data Centre".
- For "Endpoint" enter "
accounts.search
"
- Add the following Parameter:
- Parameter Name:
query
, Value: SELECT * FROM accounts LIMIT 1
- Click the "Send Request" button to see the result.
Performing a registration via REST API
- Change "Endpoint" to "
accounts.register
"
- Remove all parameters.
- Add the following Parameters:
- Parameter Name:
email
, Value: test@test.com
- Parameter Name:
password
, Value: 1234567890
- Parameter Name:
profile
, Value: { "firstName": "Workshop", "lastName": "Exercise" }
- Parameter Name:
data
, Value: { "occupation": "Student" }
- Parameter Name:
preferences
, Value: { "terms": { "termsOfService": { "isConsentGranted": true } } }
- Parameter Name:
regSource
, Value: Workshop activity
- Parameter Name:
finalizeRegistration
, Value: true
- Parameter Name:
lang
, Value: jp
- Click the "Send Request" button to see the result.
- You can check "Identity access" in the CDC console to see the new account.
Please note the "UID" of the new account, we will use it in the next step.
Update an account via REST API
- Change "Endpoint" to "
accounts.setAccountInfo
"
- Remove all parameters.
- Add the following Parameters:
- Parameter Name:
UID
, Value: The value from your newly created account above.
- Parameter Name:
profile
, Value: { "firstName": "Updated first", "lastName": "Updated last" }
- Click the "Send Request" button to see the result.
- You can check "Identity access" in the CDC console to see the updated account.
Congratulations, you've used the CDC REST API.
< Home page