PUT beacon/…

Stores or updates a specific beacon definition.

Resource URL

https://www.drillster.com/api/2.1.1/beacon/{id}

Parameters

Field Type Description
id
required
String Unique reference (ID) for this beacon. This reference consists of a UUID, followed by an underscore, then the major beacon value (in hex), another underscore and finally the minor beacon value (in hex).

The UUID is fixed and is always equal to 07212ead-8344-4426-8b41-8b0cb621625a.

Example value: 07212ead-8344-4426-8b41-8b0cb621625a_0000_0001
playableType
required
String The type of the playable associated with the beacon.

  • DRILL — A single drill
  • COURSE — A collection of drills
  • TEST — A test
playableId
required
String The unique ID of the drill, course or test associated with the beacon.

Example value: gDCIpKnSSA-JIFiQxPq31g
proximity
required
String Represents the beacon proximity that should trigger a message. This follows the iBeacon guidelines for beacon proximity.

Supported values:

  • FAR – approximately 10 meters
  • NEAR – a few meters
  • IMMEDIATE – a few centimeters
description
optional
String An optional description of this beacon. The value is not shared with end users.
lingerDuration
required
ISO 8601 duration The duration a beacon should remain visible in a client application after first detection.

Example value: PT5M (meaning five minutes).

If a PUT request has no body (i.e. the body is empty), it is still mandatory to include a Content-Length header (i.e. Content-Length: 0). Not all HTTP clients do this automatically. For more information, please see RFC 2616.

Response

An empty response indicating a successful result.

Example request

PUT https://www.drillster.com/api/2.1/beacon/07212ead-8344-4426-8b41-8b0cb621625a_0000_0001
proximity=NEAR
description=iBeacon+in+main+hall
lingerDuration=PT5M
playableType=DRILL
playableId=StpFP7LctGCsYOMX2vIBgw

Response

{}

Error responses

The following error situations are possible:

ID Description
not_permitted Functionality not available to basic users, or major value may not be used by this organization.
invalid_input Input validation issue (see explanation in error message for clarification).