fix: typo

This commit is contained in:
Terrtia 2019-12-16 14:36:34 +01:00
parent 28ece38d82
commit fb6324d4e6
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
2 changed files with 8 additions and 13 deletions

View file

@ -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`<a name="get_domain_metadata_minimal"></a>
### Get min domain metadata: `api/v1/get/domain/status/minimal`<a name="get_domain_status_minimal"></a>
#### 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

View file

@ -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: