2020-09-27 10:53:12 +03:00
{
"get" : {
"operationId" : "listDomains" ,
"tags" : [
"Domains"
] ,
2021-12-09 14:43:49 +03:00
"summary" : "List configured domains" ,
"description" : "Returns the list of all domains that have been either used for some short URL, or have explicitly configured redirects.<br/>It also includes the domain redirects, plus the default redirects that will be used for any non-explicitly-configured one." ,
2020-09-27 10:53:12 +03:00
"security" : [
{
"ApiKey" : [ ]
}
] ,
"parameters" : [
{
"$ref" : "../parameters/version.json"
}
] ,
"responses" : {
"200" : {
2021-08-03 18:00:26 +03:00
"description" : "The list of domains" ,
2020-09-27 10:53:12 +03:00
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"required" : [ "domains" ] ,
"properties" : {
"domains" : {
"type" : "object" ,
"required" : [ "data" ] ,
"properties" : {
"data" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
2021-08-03 18:00:26 +03:00
"required" : [ "domain" , "isDefault" , "redirects" ] ,
2020-09-27 10:53:12 +03:00
"properties" : {
"domain" : {
"type" : "string"
} ,
"isDefault" : {
"type" : "boolean"
2021-08-03 18:00:26 +03:00
} ,
"redirects" : {
"$ref" : "../definitions/NotFoundRedirects.json"
2020-09-27 10:53:12 +03:00
}
}
}
2021-12-09 14:11:09 +03:00
} ,
"defaultRedirects" : {
"$ref" : "../definitions/NotFoundRedirects.json"
2020-09-27 10:53:12 +03:00
}
}
}
}
2021-12-09 17:27:18 +03:00
} ,
"example" : {
"domains" : {
"data" : [
{
"domain" : "example.com" ,
"isDefault" : true ,
"redirects" : {
"baseUrlRedirect" : "https://example.com/my-landing-page" ,
"regular404Redirect" : null ,
"invalidShortUrlRedirect" : "https://example.com/invalid-url"
}
} ,
{
"domain" : "aaa.com" ,
"isDefault" : false ,
"redirects" : {
"baseUrlRedirect" : null ,
"regular404Redirect" : null ,
"invalidShortUrlRedirect" : null
}
} ,
{
"domain" : "bbb.com" ,
"isDefault" : false ,
"redirects" : {
"baseUrlRedirect" : null ,
"regular404Redirect" : null ,
"invalidShortUrlRedirect" : "https://example.com/invalid-url"
}
2021-08-03 18:00:26 +03:00
}
2021-12-09 17:27:18 +03:00
] ,
"defaultRedirects" : {
"baseUrlRedirect" : "https://somewhere.com" ,
"regular404Redirect" : null ,
"invalidShortUrlRedirect" : null
2020-09-27 10:53:12 +03:00
}
2021-12-09 14:11:09 +03:00
}
2020-09-27 10:53:12 +03:00
}
}
}
} ,
2021-12-09 20:28:47 +03:00
"default" : {
2020-09-27 10:53:12 +03:00
"description" : "Unexpected error." ,
"content" : {
"application/problem+json" : {
"schema" : {
"$ref" : "../definitions/Error.json"
}
}
}
}
}
}
}