Insert a client device policy
1 min
POST
https://api.fictive.com/REST/api/device-policies
Header Parameters
- X-TokenIdstringDescription
- X-SessionIdstringDescription
- X-VersionstringrequiredDescription
- OriginstringDescription
Body Parameters
- devicePolicyDTOFictiveGlobal.Api.Rest.Dtos.v1.Devices.DevicePolicyDTOrequired
- devicePolicyReferencestring
- allowedDevicesinteger<int32>Description
- deviceChangesAllowedinteger<int32>Description
- deviceChangesUnitstring<none | hours | days | months | years>Description
- deviceChangesPeriodinteger<int32>Description
- allowedPlayoutSlotsinteger<int32>Description
- removeAllCustomPoliciesboolean
- deviceChangesConsumedinteger<int32>Description
- parentPolicyReferencestringDescription
- devicesFictiveGlobal.Api.Rest.Dtos.v1.Devices.DeviceDTO[]Description
- deviceReferencestring
- deviceNamestring
- deviceTypestring<none | mobile | tablet | console | tv | desktop>
- statusstring<Active | AwaitingDeletion>Description
- identifierstring
- registeredDatestring<date-time>Example
- lastUpdateDatestring<date-time>
- registeredSlotFictiveGlobal.Api.Rest.Dtos.v1.Devices.DeviceSlotDTO
- slotReferencestring
- lastUpdatedDatestring<date-time>
Responses
200
- stringDescription
400
401
403
curl
curl --request POST \
--url https://api.fictive.com/REST/api/device-policies \
--header 'accept: application/json' \
--header 'x-version: string'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-version", "string");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.fictive.com/REST/api/device-policies", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.fictive.com/REST/api/device-policies")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-version"] = "string"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.fictive.com/REST/api/device-policies"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-version': 'string'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// OK
""400
// • The deviceChangesUnit parameter must contain hours, days, months or years value.
• The allowedDevices parameter must contain an integer greater than 0.
• The deviceChangesAllowed parameter must contain an integer greater than 0.
• The deviceChangesPeriod parameter must contain an integer greater than 0.
• The allowedPlayoutSlots parameter must contain an integer greater than 0.
401
// API Authentication Failure: Invalid Authentication Type/Credentials Provided.
403
// • A device management policy already exists, please update the existing policy.
• Missing privilege.
• Disabled Device Management Feature.