Clear a switched attribute value for the current user
curl --request DELETE \
--url https://{instance}.omniapp.co/api/v1/user-attribute-selections \
--header 'Authorization: Bearer <token>'import requests
url = "https://{instance}.omniapp.co/api/v1/user-attribute-selections"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{instance}.omniapp.co/api/v1/user-attribute-selections', 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://{instance}.omniapp.co/api/v1/user-attribute-selections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{instance}.omniapp.co/api/v1/user-attribute-selections"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://{instance}.omniapp.co/api/v1/user-attribute-selections")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/user-attribute-selections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"records": [
{
"user_attribute_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "client",
"label": "Client",
"multiple_values": false,
"allow_any_value": false,
"selectable_values": [
"acme",
"globex",
"initech"
],
"selected_values": null
}
]
}{
"detail": "Bad Request: userAttributeId: Invalid UUID",
"status": 400
}{
"detail": "Unauthorized: Missing or invalid API key",
"status": 401
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}User attributes
Clear a switched attribute value for the current user
Clear the calling user’s switch for a user attribute, restoring the administrator-assigned value. Clearing an attribute that is not currently switched succeeds and changes nothing.
DELETE
/
v1
/
user-attribute-selections
Clear a switched attribute value for the current user
curl --request DELETE \
--url https://{instance}.omniapp.co/api/v1/user-attribute-selections \
--header 'Authorization: Bearer <token>'import requests
url = "https://{instance}.omniapp.co/api/v1/user-attribute-selections"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{instance}.omniapp.co/api/v1/user-attribute-selections', 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://{instance}.omniapp.co/api/v1/user-attribute-selections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{instance}.omniapp.co/api/v1/user-attribute-selections"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://{instance}.omniapp.co/api/v1/user-attribute-selections")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/user-attribute-selections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"records": [
{
"user_attribute_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "client",
"label": "Client",
"multiple_values": false,
"allow_any_value": false,
"selectable_values": [
"acme",
"globex",
"initech"
],
"selected_values": null
}
]
}{
"detail": "Bad Request: userAttributeId: Invalid UUID",
"status": 400
}{
"detail": "Unauthorized: Missing or invalid API key",
"status": 401
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}Authorizations
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Query Parameters
User attribute ID
Example:
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Response
The caller's switchable attributes after the change
Attributes the calling user can switch. Empty when nothing is provisioned for them. An Organization Admin receives every attribute with allow_any_value: true.
Show child attributes
Show child attributes
Was this page helpful?

