REST API: Accounts/Images

Operations related to User's profile image. GET requires an API key only. POST, and DELETE require OAuth. Only the most recently uploaded image is used.

Resource URI

/Accounts/7440532/Images/48346

Resource Properties

Parameter

Format

Description

Allows Null

acctID  long  Unique ID for account  no 
imageID  long  unique identifier for image  no 
mimeType string  mime type for image.  no 
postDate  date  Date image was posted  no 

Error Responses

HTTP GET

Get the current account profile image

JSON Request:

JSON Response:

[
{
"acctID": 6303185,
"imageID": 173391,
"mimeType": "image/jpeg",
"postDate": "/Date(1591440516000+0000)/"
}
]

XML Request:

XML Response:

HTTP POST

Post a new account Image

JSON Request:

JSON Response:

173391

XML Request:

XML Response:

HTTP DELETE

Delete image.

JSON Request:

Request body empty

JSON Response:

true

XML Request:

Request body empty

XML Response:

true

REST API: Accounts/Images Set

List of Images submitted by a user

Resource URI

/Accounts/7440532/Images/?api_key=xxx

Set Filters

HTTP GET

Users's profile image. Only returns the most recent image. To get the actual binary image data , replace XXXX with the image id and make another call for each image to: http://www.traillink.com/imagehandler.ashx?id=XXXXt=lg

JSON Request:

Request body is empty

JSON Response:

[{
"acctID": 7440532,
"imageID": 48346,
"mimeType": "image\/png",
"postDate": "\/Date(1358972923000-0500)\/"
}]

XML Request:

Request body is empty

XML Response:

HTTP POST

Upload a new profile picture. The most recent image is the one that will be returned on a GET. TThe Content-Type of your request should be the image's mime type. The body should be the image's byte stream. We will return the new ImageID.

JSON Request:

The Request body is a byte stream

JSON Response:

46906

XML Request:

XML Response: