Upload an image
post
/api/REST/1.0/assets/image/content
Uploads an image to Eloqua.
When uploading an image, include a header 'Content-Type: multipart/form-data' in the request and post the image as binary data.
Request
There are no request parameters for this operation.
Back to TopResponse
Supported Media Types
- application/json
201 Response
Success.
Root Schema : ImageFile
Type:
object
Title:
Show Source
ImageFile
-
createdAt:
string
Read Only:
true
The date and time the image was created, expressed in Unix time. -
createdBy:
string
Read Only:
true
The login id of the user who created the image. -
currentStatus:
string
The image's current status.
-
depth:
string
Read Only:
true
Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth:minimal
,partial
, andcomplete
. Any other values passed are reset tocomplete
by default. For more information, see Request depth. -
description:
string
The description of the image.
-
fullImageUrl:
string
The image's complete URL. This is a read-only property.
-
id:
string
Read Only:
true
Id of the image. This is a read-only property. -
name:
string
The name of the image.
-
permissions:
string
The permissions for the image granted to your current instance. This is a read-only property.
-
size:
object Size
Title:
Size
-
thumbnailUrl:
string
The image's thumbnail URL. This is a read-only property.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
-
updatedAt:
string
Read Only:
true
Unix timestamp for the date and time the image was last updated. -
updatedBy:
string
Read Only:
true
The login id of the user that last updated the image.
400 Response
Bad request. See Status Codes for information about other possible HTTP status codes.
401 Response
Unauthorized. See Status Codes for information about other possible HTTP status codes.
403 Response
Forbidden. See Status Codes for information about other possible HTTP status codes.
404 Response
The requested resource was not found. See Status Codes for information about other possible HTTP status codes.
500 Response
The service has encountered an error. See Status Codes for information about other possible HTTP status codes.
Examples
Upload an image:
POST /api/REST/1.0/assets/image/content
Content-Type: multipart/form-data; boundary=ExampleFormBoundary
Request body:
--ExampleFormBoundary
Content-Disposition: form-data; name="file"; filename="test.png"
Content-Type: image/png
{image file data bytes}
--ExampleFormBoundary--
Response:
{
"type": "ImageFile",
"id": "667",
"createdAt": "1466623229",
"createdBy": "9",
"depth": "complete",
"folderId": "416",
"name": "filename.png",
"permissions": ["Retrieve",
"SetSecurity",
"Delete",
"Update"
],
"updatedAt": "1466623230",
"updatedBy": "9",
"fullImageUrl": "\/EloquaImages\/clients\/EloquaCompany\/%7b469fb94c-0f15-496a-a805-aa17a762e459%7d_filename.png",
"size": {
"type": "Size",
"width": "316",
"height": "316"
},
"syncDate": "01\/01\/0001 00:00:00",
"thumbnailUrl": "\/EloquaImages\/clients\/EloquaCompany\/imagethumbnails\/%7b469fb94c-0f15-496a-a805-aa17a762e459%7d_filename.png"
}