Listing Data Sets
Function
This API is used to query data sets by pages and specific conditions.
URI
POST /v1/datashare/query-datasets
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
orgID |
Yes |
String |
Organization ID. |
channelID |
Yes |
String |
Channel ID. |
cryptoMethod |
Yes |
String |
Encryption method, which is fixed at SW. |
cert |
Yes |
String |
Certificate. |
sk |
Yes |
String |
Private key. |
timestamp |
Yes |
String |
Timestamp. |
currentPage |
No |
String |
Pagination parameter: page number (default value: 1). |
pageSizeNum |
No |
String |
Pagination parameter: number of records on each page (default value: 100). |
provider |
No |
String |
Filtering condition: publisher identifier. |
searchText |
No |
String |
Filtering condition: keywords (names and descriptions of products in the data set). |
status |
No |
String |
Filtering condition: data set status (ready or closed). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
items |
Array of DatasetResponse objects |
List. |
pagination |
PaginationResp object |
Pagination information. |
Parameter |
Type |
Description |
---|---|---|
provider |
String |
Data set provider identifier. |
providerName |
String |
Data set provider name. |
productName |
String |
Data set product name. |
productID |
String |
Data set product ID. |
sampleUrl |
String |
Sample data URL. |
sampleSize |
String |
Sample data size. |
sampleType |
String |
Sample data type. |
sampleName |
String |
Sample data name. |
fileType |
String |
File type. |
dataUrl |
String |
Data URL. |
dataHash |
String |
Data hash value. |
dataSize |
String |
Data size. |
dataName |
String |
Data name. |
description |
String |
Data description. |
price |
String |
Data price. |
encryptedAesKey |
String |
Private key. |
status |
String |
Status. |
publishTime |
String |
Data publishing time. |
dataFiles |
Array of DataFile objects |
Data file list. |
sampleFiles |
Array of DataFile objects |
Sample file list. |
category |
String |
Encryption type. |
Parameter |
Type |
Description |
---|---|---|
fileType |
String |
File type. |
dataUrl |
String |
Data URL. |
dataHash |
String |
Data hash value. |
dataSize |
String |
Data size. |
dataName |
String |
Data name. |
Parameter |
Type |
Description |
---|---|---|
currentPage |
Integer |
Current page. |
pageSizeNum |
Integer |
Number of records on each page. |
totalItems |
Integer |
Total number of records. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Error code. |
errorMsg |
String |
Error description. |
Example Requests
{ "orgID" : "ce0ac69b0c8648cd25b44a551780409767c8890b", "channelID" : "mychannel", "cryptoMethod" : "SW", "cert" : "-----BEGIN CERTIFICATE-----\\n...\\n-----END CERTIFICATE-----", "sk" : "-----BEGIN PRIVATE KEY-----\\n...\\n-----END PRIVATE KEY-----", "timestamp" : "2020-10-27T17:28:16+08:00", "currentPage" : "string", "pageSizeNum" : "string", "provider" : "string", "searchText" : "string", "status" : "string" }
Example Responses
Status code: 200
Data set pagination information.
{ "items" : [ { "provider" : "did:example:DHkJjyD5wZwya6sd6BNBnG", "providerName" : "aws", "productName" : "prodname2", "productID" : "product2", "sampleUrl" : "http://hwcloud.com/sample.com/prodname2", "sampleSize" : "10KB", "sampleType" : "csv", "sampleName" : "data_sub1", "fileType" : "csv", "dataUrl" : "http://hwcloud.com/prodname2", "dataHash" : "2282ba7a1a2ef5700609214a997d3d4237a03bfd3632c6d089e57e7b6f467969", "dataSize" : "100MB", "dataName" : "mydata", "description" : "this is second prod", "price" : "0", "encryptedAesKey" : "BA4Ub3t3IskN8uKcEMa+4cbtsDS8OzF4V/qqb4OcPMeMvp7IL+HClzAbL6lPnhbDg/AnrStBlf0qFzRj+qvk6ZH0c7wP0aS48fSoNtecG79aFpFx0dg7rFdVYXWWzgeyI03eD3gFdXlQ/ovpxKJG5ALK39OCazUqDrawZHSDGyIlw0hGh88Q+GVORVSp+6V5Ag==", "status" : "ready", "publishTime" : "1607157244", "dataFiles" : [ { "fileType" : "csv", "dataUrl" : "http://hwcloud.com/prodname2", "dataHash" : "2282ba7a1a2ef5700609214a997d3d4237a03bfd3632c6d089e57e7b6f467969", "dataSize" : "100MB", "dataName" : "mydata" } ], "sampleFiles" : [ { "fileType" : "csv", "dataUrl" : "http://hwcloud.com/prodname2", "dataHash" : "2282ba7a1a2ef5700609214a997d3d4237a03bfd3632c6d089e57e7b6f467969", "dataSize" : "100MB", "dataName" : "mydata" } ], "category" : "string" } ], "pagination" : { "currentPage" : 1, "pageSizeNum" : 100, "totalItems" : 10 } }
Status code: 500
Error response.
{ "errorCode" : "BCS.5002046", "errorMsg" : "Incorrect number of arguments" }
Status Codes
Status Code |
Description |
---|---|
200 |
Data set pagination information. |
500 |
Error response. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot