OpenTV ENTera & OpenTV Platform Documentation

Change an account's status

Request

To change the status of an account, send a PUT request to:

http://<host>:<port>/adm/v1/accounts/<accountID>

Headers

  • Content-Type: application/json

Mandatory arguments

  • accountID

Other arguments

If you do not supply a value for a parameter that already has a value, it will be set to null.

So the recommended approach is to use a GET /adm/v1/accounts/<accountID> request to get the account, change the value of the status field, then use this modified set of parameters in the body of the PUT request.

To change the account's status, set the value of the status field

"status": "<status>"

status can be one of the following:

  • ACTIVE

  • RESTRICTED

  • SUSPENDED

  • CANCELLED

Example

A PUT request that includes the following in its payload suspends the specified account:

"status": "SUSPENDED"


Once an account has been put into the CANCELLED state, it cannot be modified.

Response

A successful request returns an HTTP 200 status.

An unsuccessful request returns an HTTP 400 status. The response includes details of the error.

Example

{
    "matchedCount": 1,
    "modifiedCount": 1
}

See also

For full details of this API, see Account and Device Manager (ADM) API documentation.