Device Registration API for Customer Support Portals

Part of the Ooyala Rights Locker family of APIs, Ooyala's REST-based device registration API can be used to construct customer support tools. The APIs are designed to be called from servers running provider's the administration portal that customer support uses. The APIs include the following features:

  • Get history of deletes, adds, and errors of any customer specific accounts for up to a year
  • Override the device limit on any specific account
  • Update device information for any specific account
  • Delete devices without incrementing the delete limit.
Note: The endpoint for these calls is rl.ooyala.com.

About the Actor for Update/Delete

In requests that rely on PUT and DELETE to update or remove settings, in addition to other properties that might be required for the operation, the body of the request must include the following properties, where the value of actor is the administrator's username:
{  
 . 
 . 
 . 
   "actor" : "admin username"
   "actor_type" : "admin"  . 
 . 
 .
}

Get List of Registered Devices for a Viewer

[GET]rl.ooyala.com/device_management/pcode/pcode/account_id/account_id/devices

Response

In the response, devices is an array containing the following fields for each device registered with the viewer.

{  
   “device_limit”:“maximum number of devices allowed”,
    “next_delete_time”:“time at which the device can be deleted (ISO 8601)”
   “devices”:[  
      {  
         "public_device_id":“sample_device_id”,
         "user_agent":”sample_user_agent”,
         "registration_time":“time at which registered (ISO 8601)”
         "nickname":“device_nickname”
      },
      . 
 . 
 .
   ]
}

Get Last Results for an Account

The value of the results property in the response from the /last_result qualifier is a message about the success or failure of an account's recent attempts to register devices. This request is similar to /last_results qualifier for the user portal, except for customer support, it returns all results for all playback sessions for the given account. (For user portals, /last_result returns information only for a specific playback session associated with the passed-in auth_token.)

[GET]rl.ooyala.com/device_management/pcode/pcode/account_id/account_id/last_result

Example Response

The example below shows two device registrations, both successful.

[  
   {  
      "user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:23.0) Gecko/20100101 Firefox/23.0",
      "registration_time":"2013-09-09 13:15:01 -0700",
      "result":"new device registered",
      "public_device_id":"aadf73a0-54ec-424d-9666-c70d17bc8f8b"
   },
   {  
      "user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:23.0) Gecko/20100101 Firefox/23.0",
      "registration_time":"2013-09-09 12:21:18 -0700",
      "result":"new device registered",
      "public_device_id":"48cf9f3f-71f6-4114-a544-a1c13d97a298"}
   }
]

Get History of All Actions on an Account

Account history can be used by Customer Support to diagnose problems with deleting, renaming, and adding devices to an account. The account history displays what action was taken, when it was taken, and by whom.

[GET]rl.ooyala.com/device_management/pcode/>pcode/account_id/account_id/history

Response

[  
   {  
      “public_device_id”: “sample_device_id”,
      “user_agent”: “sample_user_agent”,
      “action_time”: “time at which action occurred (ISO 8601)”,
      “action”: “sample_action”,
      “nickname”: “”,
      "actor": “sample_actor”
   },
   . 
 . 
 .
]
  • action_time: The time the action happened.
  • action: The action done which include device registration, device deletion, add device nickname.
  • actor: The user’s account id or admin support email if the customer support API called the action.

Delete Single Device

[DELETE]rl.ooyala.com/device_management/pcode/pcode/account_id/account_id/devices/public_device_id{  
    "actor":"admin username"
    "actor_type":"admin"
}

Responses

200 {"message": "OK"} - Request succeeded

404 {"message" "device does not exist"} - account_id under pcode not found

Delete all devices

[DELETE]rl.ooyala.com/device_management/pcode/pcode/account_id/account_id/devices{  
    "actor":"admin username"
    "actor_type":"admin"
}

Responses

200 {"message": "OK"} - Request succeeded

404 {"message" "device does not exist"} - account_id under pcode not found

Modify Device Limit

[PUT]rl.ooyala.com/device_management/pcode/pcode/account_id/account_id/device_limit{
   "device_limit":device_limit
}

Responses

200 {"message": "OK"} - Request succeeded

404 {"message" "device does not exist"} - account_id under pcode not found

Get Device Limit

[GET]rl.ooyala.com/device_management/pcode/pcode/account_id/account_id/device_limit

Responses

{
   “device_limit”:“actual limit”,
}

Update a device’s nickname

[PUT]rl.ooyala.com/device_management/pcode/pcode/account_id/account_id/devices/public_device_id{  
   "nickname":"someNickname"
   "actor":"admin username"
   "actor_type":"admin"
}

Responses

200 {"message": "OK"} - Request succeeded.

404 {"message" "device does not exist"} - account_id under pcode not found

해당 내용이 도움 되었습니까?