endpoint

Set data quota

<Info icon="fa-light fa-lock" className="permission-callout"> <div className="permission-callout__header"><span className="permission-callout__title"><span className="permission-callout__label">Required permissions</span> <span className="fern-docs-badge small blue subtle rounded-full permission-callout__beta">Beta</span></span> <span className="permission-callout__learn-more">[Learn more](/developers/api-guidelines/permissions#how-permissions-work)</span></div>

Endpoint.Quota.Data + Create

<div className="permission-callout__roles"><span className="permission-callout__roles-label">Roles:</span> <Badge intent="info">Administrator</Badge> <Badge intent="info">User</Badge></div> </Info>

Set a new data quota. You can set a new data quota for a device at any time. At an initial state, when no data quota is set, the device is denied from using data services. To top-up the data volume, you need to retrieve the remaining volume, increase it by the top-up volume, and set it as the new quota volume.

<Warning> We have deprecated throttling as an action on quota exhaustion and the associated peak throughput parameter. These were decommissioned as of December 9, 2024.** </Warning>

The following parameters can be configured:

  • status (required) - The status of the quota:
    • 1: ACTIVE
    • 2: EXHAUSTED
    • 3: EXPIRED
  • volume - Remaining quota volume in MB
  • expiry_date (required) - Timestamp when the quota expires and the device is denied from using further data services
  • auto_refill (default: 0) - Whether the quota should be refilled on a daily basis:
    • 0: Disabled
    • 1: Enabled
  • threshold_percentage - The remaining quota percentage when the system generates a "Quota threshold reached" event
  • action_on_exhaustion: Action executed after the quota is exhausted:
    • id (required) - Unique identifer of the action on quota exhaustion
      • 1: Block
      • DEPRECATED 2: Throttle
<Note> **Events**: The system generates a "Quota used up" event if the data quota is completely depleted. Then, the device is blocked from further consumption of data. The quota object is included in the event details. </Note> <Info> The device can instantly use data services after successfully making this API call. You can set any timestamp with a future date. This allows you to create data packages as required (for example, 1 hour, 24 hours, 7 days, or any other timeframe). </Info>
post/api/v1/endpoint/{endpoint_id}/quota/data

Request

  • Base URL: https://cdn.emnify.net
  • URL: https://cdn.emnify.net/api/v1/endpoint/{endpoint_id}/quota/data
  • Auth: HTTP bearer

Path parameters

endpoint_idinteger required

Numeric ID of an endpoint

Request body

last_volume_addedstring
last_status_change_datestring
auto_refillinteger
threshold_volumestring
threshold_percentagestring
volumestring required
expiry_datestring required

Response

Resource Created

EndpointEndpointQuotaDataByEndpointIdPostResponse201 required

Empty response body

Changes

No recorded changes to this operation across all 1 revision of this API.