Website Endpoints
This page describe website endpoints: https://web-counter.azurewebsites.net/api/website
Base URL: https://web-counter.azurewebsites.net
Create a website
To add your website and generate an API Key
URL: /api/website
Method: POST
Content Type: application/json
Request Body
{
"websiteurl": "https://www.riddlelink.com",
"email": "my_recovery_email@riddlelink.com"
}
Example Requests
- JavaScript
- cURL
const response = await fetch("https://web-counter.azurewebsites.net/api/website", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
websiteurl: "https://www.riddlelink.com",
email: "my_recovery_email@riddlelink.com",
}),
});
curl -X 'POST' \
'https://web-counter.azurewebsites.net/api/website' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"websiteUrl": "https://riddlelink.com",
"email": "Example@Email.com"
}'
Example Responses
- 201 Created
- 409 Conflict
- 400 Bad Request
{
"apiKey": "123456789",
"hostname": "riddlelink.com",
"email": "my_recovery_email@riddlelink.com"
}
"Hostname already exists"
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"errors": {
"additionalProp1": ["string"],
"additionalProp2": ["string"],
"additionalProp3": ["string"]
},
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
Retrieve or Validate Website
Validate and retrieve website details using the API Key
URL: /api/website
Method: GET
Request Parameters
Headers
X-API-Key: YOUR_API_KEY_GOES_HERE
Example Requests
- JavaScript
- cURL
const response = await fetch("https://web-counter.azurewebsites.net/api/website", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
websiteurl: "https://www.riddlelink.com",
email: "my_recovery_email@riddlelink.com",
}),
});
curl -X 'POST' \
'https://web-counter.azurewebsites.net/api/website' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"websiteUrl": "https://riddlelink.com",
"email": "Example@Email.com"
}'
Example Responses
- 200 Success
- 401 Unauthorized
- 400 Bad Request
{
"hostname": "riddlelink.com"
}
{
"type": "https://tools.ietf.org/html/rfc7235#section-3.1",
"title": "Invalid API Key",
"status": 401,
"detail": "The provided API Key was invalid. Please check your API Key and try again.",
"instance": "/api/website"
}
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"errors": {
"additionalProp1": ["string"],
"additionalProp2": ["string"],
"additionalProp3": ["string"]
},
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}