Rights Mgt Service (RMG)
See also
1. Retry Policy
Client errors (4xx) should not be retried. There is a problem with the request, and therefore the same request will result in the exact same error.
Server errors (5xx) shall be retried up to 3 times with exponential backoff algorithm for better flow control (ie. use progressively longer waits between retries for consecutive error responses)
2. Sample Requests
2.1. Operations on Entitlements
2.1.1. Create an Entitlement
2.1.1.1. Request
POST /rmg/v1/operator/entitlements HTTP/1.1
{
"_id": "id_entitlement_01_ssp",
"productId": "subs_prod_01_ssp",
"accountId": "id_acc_01_ssp",
"validityType": "ABSOLUTE",
"productType": "SUBSCRIPTION",
"validFrom": "2017-01-26T06:10:43Z",
"expiryDate": "2018-01-26T06:10:43Z"
}
2.1.1.2. Response
201 Created
{
"_id": "id_entitlement_01_ssp"
}
Note:
Please note that the entitlement is assigned at the account level. All devices under the account will have the right.
2.1.2. Unsubscribe the Entitlement
2.1.2.1. Request
PUT /rmg/v1/operator/entitlements/id_entitlement_01_ssp HTTP/1.1
{
"status": "UNSUBSCRIBED"
}
2.1.2.2. Response
200 OK
{
"matchedCount": 1,
"modifiedCount": 1
}
2.1.3. Re-subscribe the Entitlement
2.1.3.1. Request
PUT /rmg/v1/operator/entitlements/id_entitlement_01_ssp HTTP/1.1
{
"status": "SUBSCRIBED",
}
2.1.3.2. Response
200 OK
{
"matchedCount": 1,
"modifiedCount": 1
}
2.2. Retrieve Entitlements With Pagination
2.2.1. Retrieve the Number of Existing Entitlements
2.2.1.1. Request
GET /rmg/v1/operator/entitlements?limit=0 HTTP/1.1
2.2.1.2. Response
200 OK
{
"totalRecords": 2145
}
2.2.2. Retrieve Entitlements in Batches
2.2.2.1. Request
GET /rmg/v1/operator/entitlements?limit=100&page=1 HTTP/1.1
2.2.2.2. Response
200 OK
{
"totalRecords": 2145,
"resourceSet": [
{
"_id": "satEntitlement",
"productId": "d_prod_01_ssp",
"accountId": "id_acc_01_ssp",
"status": "SUBSCRIBED",
"validityType": "ABSOLUTE",
"productType": "FREE",
"validFrom": "2016-10-27T06:10:43Z",
"expiryDate": "2058-10-27T06:10:43Z",
"created": "2018-07-19T04:44:30Z",
"isArchivable": true
},
{
"_id": "test",
"productId": "id_prod_01_ssp",
"accountId": "id_acc_01_ssp",
"status": "SUBSCRIBED",
"validityType": "ABSOLUTE",
"productType": "FREE",
"validFrom": "2016-10-27T06:10:43Z",
"expiryDate": "2058-10-27T06:10:43Z",
"created": "2018-07-19T12:53:11Z",
"isArchivable": true
},
... <up to 100 entitlement records> ...
]
}