Organization is API Enabled but no Info Available when using [getOrganization] endpoint

Eddysanoli
Getting noticed

Organization is API Enabled but no Info Available when using [getOrganization] endpoint

Hello!

 

Currently I'm using an ansible playbook (paired with the cisco.meraki collection) to disable a setting in a network. When I try to do it with a certain network however, I get the following error:

 

{"changed": false, "msg": 404, "response": "OK (unknown bytes)", "status": 404, "url": "https://api.meraki.com/api/v1/organizations/7087539913.../configTemplates"}

 

The module that I'm using is "cisco.meraki.meraki_network", so I never explicitly called the "configTemplates" endpoint, but I kept digging. I manually retrieved the info for the network that I want to configure and I noticed that the ID for its container organization is indeed "7087539913...". When I tried retrieving the info for the "7087539913..." organization however, I got a 404 response. Maybe the organization was not API enabled? Checked using the "getOrganizations" endpoint and it is API enabled.

 

What could be happenning here? The organization that I want to retrieve info from is API enabled, but when I tried to use the "getOrganization" endpoint, I get a 404 response back. I'm certain that my API key should be able to retrieve all info from the Meraki API as well. Does anybody know what could be going wrong?

 

3 Replies 3
ShawnHu
Meraki Employee
Meraki Employee

@Eddysanoli  Did you intentionally hide the last digits of the organization ID for privacy? Or it's was done by the ansible-playbook? I just want to clarify that  "7087539913..." with those dots in the string is not a valid organization ID.

As you can retrieve 'getOrganizations', you can find the full organization ID for your target organization.  You can find an example output here.

https://developer.cisco.com/meraki/api-v1/#!get-organizations

Eddysanoli
Getting noticed

Hey! Thank you. Yeah. I didnt want to write the entire ID, but I actually tested the "getOrganization" endpoint with the entire ID and it fails.

AutomationDude
Building a reputation

You might have IP restrictions enabled on who can use the API with this organization. Do check out that configuration in the Organization settings on dashboard.

Get notified when there are additional replies to this discussion.