Exception on getOrganizations with disabled api access

Greenberet
Head in the Cloud

Exception on getOrganizations with disabled api access

Hey,

 

I'm unsure where to post api related issues at the moment. I've also created an issue on the python sdk on github.

 

there is currently an issue with organizations which don't have api access enabled.
If you make requests to such an organization you will receive a 404 Not Found with this message:

 

{
    "errors": [ "To make requests you must first enable API access via https://XXXX.meraki.com/o/XXXXX/manage/organization/edit" ]
}

 



which results in an exception on the sdk.

There are 2 problems here:

1. it will break most scripts, because of the exception
2. the developers can't see the issue until it occurs as there isn't an "apiEnabled" value in the result of getOrganizations

Please see github for further details

2 Replies 2
rhbirkelund
Kind of a big deal
Kind of a big deal

This occurs when you do requests against an organisation that doesn't have API access enabled?
Does this happen in a predefined routine in the meraki sdk, or a routine you have created yourself?
Is the organisation, which returns a 404, returned when you do HTTP GET /organizations ?
LinkedIn ::: https://blog.rhbirkelund.dk/

Like what you see? - Give a Kudo ## Did it answer your question? - Mark it as a Solution 🙂

All code examples are provided as is. Responsibility for Code execution lies solely your own.
Greenberet
Head in the Cloud

yes it happens when I make an api request against that organization

you can recreate it just by running the samples

yes it gets returned. Thats the main issue here, as you can't distinguish between api enabled/disabled organizations

Get notified when there are additional replies to this discussion.