You can call this operation to create the content of a contract project in the format of a file or folder in Ant Blockchain.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateAntChainContractContent |
The operation that you want to perform. Set the value to CreateAntChainContractContent. |
ContentName | String | Yes | newFile |
The name of the file or folder to create. |
IsDirectory | Boolean | Yes | false |
Specifies whether to create a folder. |
ParentContentId | String | Yes | R38DYDop |
The ID of the parent directory where the file or folder to create resides. |
ProjectId | String | Yes | bDXK1b8Z |
The ID of the contract project to which the file or folder to create belongs. |
Content | String | No | "" |
The content of the file or folder to create. |
RegionId | String | No | cn-hangzhou |
The ID of the region where Ant Blockchain is used. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | C407F102-062A-44B3-BBDC-E3B2718F633D |
The ID of the request. |
Result |
The result of the operation. |
||
Content | String | "" |
The content of the created file or folder. |
ContentId | String | R6XMn59e |
The ID of the created file or folder. |
ContentName | String | newFile |
The name of the created file or folder. |
CreateTime | String | 1564024964404 |
The time when the file or folder was created. |
IsDirectory | Boolean | false |
Indicates whether a folder was created. |
ParentContentId | String | R38DYDop |
The ID of the parent directory where the created file or folder resides. |
ProjectId | String | bDXK1b8Z |
The ID of the contract project to which the created file or folder belongs. |
UpdateTime | String | 1564024964404 |
The time when the file or folder was updated. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateAntChainContractContent
&<Common request parameters>
Sample success responses
JSON
format
{
"successResponse":true,
"requestId":"C407F102-062A-44B3-BBDC-E3B2718F633D",
"data":{
"Result":{
"ParentContentId":"R38DYDop",
"IsDirectory":false,
"CreateTime":1564024964404,
"ContentId":"R6XMn59e",
"UpdateTime":1564024964404,
"ContentName":"newFile",
"Content":"",
"ProjectId":"bDXK1b8Z"
},
"RequestId":"C407F102-062A-44B3-BBDC-E3B2718F633D"
},
"code":"200"
}
Error codes
For a list of error codes, visit the API Error Center.