Company
Update company defaults
POST
/
companies
/
defaults
Update company defaults
curl --request POST \
--url https://api.reelevant.com/v2/companies/defaults \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"roleId": "<string>",
"resourceGroupIds": [
"<string>"
]
}
'import requests
url = "https://api.reelevant.com/v2/companies/defaults"
payload = {
"roleId": "<string>",
"resourceGroupIds": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({roleId: '<string>', resourceGroupIds: ['<string>']})
};
fetch('https://api.reelevant.com/v2/companies/defaults', 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://api.reelevant.com/v2/companies/defaults",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'roleId' => '<string>',
'resourceGroupIds' => [
'<string>'
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reelevant.com/v2/companies/defaults"
payload := strings.NewReader("{\n \"roleId\": \"<string>\",\n \"resourceGroupIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.reelevant.com/v2/companies/defaults")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"roleId\": \"<string>\",\n \"resourceGroupIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reelevant.com/v2/companies/defaults")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"roleId\": \"<string>\",\n \"resourceGroupIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"program": "<string>",
"version": "<string>",
"datetime": "<string>",
"message": "<string>",
"data": {
"id": "<string>",
"defaultRoleId": "<string>",
"defaultResourceGroupIds": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"disabled": true,
"name": "<string>",
"plan": {
"quotas": [
{
"type": "datasource",
"quota": 123,
"subtype": "<string>",
"usage": 123
}
],
"name": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"attributionPeriod": 123
},
"securityPolicy": {
"password": {
"duration": 123,
"rules": [
{
"type": "special-characters",
"options": {
"minimum": 1,
"maximum": 1
}
}
],
"attempts": {
"maximum": 1,
"lockDuration": 1
}
}
},
"variableProfiles": [
{
"id": "<string>",
"name": "<string>",
"variables": {
"rlvt-u": "<string>",
"rlvt-m": "<string>",
"utm_campaign": "<string>",
"utm_source": "<string>",
"utm_medium": "<string>",
"utm_term": "<string>"
}
}
],
"retention": 123,
"features": {},
"events": {
"product_page": "<string>",
"add_cart": "<string>",
"purchase": "<string>"
},
"meta": {},
"scim": {
"enabled": true,
"groupSync": true,
"roleSource": "groups",
"roleMapping": [
{
"group": "<string>",
"roleId": "<string>"
}
],
"deprovisionMode": "soft",
"defaultRoleId": "<string>",
"lastSyncAt": "2023-11-07T05:31:56Z"
},
"sso": {
"domains": [
"<string>"
],
"mode": "invitation",
"mandatory": true,
"identityProvider": {
"entityMeta": {
"xmlString": "<string>",
"meta": "<unknown>"
},
"entitySetting": {
"metadata": "<string>",
"entityID": "<string>",
"authnRequestsSigned": true,
"wantAssertionsSigned": true,
"wantMessageSigned": true,
"wantLogoutResponseSigned": true,
"wantLogoutRequestSigned": true,
"privateKey": "<string>",
"privateKeyPass": "<string>",
"isAssertionEncrypted": true,
"requestSignatureAlgorithm": "<string>",
"encPrivateKey": "<string>",
"encPrivateKeyPass": "<string>",
"assertionConsumerService": [
{
"Binding": "<string>",
"Location": "<string>",
"isDefault": true
}
],
"singleLogoutService": [
{
"Binding": "<string>",
"Location": "<string>",
"isDefault": true
}
],
"signatureConfig": {
"prefix": "<string>",
"location": {
"reference": "<string>",
"action": "append"
}
},
"loginRequestTemplate": {
"context": "<string>"
},
"logoutRequestTemplate": {
"context": "<string>"
},
"signingCert": "<string>",
"encryptCert": "<string>",
"transformationAlgorithms": [
"<string>"
],
"nameIDFormat": [
"<string>"
],
"allowCreate": true,
"relayState": "<string>",
"clockDrifts": [
123
],
"loginResponseTemplate": {
"context": "<string>",
"attributes": [
{
"name": "<string>",
"nameFormat": "<string>",
"valueXsiType": "<string>",
"valueTag": "<string>",
"valueXmlnsXs": "<string>",
"valueXmlnsXsi": "<string>"
}
],
"additionalTemplates": {
"attributeStatementTemplate": {
"context": "<string>"
},
"attributeTemplate": {
"context": "<string>"
}
}
},
"generateID": {},
"singleSignOnService": [
{
"Binding": "<string>",
"Location": "<string>",
"isDefault": true
}
],
"messageSigningOrder": "<string>",
"wantAuthnRequestsSigned": true,
"wantLogoutRequestSignedResponseSigned": true,
"tagPrefix": {}
},
"entityType": "<string>"
},
"lastLoginAt": "2023-11-07T05:31:56Z"
},
"custom": {
"colors": [
"<string>"
],
"workflowDomain": "<string>"
}
},
"code": 123
}{
"program": "<string>",
"version": "<string>",
"datetime": "<string>",
"status": "fail",
"code": 123,
"message": "<string>",
"data": {},
"error_code": 123
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Was this page helpful?
⌘I
Update company defaults
curl --request POST \
--url https://api.reelevant.com/v2/companies/defaults \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"roleId": "<string>",
"resourceGroupIds": [
"<string>"
]
}
'import requests
url = "https://api.reelevant.com/v2/companies/defaults"
payload = {
"roleId": "<string>",
"resourceGroupIds": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({roleId: '<string>', resourceGroupIds: ['<string>']})
};
fetch('https://api.reelevant.com/v2/companies/defaults', 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://api.reelevant.com/v2/companies/defaults",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'roleId' => '<string>',
'resourceGroupIds' => [
'<string>'
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reelevant.com/v2/companies/defaults"
payload := strings.NewReader("{\n \"roleId\": \"<string>\",\n \"resourceGroupIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.reelevant.com/v2/companies/defaults")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"roleId\": \"<string>\",\n \"resourceGroupIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reelevant.com/v2/companies/defaults")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"roleId\": \"<string>\",\n \"resourceGroupIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"program": "<string>",
"version": "<string>",
"datetime": "<string>",
"message": "<string>",
"data": {
"id": "<string>",
"defaultRoleId": "<string>",
"defaultResourceGroupIds": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"disabled": true,
"name": "<string>",
"plan": {
"quotas": [
{
"type": "datasource",
"quota": 123,
"subtype": "<string>",
"usage": 123
}
],
"name": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"attributionPeriod": 123
},
"securityPolicy": {
"password": {
"duration": 123,
"rules": [
{
"type": "special-characters",
"options": {
"minimum": 1,
"maximum": 1
}
}
],
"attempts": {
"maximum": 1,
"lockDuration": 1
}
}
},
"variableProfiles": [
{
"id": "<string>",
"name": "<string>",
"variables": {
"rlvt-u": "<string>",
"rlvt-m": "<string>",
"utm_campaign": "<string>",
"utm_source": "<string>",
"utm_medium": "<string>",
"utm_term": "<string>"
}
}
],
"retention": 123,
"features": {},
"events": {
"product_page": "<string>",
"add_cart": "<string>",
"purchase": "<string>"
},
"meta": {},
"scim": {
"enabled": true,
"groupSync": true,
"roleSource": "groups",
"roleMapping": [
{
"group": "<string>",
"roleId": "<string>"
}
],
"deprovisionMode": "soft",
"defaultRoleId": "<string>",
"lastSyncAt": "2023-11-07T05:31:56Z"
},
"sso": {
"domains": [
"<string>"
],
"mode": "invitation",
"mandatory": true,
"identityProvider": {
"entityMeta": {
"xmlString": "<string>",
"meta": "<unknown>"
},
"entitySetting": {
"metadata": "<string>",
"entityID": "<string>",
"authnRequestsSigned": true,
"wantAssertionsSigned": true,
"wantMessageSigned": true,
"wantLogoutResponseSigned": true,
"wantLogoutRequestSigned": true,
"privateKey": "<string>",
"privateKeyPass": "<string>",
"isAssertionEncrypted": true,
"requestSignatureAlgorithm": "<string>",
"encPrivateKey": "<string>",
"encPrivateKeyPass": "<string>",
"assertionConsumerService": [
{
"Binding": "<string>",
"Location": "<string>",
"isDefault": true
}
],
"singleLogoutService": [
{
"Binding": "<string>",
"Location": "<string>",
"isDefault": true
}
],
"signatureConfig": {
"prefix": "<string>",
"location": {
"reference": "<string>",
"action": "append"
}
},
"loginRequestTemplate": {
"context": "<string>"
},
"logoutRequestTemplate": {
"context": "<string>"
},
"signingCert": "<string>",
"encryptCert": "<string>",
"transformationAlgorithms": [
"<string>"
],
"nameIDFormat": [
"<string>"
],
"allowCreate": true,
"relayState": "<string>",
"clockDrifts": [
123
],
"loginResponseTemplate": {
"context": "<string>",
"attributes": [
{
"name": "<string>",
"nameFormat": "<string>",
"valueXsiType": "<string>",
"valueTag": "<string>",
"valueXmlnsXs": "<string>",
"valueXmlnsXsi": "<string>"
}
],
"additionalTemplates": {
"attributeStatementTemplate": {
"context": "<string>"
},
"attributeTemplate": {
"context": "<string>"
}
}
},
"generateID": {},
"singleSignOnService": [
{
"Binding": "<string>",
"Location": "<string>",
"isDefault": true
}
],
"messageSigningOrder": "<string>",
"wantAuthnRequestsSigned": true,
"wantLogoutRequestSignedResponseSigned": true,
"tagPrefix": {}
},
"entityType": "<string>"
},
"lastLoginAt": "2023-11-07T05:31:56Z"
},
"custom": {
"colors": [
"<string>"
],
"workflowDomain": "<string>"
}
},
"code": 123
}{
"program": "<string>",
"version": "<string>",
"datetime": "<string>",
"status": "fail",
"code": 123,
"message": "<string>",
"data": {},
"error_code": 123
}