Get metadata for import action returns the target line items instead of File headers
Hello everyone,
We were looking to query the mappings of a file that was being uploaded in the model through the endpoint of get metadata for import action.
the link Anaplan Integration API V2 Guide and Reference · Apiary suggests the below statement:
" You can use the API to obtain metadata for an import definition for module and list imports using the import ID. This enables you to use mappings on your imports without querying the import file itself. "
but the body for the import action of a module displays the line items of the target module, not the headers of the file that was used for uploading data to the module.
endpoint url used - /workspaces/{workspaceId}/models/{modelId}/imports/{importId}
aslo tried this - /workspaces/{workspaceId}/models/{modelId}/imports/{importId}?showImportDataSource=true
but is returning the same details of target line items not the headers of the file.
Anybody tried any alternative approach with respect to the above ask.
Thanks in advance for your time and support!
P.S.: it is working fine for the hierarchy load using the file, but shows misinformation for module data load.
Regards
Vaitesh
Answers
-
It appears that you are using the correct endpoint. A couple things that might be worth confirming:
1. Is your import source for the import in question actually a file and not another module? You should see something like the below in the response:
"importMetadata":{ "name":"Employees from Employees.txt", "type":"FILE", [...]
2. Is your import data source configured as a private file or can admins access it?
3. Are you running a GET and not a POST?
0 -
@Vaitesh Quick follow up here -- I was able to reproduce the same issue in my own environment. I've shared the info with some of my colleagues to determine what the intended behavior is, but I would also recommend you sharing your issue with Anaplan Support (support@anaplan.com).
0 -
Hello @ryan_kohn ,
1. Yes, the import is from the File, below screenshot of the response
2. It is not a private file and the credentials used for authentication is having WSA access.
3.It is a GET method as the information is only being retrieved no updates to any objects.
Thanks
Vaitesh
1