Elements Manual
Elements 3 Manual
Elements 3 Manual
  • Welcome 👋
  • QUICK START
    • Elements in Five Minutes or Less
    • Accessing the Web UI (CRM)
    • Creating A User
  • General
    • General Concepts
    • N-Tier Architecture
    • Security Model
  • Core Features
    • Core API Overview
    • Sessions
    • Applications
    • Users and Profiles
    • Digital Goods
    • Progress and Missions
    • Leaderboards
    • Matchmaking
    • Followers
    • Friends
    • Reward Issuance
    • Save Data
    • Schemas and Metadata Specifications
    • Queries
      • Base Query Syntax
      • Boolean Queries
      • Object Graph Navigation
      • Advanced Operators
        • .ref
        • .name
    • Custom Code
      • Element Structure
      • RESTful APIs
      • Websockets
    • Auth Schemes
      • OIDC
      • OAuth2
  • Web 3
    • Omni Chain Support
    • Vaults
    • Wallets
    • Smart Contracts
      • Smart Contracts: Ethereum
      • Smart Contracts: Flow
      • Smart Contracts: Solana
      • Smart Contracts: Neo
  • CONFIGURATION
    • Direct Database Access and Batch Configuration
    • Batch Samples
      • Item Upload Bash Script Sample
      • Mission Upload Bash Script Sample
  • RESTful APIs
    • Swagger and Swagger UI
    • API Specification
      • /application
      • /application/configuration
      • /auth
      • /auth_scheme
        • /custom
        • /oauth2
        • /oidc
      • /blockchain
      • /followee
      • /follower
      • /friend
      • /google
      • /index
      • /inventory
      • /item
      • /large_object
      • /leaderboard
      • /rank
      • /score
      • /match
      • /mission
      • /progress
      • /reward_issuance
      • /schedule
      • /notification
      • /profile
      • /save_data
      • /metadata_spec
      • /mock_session
      • /session
      • /health
      • /version
      • /signup
      • /user
    • Javadocs
  • Releases
    • 3.1 Release Notes
Powered by GitBook
On this page
  1. RESTful APIs
  2. API Specification

/profile

Previous/notificationNext/save_data

Last updated 2 months ago

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
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
*/*
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
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
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
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
application/json
get
GET /api/rest/profile/{name} HTTP/1.1
Host: localhost:8080
Authorization: YOUR_API_KEY
Accept: */*
{
  "code": "text",
  "message": "text"
}
  • GETSearch Profiles
  • POSTCreates a Profile
  • PUTUpdates a Profile
  • DELETEDeletes a Profile
  • GETGets the current Profile
  • GETGets a Specific Profile
  • PUTUpdates a Profile image object

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
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
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
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
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
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
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"
}

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
401Error
application/json
403Error
application/json
404Error
application/json
409Error
application/json
500Error
application/json
501Error
application/json
503Error
application/json
default
default response
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"
}