Data Validation when using Anaplan API
One thing i've found quite challenging when doing API implementations (and at this point i've done well into my 20s of these) is, what is the best way to validate that my API calls are properly working? Specifically - how can I validate that file uploads are pushing in the right data? There are so many different variables that go into this upload process (type of file, who uploaded the file, column headers, etc) and there doesn't seem to be a very straightforward way of validating a successful upload, especially when the API just gives a 204 response.
Does anyone have any advice on doing this that I can carry to future implementations?
Answers
-
Hi @kjohnson,
After uploading the file (for imports, so ID starting with 113), you can then download it - using either:
- The same API interface you are building, as you would be downloading the file from export (ID starting with 116)
- Simply by using your browser (by going to URL like: https://us1a.app.anaplan.com/2/0/models{Model_Id}/files/{File_Id}).
- Any other connector, like Anaplan Connect.
Then, if you compare your two files, they should be identical - and it means that it worked.
Remember to use the same account! Also, when using this method, and you have a default file set, if you haven't uploaded the new file recently, you will get the default one.
Let me know if it works for you, or you had something else on your mind.
1 -
Thanks for the response @M.Kierepka - This is what we've been doing, but there's always confusion with the "same account" piece. For example, if we're using OAuth 2.0 for our API calls, how can we use the same account to validate that data?
0