implement all the changes with one or a small number of
transactions instead of a large number of individual API
requests. Action batch transactions can be run either
synchronously, waiting for the API call return before
continuing, or asynchronously, in which case the API call
does not wait for a return as the call is placed in a queue
for processing. (In Chapter 7 you saw the advantages and
disadvantages of both synchronous and asynchronous
APIs.) With action batches, you can be confident that all
the updates contained in the transaction were submitted
successfully before being committed because batches are
run in an atomic fashion: all or nothing.
After you have enabled the Meraki Dashboard API,
generated the API key, and saved it in a safe place, you
are ready to interact with the API. For the rest of this
chapter, you will use the always-on Cisco DevNet Meraki
Sandbox, which can be found at
https://developer.cisco.com/sandbox. The API key for
this sandbox is
15da0c6ffff295f16267f88f98694cf29a86ed87.
At this point, you need to obtain the organization ID for
this account. As you saw in Chapter 7, there are several
ways you can interact with an API: You can use tools like
curl and Postman, or you can interact with the API
through programming languages and the libraries that
they provide. In this case, you will use curl and Postman
to get the organization ID for the Cisco DevNet Sandbox
account and then the Cisco Meraki Python SDK.
As mentioned earlier, the base URL for the Dashboard
API is https://api.meraki.com/api/v0. In order to get the
organizations for the account with the API key
mentioned previously, you have to append the
/organizations resource to the base URL. The resulting
endpoint becomes
https://api.meraki.com/api/v0/organizations. You also
need to include the X-Cisco-Meraki-API-Key header for