mirror of
https://github.com/dalbodeule/sh0rt.kr-pdns.git
synced 2025-06-08 10:48:20 +00:00
add openapi.json, readme.md
This commit is contained in:
parent
9297ddfd07
commit
d70bb49a14
884
README.md
Normal file
884
README.md
Normal file
@ -0,0 +1,884 @@
|
|||||||
|
# Cloudflare compatible PowerDNS API Server
|
||||||
|
|
||||||
|
> Version v1.0.0
|
||||||
|
|
||||||
|
## Path Table
|
||||||
|
|
||||||
|
| Method | Path | Description |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| GET | [/zones](#getzones) | Get all domains |
|
||||||
|
| POST | [/zones](#postzones) | Create domain |
|
||||||
|
| GET | [/zones/{zone_id}/dns_records](#getzoneszone_iddns_records) | Get all records |
|
||||||
|
| POST | [/zones/{zone_id}/dns_records](#postzoneszone_iddns_records) | Add Record by ID |
|
||||||
|
| GET | [/zones/{zone_id}/dns_records/{dns_record_id}](#getzoneszone_iddns_recordsdns_record_id) | Get Record by ID |
|
||||||
|
| DELETE | [/zones/{zone_id}/dns_records/{dns_record_id}](#deletezoneszone_iddns_recordsdns_record_id) | Remove Record by ID |
|
||||||
|
| PUT | [/zones/{zone_id}/dns_records/{dns_record_id}](#putzoneszone_iddns_recordsdns_record_id) | Update Record by ID |
|
||||||
|
| GET | [/zones/{cfid}](#getzonescfid) | Get domain |
|
||||||
|
| DELETE | [/zones/{domain_id}](#deletezonesdomain_id) | Delete domain |
|
||||||
|
|
||||||
|
## Reference Table
|
||||||
|
|
||||||
|
| Name | Path | Description |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| DomainRequestDTO | [#/components/schemas/DomainRequestDTO](#componentsschemasdomainrequestdto) | Request DTO for Domain |
|
||||||
|
| ApiResponseDTO | [#/components/schemas/ApiResponseDTO](#componentsschemasapiresponsedto) | |
|
||||||
|
| ErrorOrMessage | [#/components/schemas/ErrorOrMessage](#componentsschemaserrorormessage) | |
|
||||||
|
| ApiResponseDTODomainResponseDTO | [#/components/schemas/ApiResponseDTODomainResponseDTO](#componentsschemasapiresponsedtodomainresponsedto) | |
|
||||||
|
| DomainResponseDTO | [#/components/schemas/DomainResponseDTO](#componentsschemasdomainresponsedto) | Response DTO for Domain |
|
||||||
|
| RecordRequestDTO | [#/components/schemas/RecordRequestDTO](#componentsschemasrecordrequestdto) | Request DTO for Record |
|
||||||
|
| ApiResponseDTORecordResponseDTO | [#/components/schemas/ApiResponseDTORecordResponseDTO](#componentsschemasapiresponsedtorecordresponsedto) | |
|
||||||
|
| RecordResponseDTO | [#/components/schemas/RecordResponseDTO](#componentsschemasrecordresponsedto) | Response DTO for Record |
|
||||||
|
| ApiResponseDTOListDomainResponseDTO | [#/components/schemas/ApiResponseDTOListDomainResponseDTO](#componentsschemasapiresponsedtolistdomainresponsedto) | |
|
||||||
|
| ApiResponseDTOListRecordResponseDTO | [#/components/schemas/ApiResponseDTOListRecordResponseDTO](#componentsschemasapiresponsedtolistrecordresponsedto) | |
|
||||||
|
| ApiResponseDTODeleteResponseWithId | [#/components/schemas/ApiResponseDTODeleteResponseWithId](#componentsschemasapiresponsedtodeleteresponsewithid) | |
|
||||||
|
| DeleteResponseWithId | [#/components/schemas/DeleteResponseWithId](#componentsschemasdeleteresponsewithid) | |
|
||||||
|
| api token | [#/components/securitySchemes/api token](#componentssecurityschemesapi-token) | |
|
||||||
|
|
||||||
|
## Path Details
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### [GET]/zones
|
||||||
|
|
||||||
|
- Summary
|
||||||
|
Get all domains
|
||||||
|
|
||||||
|
#### Responses
|
||||||
|
|
||||||
|
- 200 Returns all domains
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
// Response DTO for Domain
|
||||||
|
result: {
|
||||||
|
// Domain CFID
|
||||||
|
id: string
|
||||||
|
// Domain name(TLD)
|
||||||
|
name: string
|
||||||
|
}[]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- 404 Returns not found
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
result: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### [POST]/zones
|
||||||
|
|
||||||
|
- Summary
|
||||||
|
Create domain
|
||||||
|
|
||||||
|
#### RequestBody
|
||||||
|
|
||||||
|
- application/json
|
||||||
|
|
||||||
|
```ts
|
||||||
|
// Request DTO for Domain
|
||||||
|
{
|
||||||
|
// Domain name(TLD)
|
||||||
|
name: string
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Responses
|
||||||
|
|
||||||
|
- 200 Created domain
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
// Response DTO for Domain
|
||||||
|
result: {
|
||||||
|
// Domain CFID
|
||||||
|
id: string
|
||||||
|
// Domain name(TLD)
|
||||||
|
name: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- 400 Bad request
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
result: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### [GET]/zones/{zone_id}/dns_records
|
||||||
|
|
||||||
|
- Summary
|
||||||
|
Get all records
|
||||||
|
|
||||||
|
#### Responses
|
||||||
|
|
||||||
|
- 200 Return All Records
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
// Response DTO for Record
|
||||||
|
result: {
|
||||||
|
// Record ID
|
||||||
|
id: string
|
||||||
|
// Record type
|
||||||
|
type: string
|
||||||
|
// Record name
|
||||||
|
name: string
|
||||||
|
// Record content
|
||||||
|
content: string
|
||||||
|
// Zone(TLD) ID
|
||||||
|
zoneId: string
|
||||||
|
// Zone name(TLD)
|
||||||
|
zoneName: string
|
||||||
|
// Record creation time
|
||||||
|
createdOn: string
|
||||||
|
// Record modification time
|
||||||
|
modifiedOn: string
|
||||||
|
// Record priority
|
||||||
|
priority?: integer
|
||||||
|
// is proxyable: must false
|
||||||
|
proxiable: boolean
|
||||||
|
// is proxied: must false
|
||||||
|
proxied: boolean
|
||||||
|
// Record TTL
|
||||||
|
ttl: integer
|
||||||
|
// Record is locked: must false
|
||||||
|
locked: boolean
|
||||||
|
// Record comments
|
||||||
|
comment?: string
|
||||||
|
}[]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- 400 Bad request
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
result: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### [POST]/zones/{zone_id}/dns_records
|
||||||
|
|
||||||
|
- Summary
|
||||||
|
Add Record by ID
|
||||||
|
|
||||||
|
#### RequestBody
|
||||||
|
|
||||||
|
- application/json
|
||||||
|
|
||||||
|
```ts
|
||||||
|
// Request DTO for Record
|
||||||
|
{
|
||||||
|
// Record type
|
||||||
|
type: string
|
||||||
|
// Host name
|
||||||
|
name: string
|
||||||
|
// Record data
|
||||||
|
content: string
|
||||||
|
// TTL (Time to Live)
|
||||||
|
ttl: integer
|
||||||
|
// Priority
|
||||||
|
priority?: integer
|
||||||
|
// Proxied: cloudflare api compatibility
|
||||||
|
proxied: boolean
|
||||||
|
// comment
|
||||||
|
comment: string
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Responses
|
||||||
|
|
||||||
|
- 200 Return Record
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
// Response DTO for Record
|
||||||
|
result: {
|
||||||
|
// Record ID
|
||||||
|
id: string
|
||||||
|
// Record type
|
||||||
|
type: string
|
||||||
|
// Record name
|
||||||
|
name: string
|
||||||
|
// Record content
|
||||||
|
content: string
|
||||||
|
// Zone(TLD) ID
|
||||||
|
zoneId: string
|
||||||
|
// Zone name(TLD)
|
||||||
|
zoneName: string
|
||||||
|
// Record creation time
|
||||||
|
createdOn: string
|
||||||
|
// Record modification time
|
||||||
|
modifiedOn: string
|
||||||
|
// Record priority
|
||||||
|
priority?: integer
|
||||||
|
// is proxyable: must false
|
||||||
|
proxiable: boolean
|
||||||
|
// is proxied: must false
|
||||||
|
proxied: boolean
|
||||||
|
// Record TTL
|
||||||
|
ttl: integer
|
||||||
|
// Record is locked: must false
|
||||||
|
locked: boolean
|
||||||
|
// Record comments
|
||||||
|
comment?: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- 400 Bad request
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
result: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### [GET]/zones/{zone_id}/dns_records/{dns_record_id}
|
||||||
|
|
||||||
|
- Summary
|
||||||
|
Get Record by ID
|
||||||
|
|
||||||
|
#### Responses
|
||||||
|
|
||||||
|
- 200 Return Record
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
// Response DTO for Record
|
||||||
|
result: {
|
||||||
|
// Record ID
|
||||||
|
id: string
|
||||||
|
// Record type
|
||||||
|
type: string
|
||||||
|
// Record name
|
||||||
|
name: string
|
||||||
|
// Record content
|
||||||
|
content: string
|
||||||
|
// Zone(TLD) ID
|
||||||
|
zoneId: string
|
||||||
|
// Zone name(TLD)
|
||||||
|
zoneName: string
|
||||||
|
// Record creation time
|
||||||
|
createdOn: string
|
||||||
|
// Record modification time
|
||||||
|
modifiedOn: string
|
||||||
|
// Record priority
|
||||||
|
priority?: integer
|
||||||
|
// is proxyable: must false
|
||||||
|
proxiable: boolean
|
||||||
|
// is proxied: must false
|
||||||
|
proxied: boolean
|
||||||
|
// Record TTL
|
||||||
|
ttl: integer
|
||||||
|
// Record is locked: must false
|
||||||
|
locked: boolean
|
||||||
|
// Record comments
|
||||||
|
comment?: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- 400 Bad request
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
result: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### [DELETE]/zones/{zone_id}/dns_records/{dns_record_id}
|
||||||
|
|
||||||
|
- Summary
|
||||||
|
Remove Record by ID
|
||||||
|
|
||||||
|
#### Responses
|
||||||
|
|
||||||
|
- 200 Return Record
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
result: {
|
||||||
|
id: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- 400 Bad request
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
result: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### [PUT]/zones/{zone_id}/dns_records/{dns_record_id}
|
||||||
|
|
||||||
|
- Summary
|
||||||
|
Update Record by ID
|
||||||
|
|
||||||
|
#### RequestBody
|
||||||
|
|
||||||
|
- application/json
|
||||||
|
|
||||||
|
```ts
|
||||||
|
// Request DTO for Record
|
||||||
|
{
|
||||||
|
// Record type
|
||||||
|
type: string
|
||||||
|
// Host name
|
||||||
|
name: string
|
||||||
|
// Record data
|
||||||
|
content: string
|
||||||
|
// TTL (Time to Live)
|
||||||
|
ttl: integer
|
||||||
|
// Priority
|
||||||
|
priority?: integer
|
||||||
|
// Proxied: cloudflare api compatibility
|
||||||
|
proxied: boolean
|
||||||
|
// comment
|
||||||
|
comment: string
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Responses
|
||||||
|
|
||||||
|
- 200 Return Record
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
// Response DTO for Record
|
||||||
|
result: {
|
||||||
|
// Record ID
|
||||||
|
id: string
|
||||||
|
// Record type
|
||||||
|
type: string
|
||||||
|
// Record name
|
||||||
|
name: string
|
||||||
|
// Record content
|
||||||
|
content: string
|
||||||
|
// Zone(TLD) ID
|
||||||
|
zoneId: string
|
||||||
|
// Zone name(TLD)
|
||||||
|
zoneName: string
|
||||||
|
// Record creation time
|
||||||
|
createdOn: string
|
||||||
|
// Record modification time
|
||||||
|
modifiedOn: string
|
||||||
|
// Record priority
|
||||||
|
priority?: integer
|
||||||
|
// is proxyable: must false
|
||||||
|
proxiable: boolean
|
||||||
|
// is proxied: must false
|
||||||
|
proxied: boolean
|
||||||
|
// Record TTL
|
||||||
|
ttl: integer
|
||||||
|
// Record is locked: must false
|
||||||
|
locked: boolean
|
||||||
|
// Record comments
|
||||||
|
comment?: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- 400 Bad request
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
result: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### [GET]/zones/{cfid}
|
||||||
|
|
||||||
|
- Summary
|
||||||
|
Get domain
|
||||||
|
|
||||||
|
#### Responses
|
||||||
|
|
||||||
|
- 200 Returns domain
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
// Response DTO for Domain
|
||||||
|
result: {
|
||||||
|
// Domain CFID
|
||||||
|
id: string
|
||||||
|
// Domain name(TLD)
|
||||||
|
name: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- 404 Returns not found
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
result: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### [DELETE]/zones/{domain_id}
|
||||||
|
|
||||||
|
- Summary
|
||||||
|
Delete domain
|
||||||
|
|
||||||
|
#### Responses
|
||||||
|
|
||||||
|
- 200 Deleted domain
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
result: {
|
||||||
|
id: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- 400 Bad request
|
||||||
|
|
||||||
|
`application/json`
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
result: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
### #/components/schemas/DomainRequestDTO
|
||||||
|
|
||||||
|
```ts
|
||||||
|
// Request DTO for Domain
|
||||||
|
{
|
||||||
|
// Domain name(TLD)
|
||||||
|
name: string
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### #/components/schemas/ApiResponseDTO
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
result: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### #/components/schemas/ErrorOrMessage
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### #/components/schemas/ApiResponseDTODomainResponseDTO
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
// Response DTO for Domain
|
||||||
|
result: {
|
||||||
|
// Domain CFID
|
||||||
|
id: string
|
||||||
|
// Domain name(TLD)
|
||||||
|
name: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### #/components/schemas/DomainResponseDTO
|
||||||
|
|
||||||
|
```ts
|
||||||
|
// Response DTO for Domain
|
||||||
|
{
|
||||||
|
// Domain CFID
|
||||||
|
id: string
|
||||||
|
// Domain name(TLD)
|
||||||
|
name: string
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### #/components/schemas/RecordRequestDTO
|
||||||
|
|
||||||
|
```ts
|
||||||
|
// Request DTO for Record
|
||||||
|
{
|
||||||
|
// Record type
|
||||||
|
type: string
|
||||||
|
// Host name
|
||||||
|
name: string
|
||||||
|
// Record data
|
||||||
|
content: string
|
||||||
|
// TTL (Time to Live)
|
||||||
|
ttl: integer
|
||||||
|
// Priority
|
||||||
|
priority?: integer
|
||||||
|
// Proxied: cloudflare api compatibility
|
||||||
|
proxied: boolean
|
||||||
|
// comment
|
||||||
|
comment: string
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### #/components/schemas/ApiResponseDTORecordResponseDTO
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
// Response DTO for Record
|
||||||
|
result: {
|
||||||
|
// Record ID
|
||||||
|
id: string
|
||||||
|
// Record type
|
||||||
|
type: string
|
||||||
|
// Record name
|
||||||
|
name: string
|
||||||
|
// Record content
|
||||||
|
content: string
|
||||||
|
// Zone(TLD) ID
|
||||||
|
zoneId: string
|
||||||
|
// Zone name(TLD)
|
||||||
|
zoneName: string
|
||||||
|
// Record creation time
|
||||||
|
createdOn: string
|
||||||
|
// Record modification time
|
||||||
|
modifiedOn: string
|
||||||
|
// Record priority
|
||||||
|
priority?: integer
|
||||||
|
// is proxyable: must false
|
||||||
|
proxiable: boolean
|
||||||
|
// is proxied: must false
|
||||||
|
proxied: boolean
|
||||||
|
// Record TTL
|
||||||
|
ttl: integer
|
||||||
|
// Record is locked: must false
|
||||||
|
locked: boolean
|
||||||
|
// Record comments
|
||||||
|
comment?: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### #/components/schemas/RecordResponseDTO
|
||||||
|
|
||||||
|
```ts
|
||||||
|
// Response DTO for Record
|
||||||
|
{
|
||||||
|
// Record ID
|
||||||
|
id: string
|
||||||
|
// Record type
|
||||||
|
type: string
|
||||||
|
// Record name
|
||||||
|
name: string
|
||||||
|
// Record content
|
||||||
|
content: string
|
||||||
|
// Zone(TLD) ID
|
||||||
|
zoneId: string
|
||||||
|
// Zone name(TLD)
|
||||||
|
zoneName: string
|
||||||
|
// Record creation time
|
||||||
|
createdOn: string
|
||||||
|
// Record modification time
|
||||||
|
modifiedOn: string
|
||||||
|
// Record priority
|
||||||
|
priority?: integer
|
||||||
|
// is proxyable: must false
|
||||||
|
proxiable: boolean
|
||||||
|
// is proxied: must false
|
||||||
|
proxied: boolean
|
||||||
|
// Record TTL
|
||||||
|
ttl: integer
|
||||||
|
// Record is locked: must false
|
||||||
|
locked: boolean
|
||||||
|
// Record comments
|
||||||
|
comment?: string
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### #/components/schemas/ApiResponseDTOListDomainResponseDTO
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
// Response DTO for Domain
|
||||||
|
result: {
|
||||||
|
// Domain CFID
|
||||||
|
id: string
|
||||||
|
// Domain name(TLD)
|
||||||
|
name: string
|
||||||
|
}[]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### #/components/schemas/ApiResponseDTOListRecordResponseDTO
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
// Response DTO for Record
|
||||||
|
result: {
|
||||||
|
// Record ID
|
||||||
|
id: string
|
||||||
|
// Record type
|
||||||
|
type: string
|
||||||
|
// Record name
|
||||||
|
name: string
|
||||||
|
// Record content
|
||||||
|
content: string
|
||||||
|
// Zone(TLD) ID
|
||||||
|
zoneId: string
|
||||||
|
// Zone name(TLD)
|
||||||
|
zoneName: string
|
||||||
|
// Record creation time
|
||||||
|
createdOn: string
|
||||||
|
// Record modification time
|
||||||
|
modifiedOn: string
|
||||||
|
// Record priority
|
||||||
|
priority?: integer
|
||||||
|
// is proxyable: must false
|
||||||
|
proxiable: boolean
|
||||||
|
// is proxied: must false
|
||||||
|
proxied: boolean
|
||||||
|
// Record TTL
|
||||||
|
ttl: integer
|
||||||
|
// Record is locked: must false
|
||||||
|
locked: boolean
|
||||||
|
// Record comments
|
||||||
|
comment?: string
|
||||||
|
}[]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### #/components/schemas/ApiResponseDTODeleteResponseWithId
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
success: boolean
|
||||||
|
errors: {
|
||||||
|
code: integer
|
||||||
|
message: string
|
||||||
|
}[]
|
||||||
|
messages:#/components/schemas/ErrorOrMessage[]
|
||||||
|
result: {
|
||||||
|
id: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### #/components/schemas/DeleteResponseWithId
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
id: string
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### #/components/securitySchemes/api token
|
||||||
|
|
||||||
|
```ts
|
||||||
|
{
|
||||||
|
"type": "http",
|
||||||
|
"scheme": "bearer"
|
||||||
|
}
|
||||||
|
```
|
801
openapi.json
Normal file
801
openapi.json
Normal file
@ -0,0 +1,801 @@
|
|||||||
|
{
|
||||||
|
"openapi": "3.0.1",
|
||||||
|
"info": {
|
||||||
|
"title": "Cloudflare compatible PowerDNS API Server",
|
||||||
|
"version": "v1.0.0"
|
||||||
|
},
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"url": "http://localhost:8080",
|
||||||
|
"description": "Generated server url"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"api token": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": {
|
||||||
|
"/zones": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"domain"
|
||||||
|
],
|
||||||
|
"summary": "Get all domains",
|
||||||
|
"operationId": "allDomains",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Returns all domains",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTOListDomainResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Returns not found",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"domain"
|
||||||
|
],
|
||||||
|
"summary": "Create domain",
|
||||||
|
"operationId": "createDomain",
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DomainRequestDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Created domain",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTODomainResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Bad request",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/zones/{zone_id}/dns_records": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"record"
|
||||||
|
],
|
||||||
|
"summary": "Get all records",
|
||||||
|
"operationId": "allRecords",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "zone_id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Return All Records",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTOListRecordResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Bad request",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"record"
|
||||||
|
],
|
||||||
|
"summary": "Add Record by ID",
|
||||||
|
"operationId": "createRecord",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "zone_id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/RecordRequestDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Return Record",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTORecordResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Bad request",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/zones/{zone_id}/dns_records/{dns_record_id}": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"record"
|
||||||
|
],
|
||||||
|
"summary": "Get Record by ID",
|
||||||
|
"operationId": "getRecordByCfid",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "zone_id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dns_record_id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Return Record",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTORecordResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Bad request",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"tags": [
|
||||||
|
"record"
|
||||||
|
],
|
||||||
|
"summary": "Remove Record by ID",
|
||||||
|
"operationId": "deleteRecord",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "zone_id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dns_record_id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Return Record",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTODeleteResponseWithId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Bad request",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"tags": [
|
||||||
|
"record"
|
||||||
|
],
|
||||||
|
"summary": "Update Record by ID",
|
||||||
|
"operationId": "updateRecord",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "zone_id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dns_record_id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/RecordRequestDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Return Record",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTORecordResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Bad request",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/zones/{cfid}": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"domain"
|
||||||
|
],
|
||||||
|
"summary": "Get domain",
|
||||||
|
"operationId": "getDomainByCfid",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "cfid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Returns domain",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTODomainResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Returns not found",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/zones/{domain_id}": {
|
||||||
|
"delete": {
|
||||||
|
"tags": [
|
||||||
|
"domain"
|
||||||
|
],
|
||||||
|
"summary": "Delete domain",
|
||||||
|
"operationId": "deleteDomain",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "domain_id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Deleted domain",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTODeleteResponseWithId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Bad request",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/ApiResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"components": {
|
||||||
|
"schemas": {
|
||||||
|
"DomainRequestDTO": {
|
||||||
|
"required": [
|
||||||
|
"name"
|
||||||
|
],
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Domain name(TLD)",
|
||||||
|
"example": "example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Request DTO for Domain"
|
||||||
|
},
|
||||||
|
"ApiResponseDTO": {
|
||||||
|
"required": [
|
||||||
|
"errors",
|
||||||
|
"messages",
|
||||||
|
"success"
|
||||||
|
],
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"success": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"errors": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ErrorOrMessage"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"messages": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ErrorOrMessage"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ErrorOrMessage": {
|
||||||
|
"required": [
|
||||||
|
"code",
|
||||||
|
"message"
|
||||||
|
],
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"code": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ApiResponseDTODomainResponseDTO": {
|
||||||
|
"required": [
|
||||||
|
"errors",
|
||||||
|
"messages",
|
||||||
|
"success"
|
||||||
|
],
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"success": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"errors": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ErrorOrMessage"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"messages": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ErrorOrMessage"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/DomainResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"DomainResponseDTO": {
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"name"
|
||||||
|
],
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Domain CFID",
|
||||||
|
"example": "123e4567e89b12d3a456426655440000"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Domain name(TLD)",
|
||||||
|
"example": "example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Response DTO for Domain"
|
||||||
|
},
|
||||||
|
"RecordRequestDTO": {
|
||||||
|
"required": [
|
||||||
|
"comment",
|
||||||
|
"content",
|
||||||
|
"name",
|
||||||
|
"proxied",
|
||||||
|
"ttl",
|
||||||
|
"type"
|
||||||
|
],
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Record type",
|
||||||
|
"example": "A"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Host name",
|
||||||
|
"example": "www"
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Record data",
|
||||||
|
"example": "192.0.2.1"
|
||||||
|
},
|
||||||
|
"ttl": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "TTL (Time to Live)",
|
||||||
|
"format": "int32",
|
||||||
|
"example": 3600
|
||||||
|
},
|
||||||
|
"priority": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Priority",
|
||||||
|
"format": "int32",
|
||||||
|
"example": 0
|
||||||
|
},
|
||||||
|
"proxied": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Proxied: cloudflare api compatibility",
|
||||||
|
"example": false
|
||||||
|
},
|
||||||
|
"comment": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "comment"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Request DTO for Record"
|
||||||
|
},
|
||||||
|
"ApiResponseDTORecordResponseDTO": {
|
||||||
|
"required": [
|
||||||
|
"errors",
|
||||||
|
"messages",
|
||||||
|
"success"
|
||||||
|
],
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"success": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"errors": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ErrorOrMessage"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"messages": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ErrorOrMessage"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/RecordResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"RecordResponseDTO": {
|
||||||
|
"required": [
|
||||||
|
"content",
|
||||||
|
"createdOn",
|
||||||
|
"id",
|
||||||
|
"locked",
|
||||||
|
"modifiedOn",
|
||||||
|
"name",
|
||||||
|
"proxiable",
|
||||||
|
"proxied",
|
||||||
|
"ttl",
|
||||||
|
"type",
|
||||||
|
"zoneId",
|
||||||
|
"zoneName"
|
||||||
|
],
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Record ID",
|
||||||
|
"example": "123e4567e89b12d3a456426655440001"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Record type",
|
||||||
|
"example": "A"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Record name",
|
||||||
|
"example": "test"
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Record content",
|
||||||
|
"example": "1.1.1.1"
|
||||||
|
},
|
||||||
|
"zoneId": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Zone(TLD) ID",
|
||||||
|
"example": "123e4567e89b12d3a456426655440001"
|
||||||
|
},
|
||||||
|
"zoneName": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Zone name(TLD)",
|
||||||
|
"example": "example.com"
|
||||||
|
},
|
||||||
|
"createdOn": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Record creation time",
|
||||||
|
"example": "2014-01-01T05:20:00.12345Z"
|
||||||
|
},
|
||||||
|
"modifiedOn": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Record modification time",
|
||||||
|
"example": "2014-01-01T05:20:00.12345Z"
|
||||||
|
},
|
||||||
|
"priority": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Record priority",
|
||||||
|
"format": "int32",
|
||||||
|
"example": 0
|
||||||
|
},
|
||||||
|
"proxiable": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "is proxyable: must false",
|
||||||
|
"example": false
|
||||||
|
},
|
||||||
|
"proxied": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "is proxied: must false",
|
||||||
|
"example": false
|
||||||
|
},
|
||||||
|
"ttl": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Record TTL",
|
||||||
|
"format": "int32",
|
||||||
|
"example": 300
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Record is locked: must false",
|
||||||
|
"example": false
|
||||||
|
},
|
||||||
|
"comment": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Record comments"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Response DTO for Record"
|
||||||
|
},
|
||||||
|
"ApiResponseDTOListDomainResponseDTO": {
|
||||||
|
"required": [
|
||||||
|
"errors",
|
||||||
|
"messages",
|
||||||
|
"success"
|
||||||
|
],
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"success": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"errors": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ErrorOrMessage"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"messages": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ErrorOrMessage"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/DomainResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ApiResponseDTOListRecordResponseDTO": {
|
||||||
|
"required": [
|
||||||
|
"errors",
|
||||||
|
"messages",
|
||||||
|
"success"
|
||||||
|
],
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"success": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"errors": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ErrorOrMessage"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"messages": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ErrorOrMessage"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/RecordResponseDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ApiResponseDTODeleteResponseWithId": {
|
||||||
|
"required": [
|
||||||
|
"errors",
|
||||||
|
"messages",
|
||||||
|
"success"
|
||||||
|
],
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"success": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"errors": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ErrorOrMessage"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"messages": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ErrorOrMessage"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/components/schemas/DeleteResponseWithId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"DeleteResponseWithId": {
|
||||||
|
"required": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"securitySchemes": {
|
||||||
|
"api token": {
|
||||||
|
"type": "http",
|
||||||
|
"scheme": "bearer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user