หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Sharing a Data Set

Updated on 2023-03-07 GMT+08:00

Function

This API is used to publish a data set and create authorized orders. Watermarking is not supported.

URI

POST /v1/datashare/dataset/share

Request Parameters

Table 1 Request body 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.

provider

Yes

String

Data publisher identifier.

providerName

No

String

Data publisher name.

productName

Yes

String

Product name.

productID

Yes

String

Product ID.

sampleUrl

Yes

String

Sample data storage location.

sampleSize

No

String

Sample data size.

sampleType

No

String

Sample data type.

sampleName

No

String

Sample data name.

fileType

No

String

Data file type.

dataUrl

Yes

String

Data storage location.

dataHash

No

String

Data hash value.

dataSize

No

String

Data size.

dataName

No

String

Data name.

description

No

String

Data set description. When using ABE for encryption, describe the encryption policy in detail.

plainData

Yes

String

Plaintext of the Base64-encoded data.

consumer

Yes

String

Order applicant identifier.

orderSeq

No

String

Order number. If this parameter is left empty, the value is generated randomly.

watermarkType

No

String

Watermark type, which can be visible or blind. Specify this parameter if you want to embed a watermark. The embedded watermark is in the format of Publisher DID_Product ID.

file

No

String

File to embed a watermark in. If the file has a watermark, the plainData parameter does not take effect.

productIDKeywords

No

Array of productIDKeywordsJson objects

Index keyword contained in the product ID, which is in JSON and is used for querying orders by condition.

onChainStore

No

String

Whether to store ciphertext data on the chain. The value can be true or false (default). If this parameter is set to true, sampleUrl and dataUrl will be automatically set. Watermarking is not supported when chain storage is used.

consumerName

No

String

Name of the user.

creatorDID

No

String

DID of the creator of the data set sharing process. This parameter does not need to be set when action is set to new.

processID

No

String

ID of the data set sharing process. This parameter does not need to be set when action is set to new.

stageName

No

String

Name of the data set sharing stage.

action

No

String

Process action. The options are new, append, and "" (N/A). If this parameter is not set, the value is regarded as N/A.

category

No

String

Encryption type, which can be symmetric (default) or abe. If abe is used, specify policy.

policy

No

policy object

ABE policy.

Table 2 productIDKeywordsJson

Parameter

Mandatory

Type

Description

value

No

String

Keyword value.

Table 3 policy

Parameter

Mandatory

Type

Description

Threshold

Yes

Integer

Attribute threshold that a policy must meet.

Children

Yes

Array of policy-children objects

Sub-attribute list.

Table 4 policy-children

Parameter

Mandatory

Type

Description

name

Yes

String

Attribute name.

type

Yes

String

Attribute type (plain, comparable, or policy.)

value

Yes

policy-children-comparablevalue object

Attribute value, which is determined based on the attribute type. When the attribute type is plain, the value is a string. When the attribute type is policy, the value is a sub-policy. When the attribute type is comparable, the value contains op, value, and maxValue.

Table 5 policy-children-comparablevalue

Parameter

Mandatory

Type

Description

op

No

String

Comparison operator (>, <, or =). This parameter is mandatory when type is set to comparable.

value

Yes

String

Attribute value of the comparison type. The value must be an integer.

maxValue

No

String

Upper limit of value. This parameter is mandatory when the attribute type is comparable.

Response Parameters

Status code: 200

Table 6 Response body parameters

Parameter

Type

Description

consumer

String

Order applicant identifier.

consumerName

String

Order applicant name.

orderSeq

String

Order number.

provider

String

Order provider identifier.

providerName

String

Order provider name.

productID

String

Data set product ID.

productName

String

Data set product name.

price

String

Order amount.

applyTime

String

Application time.

encryptedAesKey

String

Private key.

status

String

Order status.

reason

String

Order application reason.

lockProof

String

Order lock-up proof.

creatorDID

String

DID of the process creator. If there is no process, the value is "".

processID

String

ID of the process of the current order. If there is no process, the value is "".

encryptData

String

Ciphertext of the Base64-encoded data.

Status code: 500

Table 7 Response body parameters

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",
  "provider" : "did:example:DHkJjyD5wZwya6sd6BNBnG",
  "providerName" : "huawei",
  "productName" : "prodname",
  "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" : "mydata1",
  "description" : "this is my second prod",
  "plainData" : "base64 encoding string",
  "consumer" : "did:example:3TMWx8owKHARgNwbj4ywmG",
  "orderSeq" : "1",
  "watermarkType" : "string",
  "file" : "string",
  "productIDKeywords" : "[{\"value\":\"taiyuan\"},{\"value\":\"renmin_hospital\"},{\"value\":\"medicine\"}]",
  "onChainStore" : "string",
  "consumerName" : "string"
}

Example Responses

Status code: 200

Order information.

{
  "consumer" : "did:example:3TMWx8owKHARgNwbj4ywmG",
  "consumerName" : "Tyler",
  "orderSeq" : "1",
  "provider" : "did:example:DHkJjyD5wZwya6sd6BNBnG",
  "providerName" : "hw",
  "productID" : "product1",
  "productName" : "prodname1",
  "price" : "0",
  "applyTime" : "1607332359",
  "encryptedAesKey" : "BNGhPwjaTgpM+V7czzw1i4mH21KKN+XLKXHLqVsRIfybUCncqZNfomkRfzX4WEHj+oty1X9oCd4h6xMnRvs8BWE5Tvg6BJ6QTW/km9EO/FSYqzJf2GqQzAleAcLJrTBZ3LRbPaF87CgJ114ae7R+VK9VvfXQ8exuH2KMRD305dXieGpM4VPVv9u1BbL15Jpd/g==",
  "status" : "ready",
  "reason" : "I want product1",
  "lockProof" : "",
  "encryptData" : "base64 encoding string"
}

Status code: 500

Error response.

{
  "errorCode" : "BCS.5002046",
  "errorMsg" : "Incorrect number of arguments"
}

Status Codes

Status Code

Description

200

Order information.

500

Error response.

Error Codes

See Error Codes.

เราใช้คุกกี้เพื่อปรับปรุงไซต์และประสบการณ์การใช้ของคุณ การเรียกดูเว็บไซต์ของเราต่อแสดงว่าคุณยอมรับนโยบายคุกกี้ของเรา เรียนรู้เพิ่มเติม

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback