Skip navigation
fsakr

REST API - Uploading Images

Posted by fsakr Jul 22, 2013

The REST API provides access to retrieve and upload images.

 

Accessing Image Folders

  • GET :  /assets/image/folder/root/folders

 

Response

The response for this call looks as follows :

 

{
  "elements": [
    {
      "type": "Folder",
      "id": "319",
      "createdAt": "1263744559",
      "depth": "minimal",
      "description": "Eloqua Logo",
      "folderId": "318",
      "name": "Eloqua Logo",
      "updatedAt": "1374228103",
      "updatedBy": "573",
      "isSystem": "true"
    },
    {
      "type": "Folder",
      "id": "625",
      "createdAt": "1289591446",
      "createdBy": "11",
      "depth": "minimal",
      "folderId": "318",
      "name": "Sample Images",
      "updatedAt": "1372706467",
      "updatedBy": "503",
      "isSystem": "false"
    },
    {
      "type": "Folder",
      "id": "870",
      "createdAt": "1291340355",
      "createdBy": "9",
      "depth": "minimal",
      "folderId": "318",
      "name": "Sample",
      "updatedAt": "1372024637",
      "updatedBy": "497",
      "isSystem": "false"
    },
    ...
  ],
  "page": 1,
  "pageSize": 1000,
  "total": 162
}

 

Uploading Images

  • POST :  assets/image/content
  • Content type : image/jpeg

 

Response

The response for this call looks as follows :

 

{
  "type": "ImageFile",
  "id": "13077",
  "createdAt": "1374505145",
  "createdBy": "340",
  "depth": "complete",
  "folderId": "318",
  "name": "sample.jpg",
  "updatedAt": "1374505146",
  "updatedBy": "340",
  "fullImageUrl": "\/EloquaImages\/clients\/ORSE\/{ffaa51ba-220e-43da-994f-197338be7d35}_sample.jpg",
  "size": {
    "type": "Size",
    "width": "577",
    "height": "577"
  },
  "thumbnailUrl": "\/EloquaImages\/clients\/ORSE\/imagethumbnails\/{ffaa51ba-220e-43da-994f-197338be7d35}_sample.jpg"
}

 

Code Samples

 

We hope that you find this helpful and please let us know if you have any questions.

 

Thanks,

Fred

Filter Blog

By date: By tag: