Is it possible to get an Import's affected/target List via the API?
I have some c# code that uses the Anaplan v2 API. One thing it does is perform various imports based on conditions. I would like to know which lists are affected by each import, but as far as I can tell it's not possible to get that part of metadata about an import.
Answers
-
Hi @GeorgeDuckett ,
Hope this below dummy code will help you to acheive for the above scenario.//1.Install the RestSharp package via NuGet to simplify the HTTP requests:
Install-Package RestSharp//2.Import Namespaces
using RestSharp;
using RestSharp.Authenticators;//3.Define a method to fetch the Anaplan log import details:
public void GetAnaplanLogImportDetails(string workspaceId, string modelId, string importId)
{
// Create the REST client
var client = new RestClient("https://api.anapn.com//4.Call the GetAnaplanLogImportDetails method, providing the workspace ID, model ID, and import ID as parameters:
GetAnaplanLogImportDetails("your-workspace-id", "your-model-id", "your-import-id");
Regards,
Venkatesh0 -
@Venki9902 HI, thanks for that. It looks like the code for GetAnaplanLogImportDetails has been cut off.
0 -
Hi @GeorgeDuckett ,
Apologies for the half code.
Attaching atext file for your reference.
Regards,
Venkatesh0 -
That looks interesting; is that url (the imports/importid/actions bit) documented anywhere? I had a look for something like that but couldn't find anything.
0 -
Hi @GeorgeDuckett ,
I believe it is not documented anywhere.
However, you also have the details of Anaplan workspace id, model id and action Name.
So I think that will solve your problem.
https://api.anaplan.com/2/0/workspaces/{workspaceId}/models/{modelId}/imports/{importId}/actions/{actionName}
highlighted in the brackets are need to be provided.
However for more details, you can use ChatGPT for this 😊.
Link:https://chat.openai.com/
Hope this helps :).
Cheers,
Venkatesh0 -
I see you mention ChatGTP. Did you ask ChatGTP my question, or were those urls (the one using v2 of the api and the one using v1.3) something you've previously used?
ChatGTP and other LLMs are known for responding with something plausible but incorrect so answers should be verified. If you did use ChatGTP please say so. Since I'm having issues with your suggestions I thought it best to answer before spending longer investigating.
0 -
@Venki9902 To expand on the above, /1/3/workspaces/{workspaceId}/models/{modelId}/imports/{importId} gives a valid response, /1/3/workspaces/{workspaceId}/models/{modelId}/imports/{importId}/actions is a 404 error.
1