List all profiles
curl --request GET \
--url http://localhost:3010/api/profiles \
--header 'Authorization: <api-key>'import requests
url = "http://localhost:3010/api/profiles"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('http://localhost:3010/api/profiles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3010",
CURLOPT_URL => "http://localhost:3010/api/profiles",
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: <api-key>"
],
]);
$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 := "http://localhost:3010/api/profiles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3010/api/profiles")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3010/api/profiles")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"Status": "ok",
"ID": "github-sso-dashboard",
"Data": [
{
"ID": "github-sso-dashboard",
"Name": "GitHub SSO - Dashboard Login",
"OrgID": "5e9d9544a1dcd60001d0ed20",
"MatchedPolicyID": "5f8f9e3c1b5e4a0001b3c4d5",
"CustomEmailField": "email",
"CustomUserIDField": "sub",
"ProviderConfig": {},
"IdentityHandlerConfig": {
"oauth-client-id": "tyk-portal-client",
"oauth-client-secret": "s3cr3t",
"oauth-client-base-url": "http://gateway:8080"
},
"ProviderConstraints": {
"Domain": "tyk.io",
"Group": "engineering"
},
"ReturnURL": "https://dashboard.example.com/tap",
"DefaultUserGroupID": "5f8f9e3c1b5e4a0001b3c4d6",
"CustomUserGroupField": "groups",
"UserGroupMapping": {
"admins": "5f8f9e3c1b5e4a0001b3c4d7",
"developers": "5f8f9e3c1b5e4a0001b3c4d8"
},
"UserGroupSeparator": ",",
"SSOOnlyForRegisteredUsers": false
}
]
}{
"Status": "error",
"Error": "Authorization failed"
}Profiles
List all profiles
Returns every authentication profile stored in the active backend.
GET
/
api
/
profiles
List all profiles
curl --request GET \
--url http://localhost:3010/api/profiles \
--header 'Authorization: <api-key>'import requests
url = "http://localhost:3010/api/profiles"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('http://localhost:3010/api/profiles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3010",
CURLOPT_URL => "http://localhost:3010/api/profiles",
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: <api-key>"
],
]);
$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 := "http://localhost:3010/api/profiles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3010/api/profiles")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3010/api/profiles")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"Status": "ok",
"ID": "github-sso-dashboard",
"Data": [
{
"ID": "github-sso-dashboard",
"Name": "GitHub SSO - Dashboard Login",
"OrgID": "5e9d9544a1dcd60001d0ed20",
"MatchedPolicyID": "5f8f9e3c1b5e4a0001b3c4d5",
"CustomEmailField": "email",
"CustomUserIDField": "sub",
"ProviderConfig": {},
"IdentityHandlerConfig": {
"oauth-client-id": "tyk-portal-client",
"oauth-client-secret": "s3cr3t",
"oauth-client-base-url": "http://gateway:8080"
},
"ProviderConstraints": {
"Domain": "tyk.io",
"Group": "engineering"
},
"ReturnURL": "https://dashboard.example.com/tap",
"DefaultUserGroupID": "5f8f9e3c1b5e4a0001b3c4d6",
"CustomUserGroupField": "groups",
"UserGroupMapping": {
"admins": "5f8f9e3c1b5e4a0001b3c4d7",
"developers": "5f8f9e3c1b5e4a0001b3c4d8"
},
"UserGroupSeparator": ",",
"SSOOnlyForRegisteredUsers": false
}
]
}{
"Status": "error",
"Error": "Authorization failed"
}Authorizations
Must equal the Secret value in tib.conf.
Example: Authorization: your-tib-secret
Was this page helpful?
⌘I