Payload for rfProfile creation and update with dashboard

SOLVED
Meraki_auto
Conversationalist

Payload for rfProfile creation and update with dashboard

Hi, There,


I try to create and update rfProfile using dashboard(v1.6)

According to the API document (https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-rf-profile), I only need to enter 3 parameters when try to create new reprofile

response = dashboard.wireless.createNetworkWirelessRfProfile( network_id, name, band_selection_type ).

This can create a new rfprofile in meraki, but all the parameters for the newly created rfprofile are default.

I have created payload already, but could not find where I can add to the request that allow all the desired parameters being created in one go.

 

I thought maybe I need to create a new rfprofile with default value first, then use update method to update. but in the update method, I could not find any place to add my payload.

 

Any suggestion for this?

 

Thank you in advance.

1 ACCEPTED SOLUTION

Hi Sungod,

 

After tested with other API, I got your point.

The meraki api won't be able to use payload method to update all information in one go, I have to specify each parameter and their value in the python code.

 

Thank you for your help.

 

View solution in original post

3 REPLIES 3
sungod
Head in the Cloud

The create API call takes these arguments...

 

		- networkId (string): (required)
		- name (string): The name of the new profile. Must be unique. This param is required on creation.
		- bandSelectionType (string): Band selection can be set to either 'ssid' or 'ap'. This param is required on creation.
		- clientBalancingEnabled (boolean): Steers client to best available access point. Can be either true or false. Defaults to true.
		- minBitrateType (string): Minimum bitrate can be set to either 'band' or 'ssid'. Defaults to band.
		- apBandSettings (object): Settings that will be enabled if selectionType is set to 'ap'.
		- twoFourGhzSettings (object): Settings related to 2.4Ghz band
		- fiveGhzSettings (object): Settings related to 5Ghz band

 

I haven't used this call, but would assume you just add all the ones where you want non-default values.

 

If you look at the body schema section at https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-rf-profile and click the + to fully expand it, you will see what the various objects can contain. Also look at the response sample body to see example format of the objects.

 

The update call body is similar except you must give the "rfProfileId" (string) argument, presumably the "id" element returned from a create or get call.

 

Hi Sungod,

Thank you for your reply.

 

What I would like to do is build a json data contains all the objects and use meraki api to create rfprofile.

If I use post method under request module, I can either define those parameter one by one of use payload to update.

But with meraki api(createNetworkWirelessRfProfile), there is no place for me to add the payload and specify other parameters.

 

Please see the attachment meraki1.png, it only allows 4 parameters to be entered including self, I tried to add one parameter, but got error that it only accept 4.

When I try to construct the api call within pycharm, it display "kwargs" in the createNetworkWirelessRfProfile method(see meraik2.png), I assume that I can use it do add payload, but could not figure out how to do it.

 

Any suggestion on this.meraki2.png

 

meraki1.png

Hi Sungod,

 

After tested with other API, I got your point.

The meraki api won't be able to use payload method to update all information in one go, I have to specify each parameter and their value in the python code.

 

Thank you for your help.

 

Get notified when there are additional replies to this discussion.