Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

https://bluzone.io/portal/static/docs/index.html#_blufitemplates_resource

...

Example Delete Blufi Template(s)

This API supports a bulk process. You can PUT an array of Blufi Template Ids and the service will delete them.  This process is transactional.  All must delete with success or none will be deleted and an error will be returned.  On success, Bluzone responds with a 204 Success, no content.  

Code Block
languagebash
titleDelete Blufi Template(s)
curl -X POST \
  https://bluzone.io/portal/papis/v1/projects/$YOUR_PROJECT_ID/blufiTemplates \
  -H 'accept: application/json' \
  -H 'bzid: $YOUR_API_KEY_HERE' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '[10001,10002,10003]'

NOTE:  Starting November 1, the above API will be deprecated in favor of the below pattern which adds the "/_delete" to the endpoint.  This change makes the API more consistent with other Bluzone bulk delete APIs.

Code Block
languagebash
titleAlternate delete API
curl -X POST \
  https://bluzone.io/portal/papis/v1/projects/$YOUR_PROJECT_ID/blufiTemplates/_delete \
  -H 'accept: application/json' \
  -H 'bzid: $YOUR_API_KEY_HERE' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '[10001,10002,10003]'

Example Create Blufi Template

Code Block
languagejs
themeConfluence
titleCreate a BlufiTemplatecollapsetrue
curl --request POST \
  --url https://bluzone.io/portal/papis/v1/projects/988/blufiTemplates \
  --header 'accept: application/json' \
  --header 'bzid: MY_BZ_API_KEY' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '
	{
		"name": "My Blufi Template",
		"ssid": "myssid",
		"projectId": 988,
		"tags": [
			{
				"tagId": 2726,
				"projectId": 988,
				"value": "room-387",
				"displayName": "room-387"
			},{
				"tagId": 2727,
				"projectId": 988,
				"value": "blufi",
				"displayName": "blufi"
			},{
				"tagId": 2728,
				"projectId": 988,
				"value": "wh-123",
				"displayName": "wh-123"
			}
		],
		"securityType": {
			"securityTypeKey": "WPA2",
			"enterprise": false
		},
		"passphrase": "mywifipasscode"
	}'

...

Code Block
languagejs
themeConfluence
titleGet All BlufiTemplatescollapsetrue
curl --request GET \
>   --url https://bluzone.io/portal/papis/v1/projects/988/blufiTemplates \
>   --header 'accept: application/json' \
>   --header 'bzid: MY_BZ_API_KEY' \
>   --header 'cache-control: no-cache' \
>   --header 'content-type: application/json'
[
	{
		"wifiProfileId": null,
		"templateId": 2307,
		"edgeDeviceId": null,
		"projectId": 988,
		"name": "My Blufi Template",
		"description": null,
		"ssid": "myssid",
		"channels": "1,2,3,4,5,6,7,8,9,10,11,12,13,14",
		"rssiThreshold": -99,
		"securityType": {
			"securityTypeKey": "WPA2",
			"enterprise": false
		},
		"username": null,
		"passphrase": "my-wifi-password",
		"certFileName": null,
		"certData": null,
		"tags": [
			{
				"tagId": 2726,
				"projectId": 988,
				"value": "room-387",
				"displayName": "room-387"
			},
			{
				"tagId": 2727,
				"projectId": 988,
				"value": "blufi",
				"displayName": "blufi"
			},
			{
				"tagId": 2728,
				"projectId": 988,
				"value": "wh-123",
				"displayName": "wh-123"
			}
		],
		"policies": [

		],
		"scanMode": {
			"scanModeId": 1,
			"name": "System Beacon Management Scan Mode",
			"description": "Optimized for remote beacon configuration",
			"assetTrackingMode": false,
			"deviceJobMode": false,
			"scanInterval": 80,
			"scanWindow": 80,
			"channels": "37,38,39,2491,2498,255",
			"channelCycles": "1,1,1,10,10,0",
			"channelCount": 6,
			"trackingChannels": "",
			"idleCycles": 0,
			"scanMode": 0,
			"wifiProbe": false,
			"startFrequency": 0,
			"frequencyStep": 0,
			"sweepChannelCount": 0,
			"sweepMode": 0,
			"dwellTime": 24,
			"scanDelayTime": -11,
			"maxNoise": 0,
			"minSnr": 0,
			"maxSnr": 0,
			"wifiProbeChannel": 6,
			"wifiProbeInterval": 0,
			"wifiProbeWindow": 0,
			"dateCreated": 1463515421000,
			"dateUpdated": null
		},
		"sleepSchedule": null,
		"assetTrackingEnabled": false,
		"autoCreatePLSPolicy": false,
		"dateCreated": 1500907953000,
		"dateUpdated": 1500907953000
	}
]

...