Method: beacons.attachments.create

Associates the given data with the specified beacon. Attachment data must contain two parts:

  • A namespaced type.
  • The actual attachment data itself.
The namespaced type consists of two parts, the namespace and the type. The namespace must be one of the values returned by the namespaces endpoint, while the type can be a string of any characters except for the forward slash (/) up to 100 characters in length.

Attachment data can be up to 1024 bytes long.

Authenticate using an OAuth access token from a signed-in user with Is owner or Can edit permissions in the Google Developers Console project.

HTTP request

POST https://proximitybeacon.googleapis.com/v1beta1/{beaconName=beacons/*}/attachments

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
beaconName

string

Beacon on which the attachment should be created. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are 3 for Eddystone-UID, 4 for Eddystone-EID, 1 for iBeacon, or 5 for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required.

Query parameters

Parameters
projectId

string

The project id of the project the attachment will belong to. If the project id is not specified then the project making the request is used. Optional.

Request body

The request body contains an instance of BeaconAttachment.

Response body

If successful, the response body contains a newly created instance of BeaconAttachment.

Authorization

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/userlocation.beacon.registry

For more information, see the Auth Guide.