Delete a user
curl --request DELETE \
--url https://identity.sandbox.lerian.net/v1/users/{id} \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://identity.sandbox.lerian.net/v1/users/{id}"
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))
}const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://identity.sandbox.lerian.net/v1/users/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://identity.sandbox.lerian.net/v1/users/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}Delete a user
Removes a user permanently. Its group and role memberships go with it; nothing else in the organization changes.
On success the response has no body (204).
Failures:
400—{id}is not a UUID.404— no such user in your organization.503 IDE-0066— the identity provider is unavailable (unreachable, too slow to answer, or failing). Nothing about the request was wrong; retry it later.
DELETE
/
v1
/
users
/
{id}
Delete a user
curl --request DELETE \
--url https://identity.sandbox.lerian.net/v1/users/{id} \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://identity.sandbox.lerian.net/v1/users/{id}"
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))
}const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://identity.sandbox.lerian.net/v1/users/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://identity.sandbox.lerian.net/v1/users/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}Was this page helpful?

