REST API-Import error

Occasional Contributor

REST API-Import error

Upon importing into the Anaplan model using Postman, we get an error. The steps followed and the error screenshot(highlighted in red) are attached in the file. 

Kindly have a look at it. I will be thankful for your solutions.

Message 1 of 11
10 REPLIES 10
Regular Contributor

Re: REST API-Import error

Hi @preethiv 

 

When you went through the process, did you first update the file metadata? This is required before uploading the file content.

  1. POST file metadata
  2. PUT file data
  3. POST file metadata again to /complete endpoint.

If you didn't follow these steps, I suspect this is the cause of the server error.

 

Thanks,
Jesse



Jesse Wilson
Solution Architect - Data Integrations
Singapore
Message 2 of 11
Occasional Contributor

Re: REST API-Import error

Thank you for the solution @jesse_wilson , I shall check if this works for me.

Message 3 of 11
Occasional Contributor

Re: REST API-Import error

Thank you so much for the solution. It works and I can import successfully.

But now I face another issue. Import is running successfully but the imported values are not reflected in the module properly (i.e If I do any changes in the data file, it is not synced even after the import)

The screenshots are added as a file in the attachment. Kindly help me to solve this issue.

Message 4 of 11
Regular Contributor

Re: REST API-Import error

Does the import status show any errors once complete? If you try to just run the action from the model, what is the result? I'd take a look at the file as it appears in Anaplan, go to the import data sources tab and edit the file. Does it look like what you expect? If so, double check the import mapping to make sure everything is mapped correctly.



Jesse Wilson
Solution Architect - Data Integrations
Singapore
Message 5 of 11
Highlighted
Occasional Contributor

Re: REST API-Import error

Okay!Thanks, @jesse_wilson . I have checked with what you have asked. There is no error shown after completing the import. If I run through the action, I can run the import but there are no changes in the data (displays the same data that was stored before updation). While editing through the data sources, the non-updated values are only displayed again. I can see that even the mapping is right, the modifications I have done after importing once is not reflecting into the module. I think the existing source that is available when we run the import in the module lasts for 48 hours and so the values are not changing even after reimporting through REST API. I don't know whether I am right, can you please help me to find out where the problem occurs?

Message 6 of 11
Regular Contributor

Re: REST API-Import error

If the data source in Anaplan is reflecting the old values, I'd say that the file you're updating isn't the correct one, or it's set for another user. Are you running the upload in Postman with the same account you're logging into Anaplan with?

 

Maybe try deleting the file entirefly from Anaplan, this will also delete the import, but you can recreate it easily enough. Then re-upload and make sure the file is available for "everyone". Recreate the import, then get the new file ID, try the upload and import through Postman again. I suspect the issue is somewhere in here.

 

Postman is successfully uploading the file, but if it's not visible in the data source within Anaplan it can only import the data available to you.



Jesse Wilson
Solution Architect - Data Integrations
Singapore
Message 7 of 11
Occasional Contributor

Re: REST API-Import error

Thank you @jesse_wilson. I will try as you mentioned and let you know after doing it. 

Message 8 of 11
Occasional Contributor

Re: REST API-Import error

I have tried the suggestions you gave me @jesse_wilson . Thank you! I am using the same account for logging into both Anaplan and Postman.

 

I deleted the file, recreated it and then performed the import process but the same issue is been faced(the data values doesn't get updated)

 

While trying the upload action before importing, I get an error in the step "Post the chunk count". The screenshot of the error is added in the attachment file.

Regular Contributor

Re: REST API-Import error

Without seeing the full URL you're using, or the body of the request, it's difficult to say what's going on. The 500 response code is almost always due to an error with the request, not a genuine server error. Could you try exporting this entire flow as a JSON and sharing here?

 

Please include all steps: metadata update, file upload, completing the file, import metadata, import POST.

 

Thanks!



Jesse Wilson
Solution Architect - Data Integrations
Singapore
Message 10 of 11