Documentation > Access API > AssetController > accessapi/Asset/Attach
accessapi/Asset/Attach
Upload and attach data to an asset. Attachment name will be based on originalFilename parameter and saved to the content fields of the asset.
POST
https://cms.crownpeak.com/[Your Instance]/cpt_webservice/accessapi/Asset/AttachRequest Information
URI Parameters
None.
Body Parameters
The parameters sent as post data.
AssetAttachRequest
| Name | Description | Type |
|---|---|---|
| assetId | System.Int32 | |
| bytes | System.Byte[] | |
| originalFilename | System.String |
Request Formats
application/json
Sample:
{
"assetId": 4559,
"originalFilename": "test upload file",
"bytes": "SGVsbG8sIHdvcmxk"
}
Response Information
Resource Description
AssetAttachResponse
| Name | Description | Type |
|---|---|---|
| displayUrl | System.String | |
| ResultCode | eResultCodes | |
| ErrorMessage | System.String | |
| InternalCode | System.Int32 | |
| IsSuccessful | System.Boolean |
Response Formats
application/json
Sample:
{
"displayUrl": "",
"resultCode": "conWS_Success",
"errorMessage": "",
"internalCode": 0
}