跳到正文

Quake服务索引数据检索可筛选字段

接口说明

返回当前用户在quake_service索引下,通过API检索时允许作为include / exclude筛选返回字段的白名单列表。 该白名单由管理员按用户或角色维度配置,不同用户返回结果可能不同。调用方在使用/api/v3/search/quake_service检索前,应先调用本接口获取可用字段,再据此拼装include/exclude,避免因传入未授权字段而被校验拦截。

请求地址

https://api.f.360.cn/api/v3/filterable/field/quake_service

请求方法

GET

请求参数

参数名类型位置是否必填示例值说明
—————本接口无请求参数

响应参数

名称类型示例值描述
codeString0响应状态码,0 为正常,其他为异常
messageStringSuccessful.响应状态信息
dataArray(String)["ip","port","domain",...]可过滤字段名称列表
metaObject{}元信息

data 字段说明

data 数组包含所有可用于服务资产过滤查询的字段标识,字段分类如下:

字段标识说明
ipIP 地址
port端口号
domain域名
hostname主机名
transport传输层协议
asn自治系统编号
org组织名称
time扫描时间
service.name服务名称
service.response服务响应内容
service.cert服务证书
service.http.status_codeHTTP 状态码
service.http.titleHTTP 页面标题
service.http.bodyHTTP 响应体
service.http.serverHTTP Server 头
service.http.hostHTTP Host 头
service.http.linkHTTP 链接
service.http.favicon.dataFavicon 原始数据
service.http.favicon.hashFavicon 哈希值
service.http.icp.licenceICP 备案号
service.http.icp.main_licence.unitICP 主体单位
service.http.infomation.mailHTTP 页面中的邮箱信息
location.country_cn国家(中文)
location.country_en国家(英文)
location.province_cn省份(中文)
location.province_en省份(英文)
location.city_cn城市(中文)
location.city_en城市(英文)
location.district_cn区县(中文)
location.district_en区县(英文)
location.isp运营商
components.product_name_cn组件产品名称(中文)
components.product_vendor组件厂商
components.product_catalog组件产品目录
components.product_type组件产品类型
components.product_level组件产品层级
components.version组件版本号
images页面截图

请求示例

支持cUrl、Python、Java、PHP、Go语言的请求,示例如下

#!/usr/bin/env bash
set -euo pipefail

APPID=""  # apikey
SECRET=""  # salt
URL="https://api.f.360.cn/api/v3/filterable/field/quake_service"
BODY=""

NONCE=$(printf '%08d' $((RANDOM % 100000000)))
TIMESTAMP=$(date +%s)
BODY_MD5=$(printf '%s' "$BODY" | openssl dgst -md5 -hex | awk '{print $NF}')
SIGNATURE=$(printf '%s' "${BODY_MD5}${APPID}${NONCE}${TIMESTAMP}${SECRET}" | openssl dgst -md5 -hex | awk '{print $NF}')
SIGNATURE=${SIGNATURE:16}

curl --location --request GET "$URL" \
  --header "Content-Type: application/json" \
  --header "X-360-Key: ${APPID}" \
  --header "X-360-Nonce: ${NONCE}" \
  --header "X-360-Timestamp: ${TIMESTAMP}" \
  --header "X-360-Signature: ${SIGNATURE}"

响应示例

业务正常响应

{
  "code": 0,
  "message": "Successful.",
  "data": [
    "service.http.status_code",
    "location.city_en",
    "transport",
    "service.http.infomation.mail",
    "location.country_en",
    "location.district_cn",
    "components.version",
    "location.country_cn",
    "service.http.title",
    "location.province_en",
    "service.http.icp.licence",
    "location.district_en",
    "asn",
    "components.product_catalog",
    "service.name",
    "service.http.link",
    "service.response",
    "location.province_cn",
    "port",
    "service.http.favicon.data",
    "location.isp",
    "service.http.host",
    "components.product_level",
    "service.http.body",
    "domain",
    "components.product_type",
    "service.http.icp.main_licence.unit",
    "service.cert",
    "location.city_cn",
    "components.product_vendor",
    "ip",
    "org",
    "service.http.favicon.hash",
    "time",
    "components.product_name_cn",
    "hostname",
    "service.http.server",
    "images"
  ],
  "meta": {}
}

业务异常响应

{
  "code": "q3005",
  "message": "调用API过于频繁",
  "data": {},
  "meta": {}
}
{
    "code": "GC00105", 
    "src": "apiholder",
    "msg": "appid over field"
}