Get a namespace
1 min
GET
{baseUrl}/idgen/namespaces/{name}
Path Parameters
- namestringrequiredDescription
Responses
200
- NamespaceDtoDescription
- namestringrequiredDescription
- descriptionstringDescription
- statusstringrequiredDescription
- currentVersioninteger<int32>DescriptionFormatint32
- createdAtstring<date-time>requiredDescriptionFormatdate-time
- updatedAtstring<date-time>requiredDescriptionFormatdate-time
- linksmap<string, string>requiredDescription
400
- ErrorDtoDescription
- errorstringrequiredDescription
- messagestringrequiredDescription
- statusinteger<int32>requiredDescriptionFormatint32
- detailsmap<string, string>requiredDescription
- linksmap<string, string>requiredDescription
401
- ErrorDtoDescription
- errorstringrequiredDescription
- messagestringrequiredDescription
- statusinteger<int32>requiredDescriptionFormatint32
- detailsmap<string, string>requiredDescription
- linksmap<string, string>requiredDescription
403
- ErrorDtoDescription
- errorstringrequiredDescription
- messagestringrequiredDescription
- statusinteger<int32>requiredDescriptionFormatint32
- detailsmap<string, string>requiredDescription
- linksmap<string, string>requiredDescription
404
- ErrorDtoDescription
- errorstringrequiredDescription
- messagestringrequiredDescription
- statusinteger<int32>requiredDescriptionFormatint32
- detailsmap<string, string>requiredDescription
- linksmap<string, string>requiredDescription
500
- ErrorDtoDescription
- errorstringrequiredDescription
- messagestringrequiredDescription
- statusinteger<int32>requiredDescriptionFormatint32
- detailsmap<string, string>requiredDescription
- linksmap<string, string>requiredDescription
503
- ErrorDtoDescription
- errorstringrequiredDescription
- messagestringrequiredDescription
- statusinteger<int32>requiredDescriptionFormatint32
- detailsmap<string, string>requiredDescription
- linksmap<string, string>requiredDescription
curl
curl --request GET \
--url http://localhost:8080/idgen/namespaces/{name} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("http://localhost:8080/idgen/namespaces/{name}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("http://localhost:8080/idgen/namespaces/{name}")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "http://localhost:8080/idgen/namespaces/{name}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// The namespace.
{
"name": "",
"description": "",
"status": "",
"currentVersion": "",
"createdAt": "",
"updatedAt": "",
"links": ""
}400
// INVALID_REQUEST: a malformed path, query or body value.
{
"error": "",
"message": "",
"status": "",
"details": "",
"links": ""
}401
// UNAUTHENTICATED: missing, expired or invalid credentials.
{
"error": "",
"message": "",
"status": "",
"details": "",
"links": ""
}403
// FORBIDDEN: the caller lacks the idgen.namespaces.read permission, or its tenant or site scope does not match.
{
"error": "",
"message": "",
"status": "",
"details": "",
"links": ""
}404
// NAMESPACE_NOT_FOUND: no such namespace (or it was deleted).
{
"error": "",
"message": "",
"status": "",
"details": "",
"links": ""
}500
// INTERNAL_ERROR: an unexpected failure. Retry once, then report it with the x-request-id.
{
"error": "",
"message": "",
"status": "",
"details": "",
"links": ""
}503
// AUTH_UNAVAILABLE or BACKEND_UNAVAILABLE (both retryable): retry with backoff.
{
"error": "",
"message": "",
"status": "",
"details": "",
"links": ""
}