docker build -t {image_name} --no-cache .
docker run -d --rm --name assistant_api -p 8000:8000 {image_name}
Welcome to the Personal Assistant API! This API provides endpoints to retrieve information about IP addresses, check ports, and perform DNS lookups.
To get started with the API, you can use the following endpoints:
/ipinfo
: Retrieve information about the IP address./portchecker
: Check if a port is open on a specified IP address./dnschecker
: Perform a DNS lookup for a given domain name.
Endpoint: /ipinfo/8.8.8.8
Method: GET
Query Parameters:
ip
: The IP address to get information about.
Example:
Response:
{
"ip": "8.8.8.8",
"city": "Mountain View",
"country": "US"
}
Checks if a port is open on a specified IP address.
- Endpoint:
/portchecker
- Method: GET
- Query Parameters:
ip
: IP address to check port on.port
: Port number to check.
Request:
GET /portchecker?ip=8.8.8.8&port=53
Response:
{
"message": "Port 53 is open on IP 8.8.8.8"
}
Performs a DNS lookup for a given domain name.
- Endpoint:
/dnschecker
- Method: GET
- Query Parameters:
dnsname
: Domain name to perform DNS lookup.
Request:
GET /dnschecker?dnsname=example.com
Response:
{
"message": "DNS lookup result for example.com: 93.184.216.34"
}