Example Python code showing how to use the Batch Automation with Media Storage and the Phone Number Verification API is available in the Syniverse Developer Community area on Github here.
This includes examples for both
The example code includes everything you need to upload, create and run a batch job and then download the results. Besides the example code, the repository also includes example input files and results. This means that once downloaded, the only code change needed is to add your access token, and also your delivery configuration if you want to subscribe to notifications.
Also, below are some example cURL statements, which can be used to:
API | Example Call |
---|---|
schedule, Scrub |
curl -X POST -H "Authorization: Bearer [YOUR ACCESS TOKEN]" -H "Content-Type: application/json" -d '{ "schedule": { "jobId": "[YOUR JOB ID]", "name": "NIS Scrub", "inputFileId": "[UNIQUE FILE ID]", "fileRetentionDays": 30, "scheduleRetentionDays": 30, "outputFileNamingExpression": "NIS-Scrub-output.txt", "outputFileFolder": "Test", "outputFileTag": "Test Tag", "jobRuntimeContext": {} } }' "https://api.syniverse.com/aba/v1/schedules" |
schedule, Monitor |
curl -X POST -H "Authorization: Bearer [YOUR ACCESS TOKEN]" -H "Content-Type: application/json" -d '{ "schedule": { "jobId": "NIS-Monitor-v2", "name": "Subscribe", "inputFileId": "[UNIQUE FILE ID]", "outputFileNamingExpression": "", "outputFileFolder": "", "outputFileTag": "", "fileRetentionDays": 30, "scheduleRetentionDays": 30, "jobRuntimeContext": { "subscribeevents": "all", "subscribedestinationid": "[ID FOR EVENT MANAGER SUBSCRIPTION]" } } }' "https://api.syniverse.com/aba/v1/schedules" |
schedule. Unsubscribe |
curl -X POST -H "Authorization: Bearer [YOUR ACCESS TOKEN]" -H "Content-Type: application/json" -d '{ "schedule": { "jobId": "NIS-Unsubscribe-v2", "name": "Unsubscribe", "inputFileId": "[UNIQUE FILE ID]", "outputFileNamingExpression": "", "outputFileFolder": "", "outputFileTag": "", "fileRetentionDays": 30, "scheduleRetentionDays": 30, "jobRuntimeContext": {} } }' "https://api.syniverse.com/aba/v1/schedules" |