curl -X PUT \
/entitlement/features/{id}/status \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"applyToExistingSubscriptions": ""
}'import requests
url = "https://coreapi.io/entitlement/features/{id}/status"
payload = {
"status": "active",
"applyToExistingSubscriptions": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'active', applyToExistingSubscriptions: true})
};
fetch('https://coreapi.io/entitlement/features/{id}/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/entitlement/features/{id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'active',
'applyToExistingSubscriptions' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "feature-1",
"name": "number of users",
"description": "This feature allows you to manage the number of users in your account.",
"status": "active",
"type": "switch",
"config": [
{
"value": "<string>",
"label": "<string>"
}
],
"unit": "<string>"
}Update feature status
Replaces the Feature resource.
curl -X PUT \
/entitlement/features/{id}/status \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"applyToExistingSubscriptions": ""
}'import requests
url = "https://coreapi.io/entitlement/features/{id}/status"
payload = {
"status": "active",
"applyToExistingSubscriptions": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'active', applyToExistingSubscriptions: true})
};
fetch('https://coreapi.io/entitlement/features/{id}/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/entitlement/features/{id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'active',
'applyToExistingSubscriptions' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "feature-1",
"name": "number of users",
"description": "This feature allows you to manage the number of users in your account.",
"status": "active",
"type": "switch",
"config": [
{
"value": "<string>",
"label": "<string>"
}
],
"unit": "<string>"
}Autorisierungen
Body
The updated Feature resource
Update the status of a entitlement feature.
Antwort
Feature resource updated
Get all entitlement features.
The status of the feature. Draft: The feature is not yet published. Those can be used to create entitlements but they won't be available until activation. Active: The feature is available and can be used. Archived: The feature is no longer available and can't be used for new entitlements. Existing entitlements will still work. Archived features can be activated again.
draft, active, archived "active"
The type of the feature.
switch: The feature can be enabled or disabled for a subscription. You can add additional config options in the options key.
custom: The levels of the feature can be fully customized. As an example, you can define a feature SLA with 3 levels: basic, premium, enterprise.
quantity: The levels of the feature are based on a quantity. As an example, you can define a feature number of users with levels 5, 10, 25, 50, 100. You can also provide a unlimited level.
range: The value can be customized in a given range. As an example, you can define a feature disk usage with a range from 1GB to 1000GB, you can also provide a unlimited level to allow all values.
switch, custom, quantity, range "switch"
War diese Seite hilfreich?