A java package for easy integration of the Domainrobot API powered by InterNetX GmbH.
This Maven package is not available via known repositories. It must be manually installed into a local Maven repository.
Download the code from the current release on the release page.
cd /path/to/package
mvn install
Update pom.xml and add the following line to your dependencies.
<dependency>
<groupId>org.domainrobot</groupId>
<artifactId>sdk-client</artifactId>
<version>0.2.8</version>
</dependency>
The package contains a Domainrobot class that is the main access to the api. Instantiate the class with your api credentials and the matching baseUrl of the api.
- Productive System: https://api.autodns.com/v1
- Demo System: https://api.demo.autodns.com/v1
String userName = "USER";
String password = "PASSWORD";
String context = "CONTEXT";
String baseUrl = "URL";
Domainrobot sdk = Domainrobot(userName,password,context,baseUrl);
ObjectJob create(Domain body, Map<String, String> customHeaders);
ObjectJob update(Domain body, Map<String, String> customHeaders);
Domain info(String domain, Map<String, String> customHeaders);
List<Domain> list(Query body, Map<String, String> customHeaders);
Domain createAuthinfo1(String domain, Map<String, String> customHeaders);
void deleteAuthinfo1(String domain, Map<String, String> customHeaders);
Domain createAuthinfo2(String domain, Map<String, String> customHeaders);
ObjectJob renew(Domain body, Map<String, String> customHeaders);
ObjectJob transfer(Domain body, Map<String, String> customHeaders);
void updateStatus(Domain body, Map<String, String> customHeaders);
List<DomainRestore> restoreList(Query body, Map<String, String> customHeaders);
ObjectJob restore(Domain body, Map<String, String> customHeaders);
DomainCancelation create(DomainCancelation body, Map<String, String> customHeaders);
void update(DomainCancelation body, Map<String, String> customHeaders);
void delete(String domain, Map<String, String> customHeaders);
DomainCancelation info(String domain, Map<String, String> customHeaders);
List<DomainCancelation> list(Query body, Map<String, String> customHeaders);
Contact create(Contact body, Map<String, String> customHeaders);
Contact update(Contact body, Map<String, String> customHeaders);
void delete(int id, Map<String, String> customHeaders);
Contact info(int id, Map<String, String> customHeaders);
List<Contact> list(Query body, Map<String, String> customHeaders);
Zone create(Zone body, Map<String, String> customHeaders);
Zone update(Zone body, Map<String, String> customHeaders);
void delete(String origin, String virtualNameServer, Map<String, String> customHeaders);
Zone info(String origin, String virtualNameServer, Map<String, String> customHeaders);
List<Zone> list(Query body, Map<String, String> customHeaders);
void stream(String origin, ZoneStream body, Map<String, String> customHeaders);
Zone importZone(Zone body, Map<String, String> customHeaders);
Certificate realtime(Certificate body, Map<String, String> customHeaders);
CertificateData prepareOrder(CertificateData body, Map<String, String> customHeaders);
ObjectJob create(Certificate body, Map<String, String> customHeaders);
ObjectJob reissue(Certificate body, Map<String, String> customHeaders);
ObjectJob delete(int id, Map<String, String> customHeaders);
Certificate info(int id, Map<String, String> customHeaders);
List<Certificate> list(Query body, Map<String, String> customHeaders);
ObjectJob renew(Certificate body, Map<String, String> customHeaders);
void commentUpdate(int id, String comment, Map<String, String> customHeaders);
SslContact create(SslContact body, Map<String, String> customHeaders);
SslContact update(SslContact body, Map<String, String> customHeaders);
void delete(int id, Map<String, String> customHeaders);
SslContact info(int id, Map<String, String> customHeaders);
List<SslContact> list(Query body, Map<String, String> customHeaders);
TrustedApplication create(TrustedApplication body, Map<String, String> customHeaders);
TrustedApplication update(TrustedApplication body, Map<String, String> customHeaders);
void delete(String uuid, Map<String, String> customHeaders);
TrustedApplication info(String uuid, Map<String, String> customHeaders);
List<TrustedApplication> list(Query body, Map<String, String> customHeaders);
List<DomainEnvelope> search(DomainEnvelopeSearchRequest body, MultiValueMap<String, String> customHeaders);
PollMessage info(Map<String, String> customHeaders);
void confirm(int id, Map<String, String> customHeaders)
The package contains many classes that represent entities from the Domainrobot API. All Models can be used inside of your own project.
If there is any error response from the API. The DomainRobotprovider will throw a DomainRobotApiException, which contains information about the error.
String userName = "USER";
String password = "PASSWORD";
String context = "4";
String baseUrl = "https://api.autodns.com/v1";
Domainrobot sdk = new Domainrobot(userName, context, password, baseUrl);
DomainEnvelopeSearchRequest body = new DomainEnvelopeSearchRequest();
DomainStudioSources sources = new DomainStudioSources();
sources.suggestion(new DomainStudioSourceSuggestion().max(5));
body.searchToken("java").sources(sources);
try {
List<DomainEnvelope> data = sdk.domainStudio.search(body, null);
for (DomainEnvelope d : data) {
System.out.println(d.getDomain());
}
} catch(DomainrobotApiException e) {
// Handle exception from the API
System.out.println(e.getMessage());
System.out.println(e.getErrorCode());
System.out.println(e.getBody());
} catch(Exception e) {
// Handle unexpected exception
System.out.println("Unknown error " + e);
}
For a detailed changelog, see the CHANGELOG.md file
MIT License
Copyright (c) 2020 InterNetX GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.