Enabling / Disabling a Discovery Profile for a Player

With the Discovery API, you can enable or disable a previously created discovery profile. This is equivalent to using the Turn On Discovery For This Player setting in the Backlot UI (see About Creating and Managing Profiles with the Backlot UI).

To enable a discovery profile, include { "discovery_enabled" : "true" } property in the request body with the PUT route shown above.
[PATCH]/v2/players/e18ab1da1813483499554ea2d8e67fbd/discovery/profile{  
   "discovery_enabled":"true"
}

Possible HTTP response codes and bodies:

  • 200: Success
  • 401: General failure. This code is returned if you try to enable a discovery profile that is already enabled, or if you try to a disable discovery profile that is already disabled. In this case, the response body can include any of the following error messages:
    {"message":"Discovery not enabled"}
    {"message":"Discovery already enabled"}
    {"message":"\"enable\" parameter missing or invalid, valid values: true, false"}
    {"message":"Module is invalid. Cannot add/remove module to player."}
    {"message":"Player is invalid. Cannot add/remove module to player."}
To disable a discovery profile, include { "discovery_enabled" : "false" } property in the request body with the PUT route.
[PATCH]/v2/players/e18ab1da1813483499554ea2d8e67fbd/discovery/profile{
   "discovery_enabled":"false"
}

See the possible response bodies and HTTP response codes in the preceding example.

Note: Try out the code samples using your account credentials in the Ooyala Scratchpad. To launch the Scratchpad, go to Ooyala API Scratchpad. For information about using the Scratchpad, see Practice Making Requests with the Scratchpad.

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