Overview
Process API can help you import data into a specific DCP through the form of interface docking. By adding the corresponding request parameters to the request according to the interface instructions, the system will return the processing results after the call. The request and response are encoded using the UTF-8 character set.
API | Description |
---|---|
v2/process/create | Create DCP Data |
v2/process/update | Update DCP data |
v2/process/detail | Query the latest DCP data |
v2/process/fullDetail | Get multilingual DCP data |
v2/process/getList | Query DCP data list |
v2/attachment/upload | Upload attachment |
v2/attachment/info | Query attachment information |
v2/attachment/{fileHash} | Download attachment |
-
Create DCP data
POST v2/process/create
Create DCP data. The interface has idempotent property, which is determined by the field of requestNo. If the field of requestNo is different, it will be treated as a new request. When calling this interface, you need to ensure that the operator has the create permission. For how to assign permissions, please refer to here. For permission comparison instructions, please refer to here. When orderStatus is FAILURE, developers need to add compensation mechanism. When the orderStatus is SUCCESS, you need to use the dataUUID or dataVID in the returned result to call Query the latest DCP data. The dcpStatus field in DCP details determines whether the call is successful. When the dcpStatus field is "SUCCESS", it indicates that the call is successful. Otherwise, the call fails, and a compensation mechanism needs to be added. When uploading hash data(DCP type = DCP hash), please make sure the hash value(field: base.datalist.data) is hex string(sha256) , the length of which is 32 bytes.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
dcpInstanceUUID | string | Y | DCP UUID, please refer to here |
+ defaultLangDCPValue | DcpValueInfo | Y | DCP data in default language |
└ bizLanguage | string | N | default language, use the default language of process if not set. For language types, please refer to here |
└ dataValue | object(json) | Y | DCP detailed data, please refer to here |
+ otherLangDCPValue | array(DcpValueInfo) | N | DCP data collection in other languages |
└ bizLanguage | string | Y | language, please refer to here |
└ dataValue | object(json) | Y | DCP detailed data, please refer to here |
projectUUID | string | Y | project ID, please refer to here |
toolchainOperatorUUID | string | Y | operator ID, please refer to here |
requestNo | string | Y | request number, length is no more than 50, only letters and numbers are allowed |
smartcontractId | string | N | smart contrat address |
submitStatus | string | Y | submit status(DRAFT,SUBMIT), DRAFT can be updated to SUBMIT |
Request Example
{
"requestNo": "123456789022223",
"submitStatus": "SUBMIT",
"defaultLangDCPValue":
{
"bizLanguage": "zh-CN",
"dataValue":
{
"base":
{
"skucode": "SKU Operation B",
"productname": "English 22223",
"mainimage":
{
"filetype": "jpg",
"filelocation": "/resource/7a9c83bf70ee49e67dff864fc2762a18ea659c85b2038679787f3f52795a19b7",
"filename": "abc.jpg",
"filesize": "12990",
"filehash": "7a9c83bf70ee49e67dff864fc2762a18ea659c85b2038679787f3f52795a19b7"
},
"description": "VEBOOK",
"productparames": [
{
"key": "Number",
"value": "2019 No.1"
}],
"files": [
{
"filetype": "pdf",
"filelocation": "/resource/4244162a1f4eeb27d98805d8ad3722a6eb093fb4613d9ab7f4bac2b50ad07115",
"filename": "111.pdf",
"filesize": "102558",
"filehash": "4244162a1f4eeb27d98805d8ad3722a6eb093fb4613d9ab7f4bac2b50ad07115"
}],
"timestamp": 0
},
"custom":
{}
}
},
"smartcontractId": "",
"dcpInstanceUUID": "10516100-e593-4bf5-806f-048401200000",
"projectUUID": "15664C28-F375-61C2-1146-934D59400001",
"toolchainOperatorUUID": "0xde7f8974f9fe41b5b4f48350594d345fcda9a74a0c00e4b52cd4720b08f5bf44"
}
Response Example
{
"code": "common.success",
"data":
{
"dataUUID": "10516100-a73d-4e5b-99c3-22f702200000",
"dataVID": "0x9e39633d001592838332e6c0ddfa343b13ff69a8770e36b76a9c3800340a646a",
"orderStatus": "SUCCESS",
"requestNo": "123456789022223"
}
}
Response Parameters
Name | Type | Description |
---|---|---|
dataUUID | string | data UUID, which can be used as input parameter when call update DCP data and query the latest DCP data |
dataVID | string | data VID of on-chain information, return null if this DCP is not sent to blockchain. It can be used as input parameter when query the latest DCP data |
requestNo | string | request number |
orderStatus | string |
request status(INIT,PROCESSING,SUCCESS,FAILURE), for more details, please refer to here |
-
Update DCP data
POST v2/process/update
Update DCP data. The interface has idempotent property, which is determined by the field of requestNo. If the field of requestNo is different, it will be treated as a new request. When calling this interface, you need to ensure that the operator has the create permission. For how to assign permissions, please refer to here. For permission comparison instructions, please refer to here. When orderStatus is FAILURE, developers need to add compensation mechanism. When the orderStatus is SUCCESS, you need to use the dataUUID or dataVID in the returned result to call Query the latest DCP data. The dcpStatus field in DCP details determines whether the call is successful. When the dcpStatus field is "SUCCESS", it indicates that the call is successful. Otherwise, the call fails, and a compensation mechanism needs to be added. When uploading hash data(DCP type = DCP hash), please make sure the hash value(field: base.datalist.data) is hex string(sha256) , the length of which is 32 bytes.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
dataUUID | string | Y | data UUID, which is from the response of create DCP data api. |
dcpInstanceUUID | string | Y | DCP UUID, please refer to here |
+ defaultLangDCPValue | DcpValueInfo | Y | DCP data in default language |
└ bizLanguage | string | N | default language, use the default language of process if not set. For language types, please refer to here |
└ dataValue | object(json) | Y | DCP detailed data, please refer to here |
+ otherLangDCPValue | array(DcpValueInfo) | N | DCP data collection in other languages |
└ bizLanguage | string | Y | language, please refer to here |
└ dataValue | object(json) | Y | DCP detailed data, please refer to here |
projectUUID | string | Y | project ID, please refer to here |
toolchainOperatorUUID | string | Y | operator ID, please refer to here |
requestNo | string | Y | request number, length is no more than 50, only letters and numbers are allowed |
smartcontractId | string | N | smart contract address |
submitStatus | string | Y | submit status(DRAFT,SUBMIT), DRAFT can be updated to SUBMIT |
Request Example
{
"dataUUID": "11000200-c7e3-43ac-bc11-70f302200015",
"dcpInstanceUUID": "11000200-7b66-42bf-a5d4-2fae01200015",
"defaultLangDCPValue":
{
"dataValue":
{
"custom":
{},
"base":
{
"datalist": [
{
"data": "3f357fb5638cc7169d2e48e8dff83f618bcd7b6c46ffb5e008134f6cc15be8fc",
"vidlist":
{
"type": 0,
"vidlist": ["0X912139A4001592476415F237CBDC72D08BED2039F47991DEED48C3E4176E8748", "0X912139A4001592476415AFF22CCEADA5B952FCEDE5E5B8E808A86D6FD0502072", "0X912139A40015924764157C5B5CCF46DA4E795A36849D6F3F71A364BDEAFF901A"]
}
}],
"name": "dcp hash name1592476426064"
}
}
},
"projectUUID": "15600000-0000-3B95-A485-00205DF934B3",
"requestNo": "1592476523177",
"submitStatus": "SUBMIT",
"toolchainOperatorUUID": "0x733a4d5427d06e8a9d6d25679df8c9a12df9ed5f459abff1f5d9b22ea5691ff6"
}
Response Example
{
"code": "common.success",
"data":
{
"dataUUID": "11000200-c7e3-43ac-bc11-70f302200015",
"orderStatus": "SUCCESS",
"requestNo": "1592476523177"
}
}
Response Parameters
Name | Type | Description |
---|---|---|
dataUUID | string | data UUID, which can be used as input parameter when call update DCP data and query the latest DCP data |
dataVID | string | data VID of on-chain information, return null if this DCP is not sent to blockchain. It can be used as input parameter when call query the latest DCP data |
requestNo | string | request number |
orderStatus | string | request status(INIT,PROCESSING,SUCCESS,FAILURE), for more details, please refer to here |
-
Query the latest DCP data
POST v2/process/detail
Query the results after creating or updating DCP data. For permission comparison instructions, please refer to here
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
dataUUID | string | Y | data UUID, which is from the response of create DCP data . |
toolchainOperatorUUID | string | Y | operator ID, please refer to here |
bizLanguage | string | N | language type, return the DCP information of the default language if not set |
Request Example
{
"dataUUID": "11000200-882f-4a91-9865-e4c802200015",
"toolchainOperatorUUID": "0x733a4d5427d06e8a9d6d25679df8c9a12df9ed5f459abff1f5d9b22ea5691ff6"
}
Response Example
{
"code": "common.success",
"data":
{
"dcpBasicInfo":
{
"blockChainStatus": "NO",
"createTime": 1592534751000,
"creator": "hm_operator",
"languageList": ["en"],
"modifier": "hm_operator",
"toolchainOperatorUUID": "0x733a4d5427d06e8a9d6d25679df8c9a12df9ed5f459abff1f5d9b22ea5691ff6",
"updateTime": 1592534791000,
"verificationStatus": "PROCESSING"
},
"dcpBlockchainInfo":
{
"dataHash": "2ecc08d1c6b2f243a9074818c857ab1f2e43485de86cb608c4877ce9eafdc090",
"dataUUID": "11000200-882f-4a91-9865-e4c802200015"
},
"dcpDataInfo":
{
"bizLanguage": "en",
"dataUUID": "11000200-882f-4a91-9865-e4c802200015",
"dcpDataInfo":
{
"custom":
{},
"base":
{
"datalist": [
{
"data": "d4ddcbbe0479b24a8e90ead9ba2e4a5d6722b95d90937da5e9698e81b69d4e6e",
"vidlist":
{
"type": 0,
"vidlist": ["0X912139A4001592534739A1791A06626E9B80E4ABCFEC97E2D8336669EEAF7B1F", "0X912139A4001592534739BDBAD8DC22F9866776A29463E1577EA1DBA30DEC0B70", "0X912139A4001592534739C36E6FADAABC3B877E106631086116EBB894F5471CF0"]
}
}],
"name": "dcp hash name1592534749410",
"timestamp": 1592534790876
}
},
"dcpInstanceUUID": "11000200-7b66-42bf-a5d4-2fae01200015",
"name": "dcp hash name1592534749410",
"submitStatus": "SUBMIT",
"version": "V11.0"
},
"dcpVerificatonInfo":
{}
}
}
Response Parameters
Name | Type | Description |
---|---|---|
+ dcpBasicInfo | DCPBasicInfoBrief | DCP basic information |
└ blockChainStatus | string | on-chain status(PROCESSING,SUCCESS,NO),‘NO’ means no blockchain information |
└ createTime | integer | create time |
└ creator | string | operators who create DCP data |
└ languageList | array(string) | types of submitted languages |
└ modifier | string | operators who create or update DCP data |
└ toolchainOperatorUUID | string | operator id who create or update DCP data |
└ updateTime | integer | update time |
└ verificationStatus | string | verification status(PROCESSING,SUCCESS,NO),’NO’ means no verification information |
└ dcpStatus | string | DCP status(PROCESSING,SUCCESS) |
+ dcpBlockchainInfo | DCPBlockChainInfoBrief | DCP on-chain information |
└ clauseIndex | integer | clause index of this blockchain transaction |
└ dataHash | string | hash value of this blockchain transaction |
└ dataUUID | string | data UUID |
└ dataVID | string | data VID |
└ txId | string | blockchain transaction ID |
+ dcpDataInfo | DCPDataInfoBrief | DCP data information |
└ bizLanguage | string | language |
└ dataUUID | string | data UUID |
└ dcpDataInfo | object(json) | DCP data information |
└ dcpInstanceUUID | string | DCP UUID |
└ name | string | DCP record name when creating or updating DCP data(ex: sku name) |
└ submitStatus | string | submit status of DCP data |
└ version | string | DCP version when creating or updating DCP data |
+ dcpVerificatonInfo | DCPVerificationInfoBrief | DCP verification information |
└ auditor | string | auditor when creating or updating DCP data |
└ clauseIndex | string | clause index of the blockchain transaction of the verification |
└ verificationDataHash | string | data hash of verification when creating or updating DCP data |
└ verificationDataUUID | string | data UUID of verification when creating or updating DCP data |
└ verificationDataVid | string | data VID of verification when creating or updating DCP data |
└ verificationResult | string | verification result when creating or updating DCP data |
└ verificationTime | integer | verification time when creating or updating DCP data |
└ verificationTxId | string | blockchain transaction ID of verification when creating or updating DCP data |
-
Get multilingual DCP data
POST v2/process/fullDetail
Query the multilingual results after creating or updating DCP data. For permission comparison instructions, please refer to here
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
dataUUID | string | Y | data UUID, which is from the response of create DCP data . |
toolchainOperatorUUID | string | Y | operator ID, please refer to here |
Request Example
{
"dataUUID": "00000000-5bae-4f67-bb45-3e9302200000",
"toolchainOperatorUUID": "0x2cdbcc10a1376a72ad10ae046773e8ec0b1d38e1d1671c1804dcfc82715b8b53"
}
Response Example
{
"code": "common.success",
"data": {
"dcpBasicInfo": {
"creator": "training",
"createTime": 1618475762000,
"modifier": "training",
"updateTime": 1623826809000,
"languageList": [
"en",
"zh-CN"
],
"dcpStatus": "SUCCESS"
},
"dcpDataInfo": {
"dcpInstanceUUID": "10000700-669b-4d15-90d3-86f801200000",
"dataUUID": "00000000-5bae-4f67-bb45-3e9302200000",
"name": "Black pig",
"dcpDataInfo": {
"data": {
"dcpreferences": [],
"custom": {},
"base": {
"mainimage": {
"filelocation": "/resource/2c81253ce3a271d74e4a316e7aa3708de8b56eae41cb226a61f29b854559f1cd",
"filetype": "jpeg",
"filename": "blackpig.jpeg",
"filesize": "342313",
"filehash": "2c81253ce3a271d74e4a316e7aa3708de8b56eae41cb226a61f29b854559f1cd"
},
"skucode": "Pig00001",
"productname": "Black pig",
"description": "Pigs have been domesticated for nearly 5000 years in China. The Jiuchong Tianbao Longyan site in Shungeng area of the southern mountain area of Jinan and the tuhe River Basin in Jiyang today are important heritage sites of animal husbandry in ancient times.",
"files": [
{
"filelocation": "/resource/355f1ec4be38faeee2a8b8c4fd826ba25b65e606cc797b99c0a8ca9160ea8897",
"filetype": "pdf",
"filename": "black pig introduction.pdf",
"filesize": "23678",
"filehash": "355f1ec4be38faeee2a8b8c4fd826ba25b65e606cc797b99c0a8ca9160ea8897"
}
],
"productparames": [
{
"value": "50KG",
"key": "Weight"
},
{
"value": "Black",
"key": "breed"
}
],
"timestamp": 1623826808629
}
},
"language": [
{
"zh-CN": {
"custom": {},
"base": {
"mainimage": {
"filelocation": "/resource/2c81253ce3a271d74e4a316e7aa3708de8b56eae41cb226a61f29b854559f1cd",
"filetype": "jpeg",
"filename": "黑猪.jpeg",
"filesize": "342313",
"filehash": "2c81253ce3a271d74e4a316e7aa3708de8b56eae41cb226a61f29b854559f1cd"
},
"skucode": "Pig00001",
"productname": "正宗的黑猪",
"description": "黑猪在中国已有近五千年驯养史,济南南部山区舜耕一带的九重天豢龙岩遗址和今济阳徒河流域都是上古畜牧业养殖的重要传承地。",
"files": [
{
"filelocation": "/resource/355f1ec4be38faeee2a8b8c4fd826ba25b65e606cc797b99c0a8ca9160ea8897",
"filetype": "pdf",
"filename": "黑猪的介绍.pdf",
"filesize": "23678",
"filehash": "355f1ec4be38faeee2a8b8c4fd826ba25b65e606cc797b99c0a8ca9160ea8897"
}
],
"productparames": [
{
"value": "50KG",
"key": "重量"
},
{
"key": "品种"
}
],
"timestamp": 1623826808629
}
}
}
]
},
"version": "V1.0",
"submitStatus": "DRAFT",
"bizLanguage": "en"
},
"dcpBlockchainInfo": {
"dataHash": "bd4cef63535633ddf00edc05f163d44680c81455e3fb1122e3fb4587bb8c9e3f",
"dataUUID": "00000000-5bae-4f67-bb45-3e9302200000"
}
}
}
Response Parameters
Name | Type | Description |
---|---|---|
+ dcpBasicInfo | DCPBasicInfoBrief | DCP basic information |
└ blockChainStatus | string | on-chain status(PROCESSING,SUCCESS,NO),‘NO’ means no blockchain information |
└ createTime | integer | create time |
└ creator | string | operators who create DCP data |
└ languageList | array(string) | types of submitted languages |
└ modifier | string | operators who create or update DCP data |
└ toolchainOperatorUUID | string | operator id who create or update DCP data |
└ updateTime | integer | update time |
└ verificationStatus | string | verification status(PROCESSING,SUCCESS,NO),’NO’ means no verification information |
└ dcpStatus | string | DCP status(PROCESSING,SUCCESS) |
+ dcpBlockchainInfo | DCPBlockChainInfoBrief | DCP on-chain information |
└ clauseIndex | integer | clause index of this blockchain transaction |
└ dataHash | string | hash value of this blockchain transaction |
└ dataUUID | string | data UUID |
└ dataVID | string | data VID |
└ txId | string | blockchain transaction ID |
+ dcpDataInfo | DCPDataInfoBrief | DCP data information |
└ bizLanguage | string | language |
└ dataUUID | string | data UUID |
└ dcpDataInfo | object(json) | DCP data information |
└ dcpInstanceUUID | string | DCP UUID |
└ name | string | DCP record name when creating or updating DCP data(ex: sku name) |
└ submitStatus | string | submit status of DCP data |
└ version | string | DCP version when creating or updating DCP data |
+ dcpVerificatonInfo | DCPVerificationInfoBrief | DCP verification information |
└ auditor | string | auditor when creating or updating DCP data |
└ clauseIndex | string | clause index of the blockchain transaction of the verification |
└ verificationDataHash | string | data hash of verification when creating or updating DCP data |
└ verificationDataUUID | string | data UUID of verification when creating or updating DCP data |
└ verificationDataVid | string | data VID of verification when creating or updating DCP data |
└ verificationResult | string | verification result when creating or updating DCP data |
└ verificationTime | integer | verification time when creating or updating DCP data |
└ verificationTxId | string | blockchain transaction ID of verification when creating or updating DCP data |
-
Query DCP data list
POST v2/process/getList
Query the DCP list and return the results in reverse order of creation time. This interface is implemented by the logic of page turning query. For example, if you need to query the latest 120 pieces of data on the chain, you can use page=1, size=100 and page=2, size=100 to request the interface respectively, and get the first 20 pieces of data in the second request. Similarly, you can also use page=1, size=60 and page=2, size=60 to request the interface to obtain data twice. If you want to further check the details, please use the query latest DCP data interface to query, currently only supports querying the latest updated record. For permission comparison instructions, please refer to here
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
dcpInstanceUUID | string | Y | DCP UUID, please refer to here |
dcpName | string | N | DCP record name when creating or updating DCP data(ex: sku name) |
startTime | long | N | filter the start time of DCP data based on the UTC time (accurate to milliseconds) of the update time |
endTime | long | N | filter the end time of DCP data based on the UTC time (accurate to milliseconds) of the update time |
page | integer | Y | page number, ex: page 3 |
size | integer | Y | row number displayed per page, up to 100 |
submitStatus | string | N | submit status(DRAFT,SUBMIT) |
projectUUID | string | Y | project ID, please refer to here |
toolchainOperatorUUID | string | Y | operator ID, please refer to here |
Request Example
{
"dcpInstanceUUID": "11000200-7b66-42bf-a5d4-2fae01200015",
"page": 1,
"projectUUID": "15600000-0000-3B95-A485-00205DF934B3",
"size": 10,
"toolchainOperatorUUID": "0x733a4d5427d06e8a9d6d25679df8c9a12df9ed5f459abff1f5d9b22ea5691ff6"
}
Response Example
{
"code": "common.success",
"data":
{
"exist": true,
"list": [
{
"blockChainStatus": "NO",
"createTime": 1592534846000,
"creator": "hm_operator",
"dataUUID": "11000200-96f3-4fc9-b0e6-3b3a02200015",
"dcpInstanceUUID": "11000200-7b66-42bf-a5d4-2fae01200015",
"dcpName": "dcp hash name1592534749410",
"dcpType": "DCPHASH",
"modifier": "hm_operator",
"requestNo": "a41ea950-01e3-4e2f-acb2-6128e46d3079",
"submitStatus": "SUBMIT",
"updateTime": 1592534881000,
"verificationStatus": "PROCESSING",
"dcpStatus": "SUCCESS",
"version": "V11.0"
},
{
"blockChainStatus": "NO",
"createTime": 1592534751000,
"creator": "hm_operator",
"dataUUID": "11000200-882f-4a91-9865-e4c802200015",
"dcpInstanceUUID": "11000200-7b66-42bf-a5d4-2fae01200015",
"dcpName": "dcp hash name1592534749410",
"dcpType": "DCPHASH",
"modifier": "hm_operator",
"requestNo": "11533e83-131f-4f0b-8702-851e2b7a5174",
"submitStatus": "SUBMIT",
"updateTime": 1592534791000,
"verificationStatus": "PROCESSING",
"dcpStatus": "SUCCESS",
"version": "V11.0"
},
{
"blockChainStatus": "NO",
"createTime": 1592534426000,
"creator": "hm_operator",
"dataUUID": "11000200-bcb4-46c5-b5fc-eedf02200015",
"dcpInstanceUUID": "11000200-7b66-42bf-a5d4-2fae01200015",
"dcpName": "dcp hash name1592534276633",
"dcpType": "DCPHASH",
"modifier": "hm_operator",
"requestNo": "0806e053-865f-463e-b546-8f0dcc085605",
"submitStatus": "SUBMIT",
"updateTime": 1592534462000,
"verificationStatus": "PROCESSING",
"dcpStatus": "SUCCESS",
"version": "V11.0"
},
{
"blockChainStatus": "NO",
"createTime": 1592534279000,
"creator": "hm_operator",
"dataUUID": "11000200-9b22-487f-b090-52ba02200015",
"dcpInstanceUUID": "11000200-7b66-42bf-a5d4-2fae01200015",
"dcpName": "dcp hash name1592534276633",
"dcpType": "DCPHASH",
"modifier": "hm_operator",
"requestNo": "bc545873-3ae7-45a3-bee5-abdd1f03db83",
"submitStatus": "SUBMIT",
"updateTime": 1592534312000,
"verificationStatus": "PROCESSING",
"dcpStatus": "SUCCESS",
"version": "V11.0"
},
{
"blockChainStatus": "NO",
"createTime": 1592476524000,
"creator": "hm_operator",
"dataUUID": "11000200-2143-4ef1-9ae1-ee4102200015",
"dcpInstanceUUID": "11000200-7b66-42bf-a5d4-2fae01200015",
"dcpName": "dcp hash name1592476426064",
"dcpType": "DCPHASH",
"modifier": "hm_operator",
"requestNo": "15881c21-6a48-4201-afa5-cba4d39bacbb",
"submitStatus": "SUBMIT",
"updateTime": 1592476562000,
"verificationStatus": "PROCESSING",
"dcpStatus": "SUCCESS",
"version": "V11.0"
},
{
"blockChainStatus": "NO",
"createTime": 1592476428000,
"creator": "hm_operator",
"dataUUID": "11000200-c7e3-43ac-bc11-70f302200015",
"dcpInstanceUUID": "11000200-7b66-42bf-a5d4-2fae01200015",
"dcpName": "dcp hash name1592476426064",
"dcpType": "DCPHASH",
"modifier": "hm_operator",
"requestNo": "468e7074-e8e3-4cde-9da2-a6e0c83f5c8e",
"submitStatus": "SUBMIT",
"updateTime": 1592476442000,
"verificationStatus": "PROCESSING",
"dcpStatus": "SUCCESS",
"version": "V11.0"
},
{
"blockChainStatus": "NO",
"createTime": 1592364953000,
"creator": "hm_operator",
"dataUUID": "11000200-0274-4029-acfb-104502200015",
"dcpInstanceUUID": "11000200-7b66-42bf-a5d4-2fae01200015",
"dcpName": "哈希上链测试",
"dcpType": "DCPHASH",
"modifier": "hm_operator",
"requestNo": "fa385820-942b-4aa6-9367-0e8c71e7e707",
"submitStatus": "SUBMIT",
"updateTime": 1592364991000,
"verificationStatus": "PROCESSING",
"dcpStatus": "SUCCESS",
"version": "V11.0"
},
{
"blockChainStatus": "NO",
"createTime": 1592314825000,
"creator": "hm_operator",
"dataUUID": "11000200-6350-4788-a011-3a3b02200015",
"dcpInstanceUUID": "11000200-7b66-42bf-a5d4-2fae01200015",
"dcpName": "dcp hash name1592314695855",
"dcpType": "DCPHASH",
"modifier": "hm_operator",
"requestNo": "56afe14d-3c3c-45a8-9aa8-a5c813a5bc3d",
"submitStatus": "SUBMIT",
"updateTime": 1592314861000,
"verificationStatus": "PROCESSING",
"dcpStatus": "SUCCESS",
"version": "V11.0"
},
{
"blockChainStatus": "NO",
"createTime": 1592314697000,
"creator": "hm_operator",
"dataUUID": "11000200-12b4-417c-a903-20dc02200015",
"dcpInstanceUUID": "11000200-7b66-42bf-a5d4-2fae01200015",
"dcpName": "dcp hash name1592314695855",
"dcpType": "DCPHASH",
"modifier": "hm_operator",
"requestNo": "e612d10b-34d6-4e3e-9864-656d4b7901fc",
"submitStatus": "SUBMIT",
"updateTime": 1592314741000,
"verificationStatus": "PROCESSING",
"dcpStatus": "SUCCESS",
"version": "V11.0"
},
{
"blockChainStatus": "NO",
"createTime": 1592310086000,
"creator": "hm_operator",
"dataUUID": "11000200-4138-45c7-9ff4-674b02200015",
"dcpInstanceUUID": "11000200-7b66-42bf-a5d4-2fae01200015",
"dcpName": "dcp hash name1592309967122",
"dcpType": "DCPHASH",
"modifier": "hm_operator",
"requestNo": "a04330cd-2851-40e2-b15f-fa7be2306254",
"submitStatus": "SUBMIT",
"updateTime": 1592310121000,
"verificationStatus": "PROCESSING",
"dcpStatus": "SUCCESS",
"version": "V11.0"
}],
"page": 1,
"rows": 29,
"size": 10
}
}
Response Parameters
Name | Type | Description |
---|---|---|
exist | boolean | if data exist |
size | int | row number displayed per page |
page | int | page number |
rows | int | total rows |
+ list | array(DataPointListInfoBrief) | collection of DCP data information |
└ blockChainStatus | string | on-chain status(PROCESSING,SUCCESS,NO),‘NO’ means no blockchain information |
└ createTime | integer | create time |
└ creator | string | operators who create DCP data |
└ dataUUID | string | data UUID when creating or updating DCP data |
└ dcpInstanceUUID | string | DCP UUID when creating or updating DCP data |
└ updateTime | integer | update time |
└ dcpName | string | DCP record name when creating or updating DCP data(ex: sku name) |
└ dcpType | string | DCP type when creating or updating DCP data |
└ modifier | integer | operators who modify DCP data |
└ requestNo | string | request number when creating or updating DCP data |
└ submitStatus | string | submit status when creating or updating DCP data |
└ verificationStatus | string | verification status(PROCESSING,SUCCESS,NO),’NO’ means no verification information |
└ dcpStatus | string | DCP status(PROCESSING,SUCCESS) |
└ version | string | DCP version when creating or updating DCP data |
-
Upload attachment
POST v2/attachment/upload
upload static resources. please record the return fields filetype, filelocation, filename, filesize, filehash, which are needed when assembling DCP data. When sending a request, please use multipart/form-data for Body's content-type. Please ensure that the size of the resource is within the range allowed by the DCP data format, such as <=3000bytes.
Postman settings are as follows:
Supported media types are as follows:
Media type | File format | Size |
---|---|---|
data | ["json"] | 1MB |
image | ["jpeg","jpg","png","jpe","ico","gif"] | 10MB |
vedio | ["mp4","3gp","avi","m3u8","mp3","rmvb"] | 30MB |
file | ["xls","csv","doc","xlsx","txt","docx","md","wps","ppt","pptx","pdf"] | 30MB |
zip | ["zip"] | 30MB |
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
file | File | Y | the local path of static resources, temporarily does not support http(s) links |
Curl Request Example
curl --location --request POST 'https://developer.vetoolchain.com/api/v2/attachment/upload' \
--header 'Content-Type: application/json;charset=utf-8' \
--header 'x-api-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpbklkIjoiNWIwMWE5MmIzOGI3IiwiYXBwSWQiOiJhODJiN2I5MGNmMDE0ZDFhMDk5YzEzOTdmMzA5NzZiYyIsInNvdXJjZSI6ImFhYSIsImV4cCI6MTU5MzM0MDM5NCwiaWF0IjoxNTkzMjUzOTk0fQ.OcVyoPx9a4VAbLHAY4MYdDlRJpHnzChToMnXNZeIr-s' \
--form 'file=@/Users/junzhang/Desktop/WechatIMG95.jpeg'
Response Example
{
"code": "common.success",
"data":
{
"filehash": "56c9cbdb4fa51f2b247e0b4d6fbe4a6d1c6c7cecca2925b5b69d4e073e366ac4",
"filelocation": "/resource/56c9cbdb4fa51f2b247e0b4d6fbe4a6d1c6c7cecca2925b5b69d4e073e366ac4",
"filename": "jsonlist_cn.png",
"filesize": 36632,
"filetype": "png"
}
}
Response Parameters
Name | Type | Description |
---|---|---|
filehash | string | hash value of resource |
filelocation | string | file location of resource |
filename | string | name of resource |
filesize | integer | size of resource |
filetype | string | media type of resource |
-
Query the uploaded resource information
GET v2/attachment/info?fileHash={fileHash}
Query the uploaded resource information。
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
fileHash | string | Y | file hash returned by the interface after a successful upload |
Curl Request Example
curl --location --request GET 'https://developer.vetoolchain.com/api/v2/attachment/info?fileHash=e39549740cf40bc9c2ec82866efda33a7eeaba1e97e3dd3422289989b58bb28c' \
--header 'language: zh_hans' \
--header 'Content-Type: application/json;charset=utf-8' \
--header 'x-api-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpbklkIjoiNWIwMWE5MmIzOGI3IiwiYXBwSWQiOiJhODJiN2I5MGNmMDE0ZDFhMDk5YzEzOTdmMzA5NzZiYyIsInNvdXJjZSI6ImFhYSIsImV4cCI6MTU5MzM0MDM5NCwiaWF0IjoxNTkzMjUzOTk0fQ.OcVyoPx9a4VAbLHAY4MYdDlRJpHnzChToMnXNZeIr-s'
Response Example
{
"code": "common.success",
"data":
{
"filehash": "56c9cbdb4fa51f2b247e0b4d6fbe4a6d1c6c7cecca2925b5b69d4e073e366ac4",
"filelocation": "/resource/56c9cbdb4fa51f2b247e0b4d6fbe4a6d1c6c7cecca2925b5b69d4e073e366ac4",
"filename": "jsonlist_cn.png",
"filesize": 36632,
"filetype": "png"
}
}
Response Parameters
Name | Type | Description |
---|---|---|
filehash | string | hash value of resource |
filelocation | string | file location of resource |
filename | string | name of resource |
filesize | integer | size of resource |
filetype | string | media type of resource |
-
Download attachment
GET v2/attachment/{fileHash}
Download resources
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
fileHash | string | Y | file hash returned by the interface after a successful upload |
Curl Request Example
curl --location --request GET 'https://developer.vetoolchain.com/api/v2/attachment/e39549740cf40bc9c2ec82866efda33a7eeaba1e97e3dd3422289989b58bb28c' \
--header 'language: zh_hans' \
--header 'Content-Type: application/json;charset=utf-8' \
--header 'x-api-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpbklkIjoiNzliM2VjZTVkY2VkIiwiYXBwSWQiOiJhODJiN2I5MGNmMDE0ZDFhMDk5YzEzOTdmMzA5NzZiYyIsInNvdXJjZSI6ImFhYSIsImV4cCI6MTU5MzQyNjg1MiwiaWF0IjoxNTkzMzQwNDUyfQ.WJ0oQEoWV7kSagzSUbarzlrbKHwAJRaOh7GUaG8-1v0'
Response Example
Response Parameters
Comments
0 comments
Please sign in to leave a comment.