Logotype Sitevision Developer
Log in
Log in

ProfileImage REST API endpoint

Disclaimer: This endpoint documentation is generated from the latest Sitevision version. It might differ from the actual Sitevision environment where your website resides.

Use the RestApi utility of the Public API for server-side access of this endpoint.

ProfileImage

Gets or updates the profile image for user identity or collaboration group.

Applicable to: sv:userIdentity, sv:collaborationGroup.

GET

Returns an object containing information about the buddy icon for the specified sv:userIdentity or sv:collaborationGroup. If an image size larger than the actual image size is requested, the largest image size available without upscaling is returned.

Requires the feature "social collaboration" and that social collaboration is enabled on the sv:site.

Requires that the caller is authorized to READ on sv:site.

Name Type Values Description
imageSizes array RAW_PROFILE_IMAGE, BuddyIconSize_SMALL, BuddyIconSize_LARGE, BuddyIconSize_X_LARGE, WIDTH_160, WIDTH_320, WIDTH_480, WIDTH_640, WIDTH_800, WIDTH_960, WIDTH_1120, WIDTH_1280, WIDTH_1440, WIDTH_1600, WIDTH_1760, WIDTH_1920, WIDTH_2080 Filters on image size. If omitted returns data for all image sizes.

Example input

{
   "imageSizes": ["WIDTH_1280", "WIDTH_320", "BuddyIconSize_LARGE"]
}

Example URL

/rest-api/1/0/400.7f84551a13dab43a2249cb/profileimage

Example response

{
   "WIDTH_1280": {
      "url": "/images/200.4f10015b162af57f6ab6/1523360368392/120705172044-large.jpg",
      "height": 640,
      "width": 640
   },
   "WIDTH_320": {
      "url": "/images/200.4f10015b162af57f6ab5/1523360330310/120705172044-large.jpg",
      "height": 321,
      "width": 321
   },
   "BuddyIconSize_LARGE": {
      "url": "/images/200.4f10015b162af57f6ab4/1523360283466/120705172044-large.jpg",
      "width": 48,
      "height": 48
   }
}

POST - MULTI-PART

Upload an image and use it as profile image for a sv:userIdentity or sv:collaborationGroup

Requires the feature "social collaboration" and that social collaboration is enabled on the sv:site

For updates of a sv:userIdentity: Requires that the caller is the sv:userIdentity or is authorized to MANAGE_USER_IDENTITIES on the sv:site

For updates of a sv:collaborationGroup: Requires that the caller is member of the sv:collaborationGroup or is authorized to MANAGE_COLLABORATION_GROUP for the sv:collaborationGroup

Example using "curl" to upload the image "./chuck.jpg" and use it as profile image for user identity "400.65fd2c1013dda050e452e2" for site "www.intranet.com". The upload is performed by the "system" user.

curl --user system -X POST -H "Content-Type: multipart/form-data"
      -F "data=@./chuck.jpg"
      http://www.intranet.com/rest-api/1/1/400.65fd2c1013dda050e452e2/profileimage
Did you find the content on this page useful?