/profile

Search Profiles

get

Searches all users in the system and returning the metadata for all matches against the given search filter. Optionally provide before and after params to specify a time range [after, before] for last-logged-in profiles matching in that range (inclusive). If before is not specified (or a negative number is provided) but after is valid, the query will return all records successive to the given after timestamp. Similarly, if after is not specified (or a negative number is provided) but before is valid, the query will return all records preceding the given before timestamp. Note that search and time range parameters currently cannot be combined in the same query.

Authorizations
Query parameters
offsetanyOptionalDefault: 0
countanyOptionalDefault: 20
beforeanyOptional
afteranyOptional
applicationanyOptional
useranyOptional
searchanyOptional
Responses
400Error
application/json
get
GET /api/rest/profile HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Creates a Profile

post

Supplying the create profile request, this will update the profile with the new information supplied in the body of the request. This will fire an event, dev.getelements.elements.service.profile.created, from the event manifest.

Authorizations
Body

Represents a request to create a profile for a user.

userIdanyRequired

The user id this profile belongs to.

applicationIdanyRequired

The application id this profile belongs to.

imageUrlanyOptional

A URL to the image of the profile. (ie the User's Avatar).

displayNameanyOptional

A non-unique display name for this profile.

metadataanyOptional

A map of arbitrary metadata.

Responses
400Error
application/json
post
POST /api/rest/profile HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: */*
Accept: */*
Content-Length: 87

{
  "userId": null,
  "applicationId": null,
  "imageUrl": null,
  "displayName": null,
  "metadata": null
}
{
  "code": "text",
  "message": "text"
}

Updates a Profile

put

Supplying an update request will attempt to update the profile. The call will return the profile as it was written to the database.

Authorizations
Path parameters
profileIdanyRequired
Body

Represents a request to update a profile.

imageUrlanyOptional

A URL to the image of the profile. (ie the User's Avatar).

displayNameanyOptional

A non-unique display name for this profile.

metadataanyOptional

A map of arbitrary metadata.

Responses
400Error
application/json
put
PUT /api/rest/profile/{profileId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: */*
Accept: */*
Content-Length: 52

{
  "imageUrl": null,
  "displayName": null,
  "metadata": null
}
{
  "code": "text",
  "message": "text"
}

Deletes a Profile

delete

Deletes and permanently removes the Profile from the server. The server maykeep some record around to preserve relationships and references, but this profile will not be accessible again until it is recreated.

Authorizations
Path parameters
profileIdanyRequired
Responses
400Error
application/json
delete
DELETE /api/rest/profile/{profileId} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Gets the current Profile

get

This is a special endpoing which fetches the current Profile based on current auth credentials. This considers the currently loggged-in Dser as well as the Application or Application Configuration against which the User is operating. This may not be availble, in which case the appopraite error is rasied.

Authorizations
Responses
400Error
application/json
get
GET /api/rest/profile/current HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Gets a Specific Profile

get

Gets a specific profile by profile ID.

Authorizations
Path parameters
nameanyRequired
Responses
400Error
application/json
get
GET /api/rest/profile/{name} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}

Updates a Profile image object

put
Authorizations
Path parameters
profileIdanyRequired
Body

Represents a request to update an image profile.

mimeTypeanyRequired

MimeType of image

Responses
400Error
application/json
put
PUT /api/rest/profile/{profileId}/image HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Content-Type: */*
Accept: */*
Content-Length: 17

{
  "mimeType": null
}
{
  "code": "text",
  "message": "text"
}

Last updated