Product SiteDocumentation Site

2.13. Access Point creation

It is possible to create a new Access Point by submitting a POST request to the following URI:
https://hostname/api/v1/access_points
To successfully create a new access point it is required to provide a sensor_uuid (sensor UUID of which the newly created AP will be descendant). If said parameter is not given a HTTP 404 Not Found status code will be returned. It is also required that the user submitting the request can manage the sensor specified. If the user does not have permission a HTTP 401 Unauthorized status code will be returned. APs validate name and mac_address on creation thus making said parameters mandatory. If either of these parameters are missing a HTTP 422 Unprocessable Entity status code will be returned along with the specific error on the requested format.
The following parameters are also accepted on the request payload:
You may also provide the access point enrichment parameters as a JSON object for the "enrichment" tag. The enrichment tag allows four possible values, these are:
An example request can be found on the following lines:
      Request:
        HTTP Verb: POST
      	URI: https://hostname/api/v1/access_points.json?auth_token=xxxxxx
      	Payload: { "mac_address":"ed:f4:22:45:ff:ef","enrichment": {
				  "campus_uuid": "84758975876475",
				  "floor_uuid": "8001483943459605430"
				}, "sensor_uuid":"5654545586888876551", "name":"Demo_AP6", "flow_uuid":"89479888298873783"}

      Response:
		  {
		    "query": true,
		    "ap": {
		        "id": 776,
		        "ip_address": null,
		        "mac_address": "ed:f4:22:45:ff:ef",
		        "name": "Demo_Access_Point",
		        "switch_name": null,
		        "switch_id": null,
		        "latitude": null,
		        "longitude": null,
		        "x": null,
		        "y": null,
		        "sensor_id": 265,
		        "created_at": "2015-06-02T11:33:54.841+02:00",
		        "updated_at": "2015-06-02T11:33:54.841+02:00",
		        "description": null,
		        "status": 0,
		        "last_check_in": null,
		        "clients": 0,
		        "uptime": 0,
		        "enrichment": {
		            "campus_uuid": "84758975876475",
		            "floor_uuid": "8001483943459605430"
		        },
		        "sensor_name": "Restaurant",
		        "sensor_uuid": "5654545586888876551"
		    }
		  }