Create Zone
This commit is contained in:
parent
e773939bd0
commit
ad638e648b
@ -28,29 +28,32 @@ class PagesController extends Controller
|
|||||||
];
|
];
|
||||||
$client = new Client(); //GuzzleHttp\Client
|
$client = new Client(); //GuzzleHttp\Client
|
||||||
$result = $client->post('http://127.0.0.1:8081/api/v1/servers/localhost/zones', [
|
$result = $client->post('http://127.0.0.1:8081/api/v1/servers/localhost/zones', [
|
||||||
'form_params' => [
|
\GuzzleHttp\RequestOptions::JSON => [
|
||||||
'kind' => 'Native',
|
|
||||||
'masters' => [],
|
'form_params' => [
|
||||||
'name' => $zone_name,
|
'kind' => 'Native',
|
||||||
'nameservers' => [
|
'masters' => [],
|
||||||
'0' => 'pdnstest.tfmm.co'
|
|
||||||
],
|
|
||||||
'records' => [
|
|
||||||
'0' => [
|
|
||||||
'content' => 'pdnstest.tfmm.co. hostmaster.tfmm.co. 1 1800 900 604800 86400',
|
|
||||||
'disabled' => 'false',
|
|
||||||
'ttl' => '86400',
|
|
||||||
'type' => 'SOA'
|
|
||||||
],
|
|
||||||
'1' => [
|
|
||||||
'content' => $zone_primary_ip,
|
|
||||||
'disabled' => 'false',
|
|
||||||
'name' => $zone_name,
|
'name' => $zone_name,
|
||||||
'ttl' => '3600',
|
'nameservers' => [
|
||||||
'type' => 'A'
|
'0' => 'pdnstest.tfmm.co'
|
||||||
|
],
|
||||||
|
'records' => [
|
||||||
|
'0' => [
|
||||||
|
'content' => 'pdnstest.tfmm.co. hostmaster.tfmm.co. 1 1800 900 604800 86400',
|
||||||
|
'disabled' => 'false',
|
||||||
|
'ttl' => '86400',
|
||||||
|
'type' => 'SOA'
|
||||||
|
],
|
||||||
|
'1' => [
|
||||||
|
'content' => $zone_primary_ip,
|
||||||
|
'disabled' => 'false',
|
||||||
|
'name' => $zone_name,
|
||||||
|
'ttl' => '3600',
|
||||||
|
'type' => 'A'
|
||||||
|
]
|
||||||
|
]
|
||||||
]
|
]
|
||||||
]
|
],
|
||||||
],
|
|
||||||
'headers' => [
|
'headers' => [
|
||||||
'X-API-Key' => 'JgTtTq6EFVeo7X71wOVCYQk3rOie2G1k'
|
'X-API-Key' => 'JgTtTq6EFVeo7X71wOVCYQk3rOie2G1k'
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user