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 Top

Response

Supported Media Types

201 Response

Success.
Body ()
Root Schema : ImageFile
Type: object
Title: ImageFile
Show Source
Nested Schema : Size
Type: object
Title: Size
Show Source

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.
Back to Top

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"
}
			
Back to Top