diff --git a/doc/README.md b/doc/README.md index db61d3fb..44987c94 100644 --- a/doc/README.md +++ b/doc/README.md @@ -990,9 +990,11 @@ Get crawled domain by date-range and status (default status = *UP*) - `date_from` - date from - *str - YYYYMMDD* + - mandatory - `date_to` - date to - *str - YYYYMMDD* + - mandatory #### JSON response - `domain_type` @@ -1037,17 +1039,10 @@ curl https://127.0.0.1:7000/api/v1/get/crawled/domain/list --header "Authorizati } ``` -**HTTP Status Code** : `404` - -```json - ({"status": "error", "reason": "Domain not found"} - -``` - -### Get min domain metadata: `api/v1/get/domain/metadata/minimal` +### Get min domain metadata: `api/v1/get/domain/status/minimal` #### Description Get min domain metadata @@ -1073,7 +1068,7 @@ Get min domain metadata #### Example ``` -curl https://127.0.0.1:7000/api/v1/get/domain/metadata/minimal --header "Authorization: iHc1_ChZxj1aXmiFiF1mkxxQkzawwriEaZpPqyTQj " -H "Content-Type: application/json" --data @input.json -X POST +curl https://127.0.0.1:7000/api/v1/get/domain/status/minimal --header "Authorization: iHc1_ChZxj1aXmiFiF1mkxxQkzawwriEaZpPqyTQj " -H "Content-Type: application/json" --data @input.json -X POST ``` #### input.json Example diff --git a/var/www/modules/restApi/Flask_restApi.py b/var/www/modules/restApi/Flask_restApi.py index 79975bf1..8f777790 100644 --- a/var/www/modules/restApi/Flask_restApi.py +++ b/var/www/modules/restApi/Flask_restApi.py @@ -469,9 +469,9 @@ def get_item_cryptocurrency_bitcoin(): # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # DOMAIN # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -@restApi.route("api/v1/get/domain/metadata/minimal", methods=['POST']) +@restApi.route("api/v1/get/domain/status/minimal", methods=['POST']) @token_required('analyst') -def get_domain_metadata_minimal(): +def get_domain_status_minimal(): data = request.get_json() domain = data.get('domain', None) # error handler @@ -482,9 +482,9 @@ def get_domain_metadata_minimal(): res[0]['domain'] = domain return create_json_response(res[0], res[1]) -@restApi.route("api/v1/get/domain/list", methods=['POST']) +@restApi.route("api/v1/get/crawled/domain/list", methods=['POST']) @token_required('analyst') -def get_domain_list(): +def get_crawled_domain_list(): data = request.get_json() res = get_mandatory_fields(data, ['date_from', 'date_to']) if res: