资料库 API列表
联系我们
注册 登录

as13,植物新品种二维度单字段分析接口

  • 请求地址:

    地址:https://open.cnipr.com/cnipr-api/rs/api/analysis/as13/{client_id}

  • 请求方法:

    HTTP POST

  • 请求参数:

    取 消 提交申请 清空
    参数名称 参数说明 是否必填 参数类型
    client_id 应用id,如没有clientId请先接入应用,查看接入流程获取 true String
    openid 用户id,可通过 Password Grant 方式 Implicit Grant 方式 Authorization Code 方式 获取 true String
    access_token 访问令牌,可通过 Password Grant 方式 Implicit Grant 方式 Authorization Code 方式Refresh Token 方式
    快速获取access_token
    true String
    exp 检索表达式,例:来源=农业农村部
    可用字段参考字段说明
    true String
    senior 高级检索表达式 false String
    option 检索类型:2 (按字检索,默认值); 1 (按词检索); 3 (同义词检索) false int
    from 返回值起始坐标,默认为0,不能为负数。from:0表示从第1条开始取数据 true int
    size 统计结果集,上限为10000,默认为10 false int
    analysis 分析字段,使用英文名称, 可用字段参考分析字段 true String
    filter 过滤字段 false List<String>
    sort 排序字段,SortByKeyAsc 按分析字段升序;SortByKeyDesc 按分析字段降序;默认为 None 按统计值降序 false String
  • Postman 调用展示
    as13.png
  • Java + HTTP POST
    public class SearchClientTest {
    	String client_id = "CLIENT_ID";
    	String openid = "OPENID";
    	String access_token = "ACCESS_TOKEN";
    
    	/**
    	 * 植物新品种二维度单字段分析接口
    	 */
    	@Test
    	public void expSerachTest() throws Exception {
    		String url = "/rs/api/analysis/as13/"+client_id;
    		List<NameValuePair> nvps = new ArrayList<NameValuePair>();
    		// 提交参数及值
    		nvps.add(new BasicNameValuePair("openid", openid));
    		nvps.add(new BasicNameValuePair("access_token", access_token));
    		nvps.add(new BasicNameValuePair("exp", "来源=农村部"));
    		nvps.add(new BasicNameValuePair("from", "0"));	//from:0,表示从第1条开始取,不能为负数
    		nvps.add(new BasicNameValuePair("size", "10"));	//size:10,表示取10条,上限为100条,不能为负数
    		nvps.add(new BasicNameValuePair("option", "2"));
    		nvps.add(new BasicNameValuePair("analysis", "pubInfo.pyr"));
    		// nvps.add(new BasicNameValuePair("filter", ""));
    		// nvps.add(new BasicNameValuePair("sort", "SortByKeyAsc"));
    		this.POST(url, nvps);
    	}
    
    	public void POST(String url, List<NameValuePair> nvps) throws Exception {
    		DefaultHttpClient httpclient = new DefaultHttpClient();
    		HttpPost httppost = new HttpPost(url);
    		httppost.setHeader("ContentType", "application/x-www-form-urlencoded");
    		// 设置表单提交编码为UTF-8
    		UrlEncodedFormEntity entry = new UrlEncodedFormEntity(nvps, "UTF-8");
    		entry.setContentType("application/x-www-form-urlencoded;charset=UTF-8");
    		httppost.setEntity(entry);
    		HttpResponse response = httpclient.execute(httppost);
    		HttpEntity entity = response.getEntity();
    		String ss = EntityUtils.toString(entity, "UTF-8");
    		//打印返回结果
    		System.out.println(ss);
    		EntityUtils.consume(entity);
    		httpclient.getConnectionManager().shutdown();
    	}
    }
    
pubInfo.aty 公告信息.公告类型 String
pubInfo.clat 公告信息.品种权事务分类 String
pubInfo.pand 公告信息.申请日 String
pubInfo.pand_month 公告信息.申请日月 String
pubInfo.pand_year 公告信息.申请日年 String
pubInfo.sqr 公告信息.申请人或品种权人 String
pubInfo.gkr 公告信息.共同品种权人原始 String
pubInfo.gkrArr 公告信息.共同品种权人 String
pubInfo.pyr 公告信息.培育人原始 String
pubInfo.pyrArr 公告信息.培育人 String
pubInfo.ppn 公告信息.公告号 String
pubInfo.ppd 公告信息.公告日 String
pubInfo.ppd_month 公告信息.公告日月 String
pubInfo.ppd_year 公告信息.公告日年 String
pubInfo.prn 公告信息.优先权号 String
pubInfo.prd 公告信息.优先权日 String
pubInfo.prd_month 公告信息.优先权日月 String
pubInfo.prd_year 公告信息.优先权日年 String
pubInfo.pks 公告信息.品种来源 String
pubInfo.agen 公告信息.代理机构 String
pubInfo.agr 公告信息.代理人 String
pubInfo.grd 公告信息.授权日 String
pubInfo.grd_month 公告信息.授权日月 String
pubInfo.grd_year 公告信息.授权日年 String
pubInfo.tdy 公告信息.颁证日 String
pubInfo.state 公告信息.目前状态 String
pubInfo.dda 公告信息.视为放弃日 String
pubInfo.dda_month 公告信息.视为放弃日月 String
pubInfo.dda_year 公告信息.视为放弃日年 String
pubInfo.dwd 公告信息.视为撤回日 String
pubInfo.dwd_month 公告信息.视为撤回日月 String
pubInfo.dwd_year 公告信息.视为撤回日年 String
pubInfo.rrd 公告信息.权利恢复日 String
pubInfo.rrd_month 公告信息.权利恢复日月 String
pubInfo.rrd_year 公告信息.权利恢复日年 String
pubInfo.afd 公告信息.申请撤回日 String
pubInfo.afd_month 公告信息.申请撤回日月 String
pubInfo.afd_year 公告信息.申请撤回日年 String
pubInfo.tdvr 公告信息.品种权终止日 String
pubInfo.tdvr_month 公告信息.品种权终止日月 String
pubInfo.tdvr_year 公告信息.品种权终止日年 String
pubInfo.rda 公告信息.申请的驳回日 String
pubInfo.rda_month 公告信息.申请的驳回日月 String
pubInfo.rda_year 公告信息.申请的驳回日年 String
pubInfo.tncd 公告信息.品种暂定名称变更日 String
pubInfo.tncd_month 公告信息.品种暂定名称变更日月 String
pubInfo.tncd_year 公告信息.品种暂定名称变更日年 String
pubInfo.tdad 公告信息.品种申请权的转让日 String
pubInfo.tdad_month 公告信息.品种申请权的转让日月 String
pubInfo.tdad_year 公告信息.品种申请权的转让日年 String
pubInfo.adc 公告信息.地址变更日 String
pubInfo.adc_month 公告信息.地址变更日月 String
pubInfo.adc_year 公告信息.地址变更日年 String
pubInfo.sqd 公告信息.申请人或品种权人变更日 String
pubInfo.sqd_month 公告信息.申请人或品种权人变更日月 String
pubInfo.sqd_year 公告信息.申请人或品种权人变更日年 String
pubInfo.sqa 公告信息.变更前申请人或品种权人 String
pubInfo.sqb 公告信息.变更后申请人或品种权人 String
pubInfo.pcd 公告信息.培育人变更日 String
pubInfo.pcd_month 公告信息.培育人变更日月 String
pubInfo.pcd_year 公告信息.培育人变更日年 String
pubInfo.pcf 公告信息.变更前培育人 String
pubInfo.pca 公告信息.变更后培育人 String
pubInfo.agcd 公告信息.代理人变更日 String
pubInfo.agcd_month 公告信息.代理人变更日月 String
pubInfo.agcd_year 公告信息.代理人变更日年 String
pubInfo.agcf 公告信息.变更前代理人 String
pubInfo.agca 公告信息.变更后代理人 String
pubInfo.agencd 公告信息.代理机构变更日 String
pubInfo.agencd_month 公告信息.代理机构变更日月 String
pubInfo.agencd_year 公告信息.代理机构变更日年 String
pubInfo.agencf 公告信息.变更前代理机构 String
pubInfo.agenca 公告信息.变更后代理机构 String
pubInfo.reas 公告信息.原因 String
pubInfo.pkadProvince 公告信息.省 String
pubInfo.pkadCity 公告信息.市 String
pubInfo.pkadCounty 公告信息.区 String
pubInfo.agdrProvince 公告信息.代理机构省 String
pubInfo.agdrCity 公告信息.代理机构市 String
pubInfo.agdrCounty 公告信息.代理机构区 String
  • 分析返回值信息:
    属性名称 属性说明 属性类型
    status 状态码,0代表成功,其它值含义见附录 long
    message 响应的信息描述 String
    total 命中总数 long
    results 分析结果集 List<AnalysisBean>
  • results数据详细说明:

    AnalysisBean

    属性名称 属性说明 属性类型
    analysisTotal 分析总条数 int
    analysisCol 分析字段名(英文) string
    analysisName 分析字段名(中文) string
    analysisFrom 分析取值起始游标值 int
    analysisSize 分析取值数量 int
    list 分析详细 List<KeyValueBean>

    KeyValueBean

    属性名称 属性说明 属性类型
    key 聚类值 string
    value 聚类数量 int