parent
							
								
									c1e9ad0ed6
								
							
						
					
					
						commit
						73ffcf858a
					
				
				 1 changed files with 85 additions and 0 deletions
			
			
		@ -0,0 +1,85 @@ | 
				
			||||
## **PUT /dns/reverse/{ipaddress}/record** | 
				
			||||
 | 
				
			||||
 | 
				
			||||
## **Inhalt** | 
				
			||||
--- | 
				
			||||
- Parameter | 
				
			||||
- Optionale Parameter | 
				
			||||
- Beispiel Anfrage | 
				
			||||
- Beispiel Antwort | 
				
			||||
- Mögliche Fehlermeldungen | 
				
			||||
--- | 
				
			||||
 | 
				
			||||
### Parameter | 
				
			||||
 | 
				
			||||
|URL Parameter | Typ | Beschreibung| | 
				
			||||
|----------|-----|-------------| | 
				
			||||
|domain | string | Die Domain dessen Records verändert werden sollen | 
				
			||||
 | 
				
			||||
|Body Parameter | Typ | Beschreibung| | 
				
			||||
|----------|-----|-------------| | 
				
			||||
| record | string | Der Record der für die IP-Adresse gesetzt werden soll | | 
				
			||||
 | 
				
			||||
 | 
				
			||||
--- | 
				
			||||
 | 
				
			||||
### Optionale Parameter | 
				
			||||
 | 
				
			||||
|Query-String Parameter | Typ | Beschreibung| | 
				
			||||
|----------|-----|-------------| | 
				
			||||
| - | - | -| | 
				
			||||
 | 
				
			||||
--- | 
				
			||||
 | 
				
			||||
### Beispiel Anfrage | 
				
			||||
 | 
				
			||||
##### PHP | 
				
			||||
```php | 
				
			||||
<?php | 
				
			||||
 | 
				
			||||
$curl = curl_init(); | 
				
			||||
 | 
				
			||||
curl_setopt_array($curl, array( | 
				
			||||
  CURLOPT_URL => 'control.local/api/v2/dns/reverse/x.x.x.x/record', | 
				
			||||
  CURLOPT_CUSTOMREQUEST => 'PUT', | 
				
			||||
  CURLOPT_POSTFIELDS =>'{ | 
				
			||||
    "record": "mail.domain1.de" | 
				
			||||
  }', | 
				
			||||
  CURLOPT_HTTPHEADER => array( | 
				
			||||
    'X-TOKEN: test-token', | 
				
			||||
    'Content-Type: application/json' | 
				
			||||
  ), | 
				
			||||
)); | 
				
			||||
 | 
				
			||||
$response = curl_exec($curl); | 
				
			||||
 | 
				
			||||
curl_close($curl); | 
				
			||||
echo $response; | 
				
			||||
``` | 
				
			||||
 | 
				
			||||
##### cURL | 
				
			||||
```bash | 
				
			||||
curl --location --request PUT 'control.local/api/v2/dns/reverse/x.x.x.x/record' \ | 
				
			||||
--header 'X-TOKEN: test-token' \ | 
				
			||||
--header 'Content-Type: application/json' \ | 
				
			||||
--data-raw '{ | 
				
			||||
    "record": "mail.domain1.de" | 
				
			||||
}' | 
				
			||||
``` | 
				
			||||
 | 
				
			||||
--- | 
				
			||||
 | 
				
			||||
### Beispiel Antwort | 
				
			||||
 | 
				
			||||
```json | 
				
			||||
{ | 
				
			||||
    "status": "OK" | 
				
			||||
} | 
				
			||||
``` | 
				
			||||
 | 
				
			||||
### Mögliche Fehlermeldungen | 
				
			||||
 | 
				
			||||
 | 
				
			||||
> :warning: Status Code **400** - Seems the ip address you've entered are not owened by you | 
				
			||||
 | 
				
			||||
> :warning: Status Code **403** - Permission denied | 
				
			||||
					Loading…
					
					
				
		Reference in new issue