Get IDP user attribute mapping
curl --request GET \
--url https://api.opal.dev/v1/apps/{app_id}/user-attribute-mappings/{mapping_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.opal.dev/v1/apps/{app_id}/user-attribute-mappings/{mapping_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.opal.dev/v1/apps/{app_id}/user-attribute-mappings/{mapping_id}', 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.opal.dev/v1/apps/{app_id}/user-attribute-mappings/{mapping_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.opal.dev/v1/apps/{app_id}/user-attribute-mappings/{mapping_id}"
req, _ := http.NewRequest("GET", 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.get("https://api.opal.dev/v1/apps/{app_id}/user-attribute-mappings/{mapping_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/apps/{app_id}/user-attribute-mappings/{mapping_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "1b978423-db0a-4037-a4cf-f79c60cb67b3",
"app_id": "32acc112-21ff-4669-91c2-21e27683eaa1",
"key": "managerEmail",
"use_as": "MANAGER_EMAIL"
}Get IDP user attribute mapping
Returns an IdpUserAttributeMapping.
GET
/
apps
/
{app_id}
/
user-attribute-mappings
/
{mapping_id}
Get IDP user attribute mapping
curl --request GET \
--url https://api.opal.dev/v1/apps/{app_id}/user-attribute-mappings/{mapping_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.opal.dev/v1/apps/{app_id}/user-attribute-mappings/{mapping_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.opal.dev/v1/apps/{app_id}/user-attribute-mappings/{mapping_id}', 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.opal.dev/v1/apps/{app_id}/user-attribute-mappings/{mapping_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.opal.dev/v1/apps/{app_id}/user-attribute-mappings/{mapping_id}"
req, _ := http.NewRequest("GET", 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.get("https://api.opal.dev/v1/apps/{app_id}/user-attribute-mappings/{mapping_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/apps/{app_id}/user-attribute-mappings/{mapping_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "1b978423-db0a-4037-a4cf-f79c60cb67b3",
"app_id": "32acc112-21ff-4669-91c2-21e27683eaa1",
"key": "managerEmail",
"use_as": "MANAGER_EMAIL"
}Authorizations
Path Parameters
Response
The requested user attribute mapping.
IdpUserAttributeMapping Object
Description
An attribute Opal imports from an identity provider or HRIS app, and the Opal
user field it is stored in. A CUSTOM mapping is imported as a user tag.
Was this page helpful?