Rest API 403 Forbidden Error while Update module cell data

MayankP
New Contributor

Rest API 403 Forbidden Error while Update module cell data

Hi All,

 

Using below link I am trying update module cell data using Transactional APIs using Postman.

https://anaplanbulkapi20.docs.apiary.io/#WriteCellDataByCoordinateModule

 

But I am getting 403 Forbidden error. I am able to use all other GET request successfully. 

Please find below screen shot:

MayankP_2-1629292257716.pngMayankP_3-1629292291380.png

 

I can manually login to Anaplan and update the cells manually but unable to do the same using APIs.

I have full authorizations as shown below:

MayankP_0-1629292144313.pngMayankP_1-1629292168235.png

 

 

I am not sure what I am missing. Please help.

 

Regards

Mayank

12 REPLIES 12
KirillKuznetsov
Certified Master Anaplanner

Re: Rest API 403 Forbidden Error while Update module cell data

It might be obvious, but still.
Did you replace orange variables in Header for token and URL (WS & Model IDs)?
MayankP
New Contributor

Re: Rest API 403 Forbidden Error while Update module cell data

Hi Kirill, 

Yes, I am using environment variable feature of postman for ease of use and chaining the requests.

Orange variable are environment variables and their values are maintained. I have tried passing the values directly without variables as well but same result.

 

MayankP_0-1629355253931.pngMayankP_1-1629355276879.png

 

Regards

Mayank

yrignac
Occasional Contributor

Re: Rest API 403 Forbidden Error while Update module cell data

Hello,

 

Your input module has only 2 lists ? Are you sure about dimension ID ?

Member id selected is only base member ?

Line item selected is an input line item (without any formula) ?

 

Did you try to upload to an other module or line item of the module ?

 

Regards,

Yohan 

MayankP
New Contributor

Re: Rest API 403 Forbidden Error while Update module cell data

Hi Yohan,

 

I checked all the IDs and seems to be correct. I got the IDs from other GET requests as mentioned in below link

https://anaplanbulkapi20.docs.apiary.io/#ModuleAndViewData

 

I am trying to update one cell value in the module which has 2 dimensions Time and Product

MayankP_0-1629363189097.png

Below is the dimension IDs I get

MayankP_1-1629363243817.png

 

Not sure if this is a right way but in order to double-check IDs I made a change manually in exact same field which I am trying to update in Anaplan and tried to analyze request body in inspect, seems values I am passing are correct.

 

Values in request body from inspect and values in Postman are mapped with color coding for your reference:

MayankP_2-1629363488045.pngMayankP_3-1629363517431.png

 

I am not an expert in APIs, hope I am looking at right place. 

 

Appreciate your help.

 

Regards

Mayank  

 

 

kevin.cho
Certified Master Anaplanner

Re: Rest API 403 Forbidden Error while Update module cell data

The Transactional APIs require workspace admin rights, so I'd check again if you have Workspace Admin privileges in the workspace that the model you are trying to update. I know your screenshot showed you have Workspace Admin, but it could potentially be across a different Workspace. 

MayankP
New Contributor

Re: Rest API 403 Forbidden Error while Update module cell data

Hi Kevin,

 

Yes I have Workspace admin rights for all the Workspaces. (We have only 2 Workspace).

 

Regards

Mayank

kevin.cho
Certified Master Anaplanner

Re: Rest API 403 Forbidden Error while Update module cell data

Okay thanks for checking - on a random thought are you using a bot account/integration account to authenticate, and not your actual profile that you log in via the front end? I use a bot account that we have a certificate configured to authenticate, rather than my own personal credentials. 

MayankP
New Contributor

Re: Rest API 403 Forbidden Error while Update module cell data

Hi Kevin,

 

I am using Basic Authentication using personal credential to get the authentication token, which is working fine in other GET requests. We are still in implementation phase and so far we have not created an integration account.

Is there any limitation in using personal account?

 

MayankP_0-1629364916102.png

 

Regards

Mayank

 

 

 

kevin.cho
Certified Master Anaplanner

Re: Rest API 403 Forbidden Error while Update module cell data

Not that I'm aware of. 403 errors are normally not as a result of the request being malformed, and neither to do with your credentials being invalid; rather, it could be something to do with security on the model side... I just checked model role (which doesn't seem to be the issue, if the model role isn't set correctly it returns a 404), malformed requests (i.e. incorrectly formatted body) which returns a 400, not really sure what else to check unfortunately 😞 

 

I'll try the Workspace Admin setting tomorrow when my colleague is online, unfortunately I can't switch myself off Workspace Admin.