Contact Us

cancel
Showing results for 
Search instead for 
Did you mean: 
Moderator
Moderator

Setting a daily limit per endpoint using the API

You can configure monthly data limits in the UI, within the Service Profile configuration. Once the data limit is exceeded by an endpoint (which has that service profile assigned), the PDP Context is rejected and an alarm is displayed in the UI. 

 

If you would like to define a daily data limit, you can use the API Quota Management (you can also set an expiration date). It is also possible to define an action to be performed on the expiration date, i.e. the endpoint can be blocked for data services or merely see the connection throttled.

 

The daily limit will auto-refill everyday at midnight UTC until the expiry date is reached.

 

Quota 

POST https://sapiotconnect365.sapdigitalinterconnect.com/api/v1/endpoint/{endpoint-Id}/quota/data

 

Header

Content-Type: application/json

Bearer {{auth_token}}

 

Body

Status

id: 1, 2 or 3

Description: Active, Exhausted or Expired

Volume: Any, format e.g. 100.00 (MB)

Auto Refill: True or false

Expiry Date: Any, format - "yyyy-mm-ddThh:mm:ss+utc_offset"

Action On Exhaustion

id: 1 or 2

Description: Block or Throttle 

Peak Throughput: If throttle - 64000, 128000 or 256000 (bits per second)

 

Example (via Postman):

{
    "status": {
        "id": 1,
        "description": "ACTIVE"
    },
    "volume": 100.00,
    "expiry_date": "2017-05-19T08:00:00+0000",
    "auto_refill": true,
    "action_on_exhaustion": {
        "id": 2,
        "description": "Throttle",
        "peak_throughput": 128000
    }
}

 

Quota status

GET  https://sapiotconnect365.sapdigitalinterconnect.com/api/v1/endpoint/{endpoint-Id}/quota/data

 

Example (via Postman):

{
    "volume": 10,
    "expiry_date": "2017-05-19 08:00:00",
    "peak_throughput": 128000,
    "last_volume_added": 100,
    "last_status_change_date": "2017-05-07 10:52:46",
    "auto_refill": true,
    "status": {
        "description": "ACTIVE",
        "id": 1
    },
    "action_on_exhaustion": {
        "action_on_quota_exhaustion_id": "2",
        "description": "Throttle",
        "id": 2
    }
}

 

John Candish Product Manager, SAP IoT Connect 365
Labels (3)
0 Kudos