地址:https://open.cnipr.com/cnipr-api/v1/api/cocave/ca1/{client_id}
HTTP POST
参数名称 | 参数说明 | 是否必填 | 参数类型 |
---|---|---|---|
client_id | 应用id,如没有clientId请先接入应用,查看接入流程获取 | true | String |
openid | 用户id,可通过 Implicit Grant 方式 或 Authorization Code 方式 等两种方式获取openid | true | String |
access_token | 访问令牌,可通过
Implicit Grant 方式 或
Authorization Code 方式或
Refresh Token 方式
等三种方式获取access_token |
true | String |
exp | 检索表达式,例:作品名称=奔腾电磁炉 表达式能够拼写字段见 CopyrightDto说明字段 |
true | String |
orders | 排序字段,字段前加+号表示升序,加-号表示降序。多个字段排序以逗号分隔,优先级按字段先后顺序。 使用示例:+firstPublishDate表示首次发表日期升序,-firstPublishDate表示首次发表日期降序; | false | List<String> |
from | 返回值起始坐标,默认为0,不能为负数。from:0表示从第1条开始取数据 | true | int |
size | 检索结果集数,上限为100,默认为10 | true | String |
queryType | 检索类型,默认值:2 (按字检索)其它值含义见附录 | false | int |
returnValues | 检索返回字段,多个字段以逗号分隔。未填写则返回默认字段。字段描述见 CopyrightDto属性名称字段 | true | String[] |
exp:作品名称=奔腾电磁炉 orders:+firstPublishDate queryType:2 from:0 size:10 returnValues:abbrName,author,changeOrSupplementNotice,changeOrSupplementNum,city,classifyNum,copyrightOwner,copyrightType,country, finishDate,firstPublishDate,fullName,opusName,opusType,province,publishDate,registerDate,registerNum,versionNum,withdrawNotice
public class SearchClientTest { String client_id = "CLIENT_ID"; String openid = "OPENID"; String access_token = "ACCESS_TOKEN"; /** * 版权数据检索接口 */ @Test public void expSerachTest() throws Exception { String url = "/v1/api/cocave/ca1/"+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("orders", "+firstPublishDate")); nvps.add(new BasicNameValuePair("from", "0")); //from:0,表示从第1条开始取,不能为负数 nvps.add(new BasicNameValuePair("size", "10")); //size:10,表示取10条,上限为50条,不能为负数 nvps.add(new BasicNameValuePair("queryType", "2")); nvps.add(new BasicNameValuePair("returnValues", "abbrName,author,changeOrSupplementNotice,changeOrSupplementNum,city,classifyNum,copyrightOwner,copyrightType,country, finishDate,firstPublishDate,fullName,opusName,opusType,province,publishDate,registerDate,registerNum,versionNum,withdrawNotice")); 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(); } }
属性名称 | 属性说明 | 属性类型 |
---|---|---|
status | 状态码,0代表成功,其它值含义见附录 | long |
message | 响应的信息描述 | String |
total | 命中总数 | long |
from | 检索起始位 | int |
size | 检索数量 | int |
results | 检索结果集 | List<CopyrightDto> -- 数据详细 |
CopyrightDto
属性名称 | 说明 | 类型 |
---|---|---|
abbrName | 软件简称 (软著字段) | string |
addressstr | 地址 | string |
author | 作者(作著字段) | string |
changeOrSupplementNotice | 变更或补充公告(软著字段) | List<ComputerChangeSupplementaryRegistrationDto> -- 变更或补充公告 |
changeOrSupplementNum | 变更或补充公告编号(软著字段) | array |
city | 原城市 | string |
citystr | 城市 | string |
classifyNum | 分类号(软著字段) | string |
copyrightOwner | 著作权人 | string |
copyrightType | 版权类别 | string |
country | 国籍 | string |
customs | 海关备案 | List<CustomsInfoDto> -- 海关备案 |
eastarea | 区 | string |
finishDate | 创作完成日期(作著字段) | string |
firstPublishDate | 首次发表日期(作著字段) | string |
fullName | 软件全称(软著字段) | string |
opusName | 作品名称(作著字段) | string |
opusType | 作品类别(作著字段) | string |
orgstr | 组织 | string |
permission | 专用许可合同登记公告(软著字段) | List<ComputerPermissionDto> -- 专用许可合同登记公告 |
province | 原省份 | string |
provincestr | 省份 | string |
publishDate | 发布日期 | string |
registerDate | 登记日期(软著字段) | string |
registerNum | 登记号 | string |
transfer | 转让登记公告(软著字段) | List<ComputerTransferDto> -- 转让登记公告 |
versionNum | 版本号 | string |
withdrawNotice | 撤销公告(软著字段) | List<ComputerRevocationNoticeDto> -- 撤销公告 |
zone | 园区 | string |
rightScope | 权利范围 | string |
rightAcquisitionMethod | 权利获得方式 | string |
ComputerChangeSupplementaryRegistrationDto -- 变更或补充公告
属性名称 | 说明 | 类型 |
---|---|---|
changeAfter | 变更后 | string |
changeBefore | 变更前 | string |
changeOrSupplementItem | 变更或补充事项 | string |
number | 编号 | string |
originalSoftwareName | 原软件名称 | string |
registerDate | 登记日期 | string |
registerNum | 登记号 | string |
supplementAfter | 补充后 | string |
supplementBefore | 补充前 | string |
CustomsInfoDto -- 海关备案
属性名称 | 说明 | 类型 |
---|---|---|
enddate | 结束日期 | string |
recordno | 备案号 | string |
startdate | 生效日期 | string |
state | 状态 | string |
viewstate | 审批意见 | string |
ComputerPermissionDto -- 专用许可合同登记公告
属性名称 | 说明 | 类型 |
---|---|---|
assignee | 受让方 | string |
lrregisterNum | 登记号 | string |
registerDate | 登记日期 | string |
softwareName | 软件名称 | string |
swregisterNum | 软件著作权登记号 | string |
transferor | 转让方 | string |
ComputerTransferDto -- 转让登记公告
属性名称 | 说明 | 类型 |
---|---|---|
arregisterNum | 登记号 | string |
assignee | 受让方 | string |
registerDate | 登记日期 | string |
softwareName | 软件名称 | string |
swregisterNum | 软件著作权登记号 | string |
transferor | 转让方 | string |
ComputerRevocationNoticeDto -- 撤销公告
属性名称 | 说明 | 类型 |
---|---|---|
originalRegistrant | 原登记者 | string |
registerNum | 登记号 | string |
softwareName | 软件名称 | string |
withdrawDate | 撤销日期 | string |
withdrawReason | 撤销原因 | string |