Gets all the claims:
This endpoint returns all the claims
Request examples
/v1/auth/claims
Authorized
curl --location 'http://localhost/api/v1/auth/claims'
--header 'Authorization ••••••'
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/api/v1/auth/claims");
request.Headers.Add("Authorization", "••••••");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var responseString = await response.Content.ReadAsStringAsync();
package main
import (
"fmt"
"net/http"
"strings"
"io"
)
func main() {
url := "http://localhost/api/v1/auth/claims"
method := "get"
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "••••••")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Responses
[
{
"id": "string",
"name": "string"
}
]
{
"code": "int",
"message": "string",
"stack": [
{
"code": "int",
"description": "string",
"error": "string",
"path": "string"
}
]
}
{
"error": "OAuthErrorType",
"error_description": "string",
"error_uri": "string"
}
Gets a claim:
This endpoint returns a claim
Parameters
id
Claim ID
required
path
Request examples
/v1/auth/claims/{id}
Authorized
curl --location 'http://localhost/api/v1/auth/claims/{id}'
--header 'Authorization ••••••'
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/api/v1/auth/claims/{id}");
request.Headers.Add("Authorization", "••••••");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var responseString = await response.Content.ReadAsStringAsync();
package main
import (
"fmt"
"net/http"
"strings"
"io"
)
func main() {
url := "http://localhost/api/v1/auth/claims/{id}"
method := "get"
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "••••••")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Responses
[
{
"id": "string",
"name": "string"
}
]
{
"code": "int",
"message": "string",
"stack": [
{
"code": "int",
"description": "string",
"error": "string",
"path": "string"
}
]
}
{
"error": "OAuthErrorType",
"error_description": "string",
"error_uri": "string"
}
Creates a claim:
This endpoint creates a claim
Parameters
claimRequest
Claim Request
body
Request examples
/v1/auth/claims
Authorized
curl --location 'http://localhost/api/v1/auth/claims'
--header 'Authorization ••••••'
--header 'Content-Type: application/json'
--data '{
"name": "string"
}'
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/api/v1/auth/claims");
request.Headers.Add("Authorization", "••••••");
request.Headers.Add("Content-Type", "application/json");
request.Content = new StringContent("{
"name": "string"
}");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var responseString = await response.Content.ReadAsStringAsync();
package main
import (
"fmt"
"net/http"
"strings"
"io"
)
func main() {
url := "http://localhost/api/v1/auth/claims"
method := "post"
payload := strings.NewReader(`{
"name": "string"
}`)
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "••••••")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Responses
[
{
"id": "string",
"name": "string"
}
]
{
"code": "int",
"message": "string",
"stack": [
{
"code": "int",
"description": "string",
"error": "string",
"path": "string"
}
]
}
{
"error": "OAuthErrorType",
"error_description": "string",
"error_uri": "string"
}
Delete a claim:
This endpoint Deletes a claim
Parameters
id
Claim ID
required
path
Request examples
/v1/auth/claims/{id}
Authorized
curl --location 'http://localhost/api/v1/auth/claims/{id}'
--header 'Authorization ••••••'
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Delete, "http://localhost/api/v1/auth/claims/{id}");
request.Headers.Add("Authorization", "••••••");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var responseString = await response.Content.ReadAsStringAsync();
package main
import (
"fmt"
"net/http"
"strings"
"io"
)
func main() {
url := "http://localhost/api/v1/auth/claims/{id}"
method := "delete"
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "••••••")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Responses
{
"code": "int",
"message": "string",
"stack": [
{
"code": "int",
"description": "string",
"error": "string",
"path": "string"
}
]
}
{
"error": "OAuthErrorType",
"error_description": "string",
"error_uri": "string"
}