Delete a version
1 min
DELETE
{baseUrl}/idgen/templates/{name}/versions/{version}
Path Parameters
- namestringrequiredDescription
- versioninteger<int32>requiredDescriptionFormatint32
Responses
204
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
409
- 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 DELETE \
--url http://localhost:8080/idgen/templates/{name}/versions/{version} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("http://localhost:8080/idgen/templates/{name}/versions/{version}", 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/templates/{name}/versions/{version}")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Delete.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/templates/{name}/versions/{version}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
204
// The version is deleted.
400
// INVALID_REQUEST: a malformed path or body value, or an invalid name.
{
"error": "",
"message": "",
"status": "",
"details": "",
"links": ""
}401
// UNAUTHENTICATED: missing, expired or invalid credentials.
{
"error": "",
"message": "",
"status": "",
"details": "",
"links": ""
}403
// FORBIDDEN: the caller lacks the idgen.templates.write permission, or its tenant or site scope does not match.
{
"error": "",
"message": "",
"status": "",
"details": "",
"links": ""
}404
// NAMESPACE_NOT_FOUND or VERSION_NOT_FOUND: no such template or version.
{
"error": "",
"message": "",
"status": "",
"details": "",
"links": ""
}409
// VERSION_NOT_MUTABLE: the version's state does not allow this change.
{
"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": ""
}