mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 02:49:21 +02:00
Add initial rdap api endpoint
This commit is contained in:
parent
3495101e9b
commit
2dca24f330
2 changed files with 15 additions and 1 deletions
|
@ -19,6 +19,7 @@ from registrar.utility.s3_bucket import S3ClientError, S3ClientHelper
|
|||
|
||||
|
||||
DOMAIN_FILE_URL = "https://raw.githubusercontent.com/cisagov/dotgov-data/main/current-full.csv"
|
||||
RDAP_URL = "https://rdap.cloudflareregistry.com/rdap/domain/"
|
||||
|
||||
|
||||
DOMAIN_API_MESSAGES = {
|
||||
|
@ -99,6 +100,18 @@ def available(request, domain=""):
|
|||
return json_response
|
||||
|
||||
|
||||
@require_http_methods(["GET"])
|
||||
@login_not_required
|
||||
def rdap(request, domain=""):
|
||||
"""TODO: Write description
|
||||
"""
|
||||
Domain = apps.get_model("registrar.Domain")
|
||||
domain = request.GET.get("domain", "")
|
||||
|
||||
rdap_response = requests.get(DOMAIN_FILE_URL, domain)
|
||||
return rdap_response
|
||||
|
||||
|
||||
@require_http_methods(["GET"])
|
||||
@login_not_required
|
||||
def get_current_full(request, file_name="current-full.csv"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue