2020-09-27 02:53:12 -05:00
|
|
|
{
|
|
|
|
"get": {
|
|
|
|
"operationId": "listDomains",
|
|
|
|
"tags": [
|
|
|
|
"Domains"
|
|
|
|
],
|
|
|
|
"summary": "List existing domains",
|
|
|
|
"description": "Returns the list of all domains ever used, with a flag that tells if they are the default domain",
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"ApiKey": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"$ref": "../parameters/version.json"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
2021-08-03 10:00:26 -05:00
|
|
|
"description": "The list of domains",
|
2020-09-27 02:53:12 -05: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 10:00:26 -05:00
|
|
|
"required": ["domain", "isDefault", "redirects"],
|
2020-09-27 02:53:12 -05:00
|
|
|
"properties": {
|
|
|
|
"domain": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"isDefault": {
|
|
|
|
"type": "boolean"
|
2021-08-03 10:00:26 -05:00
|
|
|
},
|
|
|
|
"redirects": {
|
|
|
|
"$ref": "../definitions/NotFoundRedirects.json"
|
2020-09-27 02:53:12 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-12-09 05:11:09 -06:00
|
|
|
},
|
|
|
|
"defaultRedirects": {
|
|
|
|
"$ref": "../definitions/NotFoundRedirects.json"
|
2020-09-27 02:53:12 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"examples": {
|
|
|
|
"application/json": {
|
|
|
|
"domains": {
|
|
|
|
"data": [
|
|
|
|
{
|
|
|
|
"domain": "example.com",
|
2021-08-03 10:00:26 -05:00
|
|
|
"isDefault": true,
|
|
|
|
"redirects": {
|
|
|
|
"baseUrlRedirect": "https://example.com/my-landing-page",
|
|
|
|
"regular404Redirect": null,
|
|
|
|
"invalidShortUrlRedirect": "https://example.com/invalid-url"
|
|
|
|
}
|
2020-09-27 02:53:12 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"domain": "aaa.com",
|
2021-08-03 10:00:26 -05:00
|
|
|
"isDefault": false,
|
|
|
|
"redirects": {
|
|
|
|
"baseUrlRedirect": null,
|
|
|
|
"regular404Redirect": null,
|
|
|
|
"invalidShortUrlRedirect": null
|
|
|
|
}
|
2020-09-27 02:53:12 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"domain": "bbb.com",
|
2021-08-03 10:00:26 -05:00
|
|
|
"isDefault": false,
|
|
|
|
"redirects": {
|
|
|
|
"baseUrlRedirect": null,
|
|
|
|
"regular404Redirect": null,
|
|
|
|
"invalidShortUrlRedirect": "https://example.com/invalid-url"
|
|
|
|
}
|
2020-09-27 02:53:12 -05:00
|
|
|
}
|
2021-12-09 05:11:09 -06:00
|
|
|
],
|
|
|
|
"defaultRedirects": {
|
|
|
|
"baseUrlRedirect": "https://somewhere.com",
|
|
|
|
"regular404Redirect": null,
|
|
|
|
"invalidShortUrlRedirect": null
|
|
|
|
}
|
2020-09-27 02:53:12 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "Unexpected error.",
|
|
|
|
"content": {
|
|
|
|
"application/problem+json": {
|
|
|
|
"schema": {
|
|
|
|
"$ref": "../definitions/Error.json"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|