Unexpected API(POST) Error
I want to import view data in the Azure Synapse Analytics pipeline, but I am getting errors in creating the request.
The error statement is this, is the Body wrong?
・Error message
{ "errorCode": "2108", "message": "{\n \"status\" : {\n \"code\" : 400,\n \"message\" : \"Missing or invalid body\"\n },\n \"path\" : \"/2/0/workspaces/{workspaceID}/models/{modelID}/views/{viewID}/readRequests/\",\n \"timestamp\" : \"2022-10-12T10:34:12.220164Z\"\n}", "failureType": "UserError", "target": "initiate_request", "details": [] }
・URL
https://api.anaplan.com/2/0/workspaces/{workspaceID}/models/{modelID}/views/{viewID}/readRequests/
・body
curl --location --request POST 'https://api.anaplan.com/2/0/workspaces/{workspaceID}/models/{modelID}/views/{viewID}/readRequests/' \
--data-raw '{
"exportType" : "TABULAR_MULTI_COLUMN"
}'
・Header
Authorization :
Any help would be appreciated.
Answers
-
Did you also validate your API call in Postman? And what does it give you there?
KR,
Steven
1 -
My first guess would be that in your body you shouldn't put the whole curl request but only for example:
{
"exportType": "TABULAR_MULTI_COLUMN"
}Kr,
Steven
0 -
Thank you for your reply.
I tried it and it worked well.
I really appreciate your help.
I have one more question.
If I want to extract all data from a view, should I use
{"exportType" : "GRID_ALL_PAGES"} ?
I didn't understand much from the reference.
I look forward to your reply.
0 -
It seems to me that this large volume retrieve takes all data already if you use TABULAR_SINGLE_COLUMN or TABULAR_MULTIPLE_COLUMN without filtering or order.
If you want to export data that is filtered and/or ordered already before export you can use GRID_ALL_PAGES
That is my intepretation of the information anyway, i haven't used it myself.
Kind regards,
Steven
0 -
I use TABULAR_MULTIPLE_COLUMN, and it worked.
Thank you for your help!
1 -
Glad i could help. If you have no further question, maybe you could mark this topic as solved.
Kind regards,
Steven0