Skip to content

Commit

Permalink
- Updated: API routes, links
Browse files Browse the repository at this point in the history
  • Loading branch information
whoisxmlapi committed May 26, 2021
1 parent f1439b4 commit e0ac560
Show file tree
Hide file tree
Showing 19 changed files with 44 additions and 44 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Using the Registrant Alert API 2.0 web service

[Registrant Alert API](https://registrant-alert-api.whoisxmlapi.com) searches
[Registrant Alert API](https://registrant-alert.whoisxmlapi.com/api) searches
across all newly registered, renewed & deleted domain names for specific terms
such as registrant's email, organization etc. The API is ideal for monitoring
domain registrants to be alerted whenever their information appears in a
Expand All @@ -10,12 +10,12 @@ Here you'll find examples of querying the API implemented in multiple
languages.

You'll need a
[WhoisXmlApi account](https://registrant-alert-api.whoisxmlapi.com/signup) to
[WhoisXmlApi account](https://registrant-alert.whoisxmlapi.com/api/signup) to
authenticate.
You can use either the **X-Authentication-Token** header or the request's body
**apiKey** parameter.

Please, refer to the
[Registrant Alert API User Guide](https://registrant-alert-api.whoisxmlapi.com/docs)
[Registrant Alert API User Guide](https://registrant-alert.whoisxmlapi.com/api/documentation/making-requests)
for info on input parameters, request/response formats, authentication
instructions and more.
instructions and more.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public String sendPost() throws Exception
public String sendPost(boolean isAdvanced) throws Exception
{
String userAgent = "Mozilla/5.0";
String url = "https://registrant-alert-api.whoisxmlapi.com/api/v2";
String url = "https://registrant-alert.whoisxmlapi.com/api/v2";

URL obj = new URL(url);
HttpsURLConnection con = (HttpsURLConnection) obj.openConnection();
Expand Down Expand Up @@ -126,4 +126,4 @@ private void prettyPrintJson(String jsonString)
System.out.println("\n\n" + prettyJsonString);
System.out.println("----------------------------------------");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript">

var url = "https://registrant-alert-api.whoisxmlapi.com/api/v2";
var url = "https://registrant-alert.whoisxmlapi.com/api/v2";
var apiKey = "Your registrant alert api key";

var data_basic = {
Expand Down Expand Up @@ -62,4 +62,4 @@
</script>
</head>
<body></body>
</html>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public static class RegistrantAlertApiV2HeaderAuthSample
private const string ApiKey = "Your registrant alert api key";

private const string Url =
"https://registrant-alert-api.whoisxmlapi.com/api/v2";
"https://registrant-alert.whoisxmlapi.com/api/v2";

private const string SearchParamsAdvanced =
@"{
advancedSearchTerms: [
Expand Down Expand Up @@ -51,7 +51,7 @@ private static void Main()
{
var responsePost = SendPostRegistrantAlert();
PrintResponse(responsePost);

responsePost = SendPostRegistrantAlert(true);
PrintResponse(responsePost);

Expand Down Expand Up @@ -98,7 +98,7 @@ private static string SendPostRegistrantAlert(bool isAdvanced=false)
}

var res = "";

using (var response=(HttpWebResponse)httpWebRequest.GetResponse())
using (var responseStream = response.GetResponseStream())
{
Expand All @@ -116,4 +116,4 @@ private static string SendPostRegistrantAlert(bool isAdvanced=false)
}
}
}
}
}
4 changes: 2 additions & 2 deletions header-auth/node/registrant_alert_api_v2_header_auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function api_call(data, callback)
var body = '';

var opts = {
hostname: 'registrant-alert-api.whoisxmlapi.com',
hostname: 'registrant-alert.whoisxmlapi.com',
path: '/api/v2',
method:'POST',
headers: {
Expand Down Expand Up @@ -76,4 +76,4 @@ api_call(post_data_basic, function(body) {
console.log('Advanced:');
console.log(body);
});
});
});
4 changes: 2 additions & 2 deletions header-auth/perl/registrant_alert_api_v2_header_auth.pl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
########################
my $api_key = 'Your registrant alert api key';

my $url = 'https://registrant-alert-api.whoisxmlapi.com/api/v2';
my $url = 'https://registrant-alert.whoisxmlapi.com/api/v2';

my $search_params_advanced = '{
"advancedSearchTerms": [
Expand Down Expand Up @@ -76,4 +76,4 @@ sub registrantAlertApiSearch {
my $result = $ua->request($req);

return $result->content;
}
}
4 changes: 2 additions & 2 deletions header-auth/php/registrant_alert_api_v2_header_auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function registrant_alert_api(array $data=array())
$header = "Content-Type:application/json\r\nAccept:application/json\r\n";
$header .= "X-Authentication-Token: {$apiKey}\r\n";

$url = 'https://registrant-alert-api.whoisxmlapi.com/api/v2';
$url = 'https://registrant-alert.whoisxmlapi.com/api/v2';

$options = array(
'http' => array(
Expand All @@ -51,4 +51,4 @@ function registrant_alert_api(array $data=array())
print_r(json_decode(registrant_alert_api($termsBasic)));

print('Advanced:' . PHP_EOL);
print_r(json_decode(registrant_alert_api($termsAdvanced)));
print_r(json_decode(registrant_alert_api($termsAdvanced)));
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $paramsBasic = @{
# POST request #
#######################

$uri = 'https://registrant-alert-api.whoisxmlapi.com/api/v2'
$uri = 'https://registrant-alert.whoisxmlapi.com/api/v2'

$response = Invoke-WebRequest -Uri $uri -Method POST -Body $paramsBasic `
-ContentType 'application/json' `
Expand All @@ -47,4 +47,4 @@ $response = Invoke-WebRequest -Uri $uri -Method POST -Body $paramsAdvanced `
-Headers @{'X-Authentication-Token'=$apiKey}

echo 'Advanced:'
echo $response.content | convertfrom-json | convertto-json -depth 10
echo $response.content | convertfrom-json | convertto-json -depth 10
2 changes: 1 addition & 1 deletion header-auth/python/registrant_alert_api_v2_header_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def print_response(txt):
'X-Authentication-Token': api_key
}

conn = http.HTTPSConnection('registrant-alert-api.whoisxmlapi.com')
conn = http.HTTPSConnection('registrant-alert.whoisxmlapi.com')

conn.request('POST', '/api/v2', json.dumps(payload_basic), headers)
text = conn.getresponse().read().decode('utf8')
Expand Down
4 changes: 2 additions & 2 deletions header-auth/ruby/registrant_alert_api_v2_header_auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require 'uri'
require 'yaml' # only needed to print the returned result in a very pretty way

url = 'https://registrant-alert-api.whoisxmlapi.com/api/v2'
url = 'https://registrant-alert.whoisxmlapi.com/api/v2'

########################
# Fill in your details #
Expand Down Expand Up @@ -64,4 +64,4 @@
response = http.request(request)

puts "\nAdvanced:"
puts JSON.parse(response.body).to_yaml
puts JSON.parse(response.body).to_yaml
4 changes: 2 additions & 2 deletions java/src/main/java/RegistrantAlertV2Sample.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public String sendPost() throws Exception
public String sendPost(boolean isAdvanced) throws Exception
{
String userAgent = "Mozilla/5.0";
String url = "https://registrant-alert-api.whoisxmlapi.com/api/v2";
String url = "https://registrant-alert.whoisxmlapi.com/api/v2";

URL obj = new URL(url);
HttpsURLConnection con = (HttpsURLConnection) obj.openConnection();
Expand Down Expand Up @@ -133,4 +133,4 @@ private void prettyPrintJson(String jsonString)
System.out.println("\n\n" + prettyJsonString);
System.out.println("----------------------------------------");
}
}
}
4 changes: 2 additions & 2 deletions js/registrant_alert_api_v2_jquery.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript">

var url = "https://registrant-alert-api.whoisxmlapi.com/api/v2";
var url = "https://registrant-alert.whoisxmlapi.com/api/v2";
var apiKey = "Your registrant alert api key";

var post_data_basic = {
Expand Down Expand Up @@ -56,4 +56,4 @@
</script>
</head>
<body></body>
</html>
</html>
10 changes: 5 additions & 5 deletions net/RegistrantAlertApi/RegistrantAlertApiV2Sample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public static class RegistrantAlertApiV2Sample
private const string ApiKey = "Your registrant alert api key";

private const string Url =
"https://registrant-alert-api.whoisxmlapi.com/api/v2";
"https://registrant-alert.whoisxmlapi.com/api/v2";

private const string SearchParamsAdvanced =
@"{
advancedSearchTerms: [
Expand Down Expand Up @@ -53,7 +53,7 @@ private static void Main()
{
var responsePost = SendPostRegistrantAlert();
PrintResponse(responsePost);

responsePost = SendPostRegistrantAlert(true);
PrintResponse(responsePost);

Expand Down Expand Up @@ -100,7 +100,7 @@ private static string SendPostRegistrantAlert(bool isAdvanced=false)
}

var res = "";

using (var response=(HttpWebResponse)httpWebRequest.GetResponse())
using (var responseStream = response.GetResponseStream())
{
Expand All @@ -118,4 +118,4 @@ private static string SendPostRegistrantAlert(bool isAdvanced=false)
}
}
}
}
}
4 changes: 2 additions & 2 deletions node/registrant_alert_api_v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function api_call(data, callback)
var body = '';

var opts = {
hostname: 'registrant-alert-api.whoisxmlapi.com',
hostname: 'registrant-alert.whoisxmlapi.com',
path: '/api/v2',
method:'POST',
headers: {
Expand Down Expand Up @@ -77,4 +77,4 @@ api_call(post_data_basic, function(body) {
console.log('Advanced:');
console.log(body);
});
});
});
4 changes: 2 additions & 2 deletions perl/registrant_alert_api_v2.pl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
########################
my $api_key = 'Your registrant alert api key';

my $url = 'https://registrant-alert-api.whoisxmlapi.com/api/v2';
my $url = 'https://registrant-alert.whoisxmlapi.com/api/v2';

my $search_params_advanced = '{
"advancedSearchTerms": [
Expand Down Expand Up @@ -77,4 +77,4 @@ sub registrantAlertApiSearch {
my $result = $ua->request($req);

return $result->content;
}
}
4 changes: 2 additions & 2 deletions php/registrant_alert_api_v2.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function registrant_alert_api(array $data=array())
{
$header ="Content-Type: application/json\r\nAccept: application/json\r\n";

$url = 'https://registrant-alert-api.whoisxmlapi.com/api/v2';
$url = 'https://registrant-alert.whoisxmlapi.com/api/v2';

$options = array(
'http' => array(
Expand All @@ -50,4 +50,4 @@ function registrant_alert_api(array $data=array())
print_r(json_decode(registrant_alert_api($termsBasic)));

print('Advanced:' . PHP_EOL);
print_r(json_decode(registrant_alert_api($termsAdvanced)));
print_r(json_decode(registrant_alert_api($termsAdvanced)));
4 changes: 2 additions & 2 deletions powershell/registrant_alert_api_v2.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $paramsBasic = @{
# POST request #
#######################

$uri = 'https://registrant-alert-api.whoisxmlapi.com/api/v2'
$uri = 'https://registrant-alert.whoisxmlapi.com/api/v2'

$response = Invoke-WebRequest -Uri $uri -Method POST -Body $paramsBasic `
-ContentType 'application/json'
Expand All @@ -47,4 +47,4 @@ $response = Invoke-WebRequest -Uri $uri -Method POST -Body $paramsAdvanced `
-ContentType 'application/json'

echo 'Advanced:'
echo $response.content | convertfrom-json | convertto-json -depth 10
echo $response.content | convertfrom-json | convertto-json -depth 10
2 changes: 1 addition & 1 deletion python/registrant_alert_api_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def print_response(txt):
'Accept': 'application/json'
}

conn = http.HTTPSConnection('registrant-alert-api.whoisxmlapi.com')
conn = http.HTTPSConnection('registrant-alert.whoisxmlapi.com')

conn.request('POST', '/api/v2', json.dumps(payload_basic), headers)
text = conn.getresponse().read().decode('utf8')
Expand Down
4 changes: 2 additions & 2 deletions ruby/registrant_alert_api_v2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require 'uri'
require 'yaml' # only needed to print the returned result in a very pretty way

url = 'https://registrant-alert-api.whoisxmlapi.com/api/v2'
url = 'https://registrant-alert.whoisxmlapi.com/api/v2'

########################
# Fill in your details #
Expand Down Expand Up @@ -65,4 +65,4 @@
response = http.request(request)

puts "\nAdvanced:"
puts JSON.parse(response.body).to_yaml
puts JSON.parse(response.body).to_yaml

0 comments on commit e0ac560

Please sign in to comment.