Delete a profile
curl --request DELETE \
--url http://localhost:3010/api/profiles/{id} \
--header 'Authorization: <api-key>'import requests
url = "http://localhost:3010/api/profiles/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};
fetch('http://localhost:3010/api/profiles/{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_PORT => "3010",
CURLOPT_URL => "http://localhost:3010/api/profiles/{id}",
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: <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/{id}"
req, _ := http.NewRequest("DELETE", 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.delete("http://localhost:3010/api/profiles/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3010/api/profiles/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Delete.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"
}{
"Status": "error",
"Error": "Profile not found"
}Profiles
Delete a profile
Permanently removes the specified authentication profile.
DELETE
/
api
/
profiles
/
{id}
Delete a profile
curl --request DELETE \
--url http://localhost:3010/api/profiles/{id} \
--header 'Authorization: <api-key>'import requests
url = "http://localhost:3010/api/profiles/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};
fetch('http://localhost:3010/api/profiles/{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_PORT => "3010",
CURLOPT_URL => "http://localhost:3010/api/profiles/{id}",
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: <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/{id}"
req, _ := http.NewRequest("DELETE", 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.delete("http://localhost:3010/api/profiles/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3010/api/profiles/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Delete.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"
}{
"Status": "error",
"Error": "Profile not found"
}Authorizations
Must equal the Secret value in tib.conf.
Example: Authorization: your-tib-secret
Path Parameters
The unique identifier of the authentication profile.
Response
Profile deleted successfully. Data will be an empty object.
Was this page helpful?
⌘I