Crafter Profile (4.1.6)

Download OpenAPI specification:Download

E-mail: info@craftercms.org License: GPL 3.0

Crafter Profile API

access_token

Access token management

Create Access Token

Creates a new access token

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Request Body schema: application/json

The access token

application
string
master
boolean
Array of objects
expiresOn
integer
id
string

Responses

Request samples

Content type
application/json
{
  • "application": "sample-app",
  • "master": false,
  • "tenantPermissions": [
    ],
  • "expiresOn": 1704067200000
}

Response samples

Content type
application/json
{
  • "application": "sample-app",
  • "master": false,
  • "tenantPermissions": [
    ],
  • "expiresOn": 1704067200000,
  • "id": "a3f1a69c-3a7d-4b28-a944-61a7dc6877b8"
}

Get Access Token

Get the information for a specific access token.

path Parameters
id
required
string
Example: b4d44030-d0af-11e3-9c1a-0800200c9a66

The ID of specific access token being requested for more information

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
{
  • "application": "crafterengine",
  • "master": false,
  • "tenantPermissions": [
    ],
  • "expiresOn": 1704067200000,
  • "id": "b4d44030-d0af-11e3-9c1a-0800200c9a66"
}

Get All Access Tokens

Get all existing access tokens.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    }
]

Delete Access Token

Deletes an access token

path Parameters
id
required
string
Example: a3f1a69c-3a7d-4b28-a944-61a7dc6877b8

The ID to be deleted

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Request Body schema: application/json

The access token

application
string
master
boolean
Array of objects
expiresOn
integer
id
string

Responses

Request samples

Content type
application/json
{
  • "application": "sample-app",
  • "master": false,
  • "tenantPermissions": [
    ],
  • "expiresOn": 1704067200000
}

Response samples

Content type
application/json
{
  • "message": "Internal Server Error"
}

tenant

Tenant management

Create Tenant

Creates the given tenant

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Request Body schema: application/json

The tenant to be created

name
string
verifyNewProfiles
boolean
ssoEnabled
boolean
availableRoles
Array of strings
Array of objects (ProfileTenantAttribute)
id
string

Responses

Request samples

Content type
application/json
{
  • "name": "sample-tenant",
  • "verifyNewProfiles": false,
  • "availableRoles": [
    ],
  • "attributeDefinitions": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "sample-tenant",
  • "verifyNewProfiles": false,
  • "availableRoles": [
    ],
  • "attributeDefinitions": [
    ],
  • "id": "5926ee77d4c6ad51e5e44f45"
}

Get Tenant

Returns a tenant.

path Parameters
name
required
string
Example: sample-tenant

The tenant's name

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
{
  • "name": "sample-tenant",
  • "verifyNewProfiles": false,
  • "availableRoles": [
    ],
  • "ssoEnabled": false,
  • "attributeDefinitions": [
    ],
  • "id": "5926ee77d4c6ad51e5e44f45"
}

Update Tenant

Updates the given tenant

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Request Body schema: application/json

The updates to tenant

name
string
verifyNewProfiles
boolean
ssoEnabled
boolean
availableRoles
Array of strings
Array of objects (ProfileTenantAttribute)
id
string

Responses

Request samples

Content type
application/json
{
  • "name": "sample-tenant",
  • "verifyNewProfiles": false,
  • "ssoEnable": true,
  • "availableRoles": [
    ],
  • "attributeDefinitions": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "sample-tenant",
  • "verifyNewProfiles": false,
  • "ssoEnabled": true,
  • "availableRoles": [
    ],
  • "attributeDefinitions": [
    ],
  • "id": "5926ee77d4c6ad51e5e44f45"
}

Delete Tenant

Deletes a tenant

path Parameters
name
required
string
Example: sample-tenant

The tenant's name

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
{
  • "message": "Internal Server Error"
}

Count Tenants

Returns the total number of tenants.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
1

Get All Tenants

Returns a list with all the tenants.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Verify New Profiles

Sets if new profiles for the specified tenant should be verified or not.

path Parameters
name
required
string
Example: sample-tenant

The tenant's name

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

verify
required
string
Example: verify=true

True to verify new profiles through email, false otherwise

Responses

Response samples

Content type
application/json
{
  • "name": "sample-tenant",
  • "verifyNewProfiles": true,
  • "availableRoles": [
    ],
  • "ssoEnabled": false,
  • "attributeDefinitions": [
    ],
  • "id": "5926ee77d4c6ad51e5e44f45"
}

Add Roles

Adds the given roles to the specified tenant.

path Parameters
name
required
string
Example: sample-tenant

The tenant's name

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

role
required
string
Example: role=APP_TEST,APP_REPORT

The roles to add

Responses

Response samples

Content type
application/json
{
  • "name": "sample-tenant",
  • "verifyNewProfiles": true,
  • "availableRoles": [
    ],
  • "ssoEnabled": false,
  • "attributeDefinitions": [
    ],
  • "id": "5926ee77d4c6ad51e5e44f45"
}

Remove Roles

Removes the given roles to the specified tenant.

path Parameters
name
required
string
Example: sample-tenant

The tenant's name

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

role
required
string
Example: role=APP_TEST,APP_REPORT

The roles to add

Responses

Response samples

Content type
application/json
{
  • "name": "sample-tenant",
  • "verifyNewProfiles": true,
  • "availableRoles": [
    ],
  • "ssoEnabled": false,
  • "attributeDefinitions": [
    ],
  • "id": "5926ee77d4c6ad51e5e44f45"
}

Add Attributes

Adds the given attribute definitions to the specified tenant.

path Parameters
name
required
string
Example: sample-tenant

The tenant's name

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Request Body schema: application/json

The attribute(s) to be added

Array
name
string
object
Array of objects
defaultValue
object

Responses

Request samples

Content type
application/json
{
  • "name": "Nickname",
  • "metadata": [
    ],
  • "permissions": [
    ],
  • "defaultValue": null
}

Response samples

Content type
application/json
{
  • "name": "sample-tenant",
  • "verifyNewProfiles": true,
  • "availableRoles": [
    ],
  • "ssoEnabled": false,
  • "attributeDefinitions": [
    ],
  • "id": "5926ee77d4c6ad51e5e44f45"
}

Update Attributes

Updates the given attribute definitions of the specified tenant.

path Parameters
name
required
string
Example: sample-tenant

The tenant's name

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Request Body schema: application/json

The attribute(s) to be updated

Array
name
string
object
Array of objects
defaultValue
object

Responses

Request samples

Content type
application/json
{
  • "name": "Nickname",
  • "metadata": [
    ],
  • "permissions": [
    ],
  • "defaultValue": null
}

Response samples

Content type
application/json
{
  • "name": "sample-tenant",
  • "verifyNewProfiles": true,
  • "availableRoles": [
    ],
  • "ssoEnabled": false,
  • "attributeDefinitions": [
    ],
  • "id": "5926ee77d4c6ad51e5e44f45"
}

Remove Attributes

Removes the given attribute definitions from the specified tenant.

path Parameters
name
required
string
Example: sample-tenant

The tenant's name

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

attributeName
required
string
Example: attributeName=nickname

The name of the attributes whose definitions should be removed (the parameter can be repeated)

Responses

Response samples

Content type
application/json
{
  • "name": "sample-tenant",
  • "verifyNewProfiles": false,
  • "availableRoles": [
    ],
  • "attributeDefinitions": [
    ],
  • "id": "5926ee77d4c6ad51e5e44f45"
}

profile

Profile management

Create Profile

Creates a new profile for a specific tenant.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

tenantName
required
string
Example: tenantName=sample-tenant

The name of the tenant to add the profile to.

username
required
string
Example: username=john.doe

The profile’s username.

password
string
Example: password=passw0rd

The profile’s password.

email
required
string
Example: email=john.doe@example.com

The profile’s email.

enabled
required
string

If the profile should be enabled or not.

role
string

The profile’s roles.

attributes
string
Example: firstName=John&lastName=Doe

The additional attributes to add to the profile (specify a JSON string)

verificationUrl
string
Example: verificationUrl=verificationUrl

The URL (sans token) the user needs to go in case it needs to verify the created profile (verification depends on tenant)

Responses

Response samples

Content type
application/json
{
  • "username": "john.doe",
  • "email": "john.doe@example.com",
  • "verified": false,
  • "enabled": false,
  • "createdOn": 1495733716728,
  • "lastModified": 1495733716728,
  • "tenant": "sample-tenant",
  • "roles": [ ],
  • "attributes": { },
  • "id": "592715d4d4c650e226b03b62"
}

Update Profile

Updates the profile’s info.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

id
string
Example: id=592887d7d4c650213cc2f400

The profile's id.

username
required
string
Example: username=john.doe

The new username for the profile.

password
string
Example: password=passw0rd

The new password for the profile.

email
required
string
Example: email=john.doe@example.com

The new email for the profile.

enabled
required
string

If the profile should be enabled or not.

role
string

The new roles for the profile.

attributes
string
Example: firstName=John&lastName=Doe

The attributes to update (specify a JSON string)

attributesToReturn
string
Example: attributesToReturn=firstName,lastName

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
{
  • "username": "john.doe",
  • "email": "john.doe@example.com",
  • "verified": false,
  • "enabled": false,
  • "createdOn": 1495733716728,
  • "lastModified": 1495733716728,
  • "tenant": "sample-tenant",
  • "roles": [
    ],
  • "attributes": {
    },
  • "id": "592887d7d4c650213cc2f400"
}

Verify Profile

Sets the profile as verified if the verification token is valid.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

verificationTokenId
string
Example: verificationTokenId=055d58c4-fabb-44da-96eb-261e24e1d0c9

The verification token ID.

attributesToReturn
string
Example: attributesToReturn=firstName,lastName

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
{
  • "username": "john.doe",
  • "email": "john.doe@example.com",
  • "verified": false,
  • "enabled": false,
  • "createdOn": 1495733716728,
  • "lastModified": 1495733716728,
  • "tenant": "sample-tenant",
  • "roles": [ ],
  • "attributes": { },
  • "id": "592887d7d4c650213cc2f400"
}

Enable Profile

Enables a profile.

path Parameters
id
required
string
Example: 592715d4d4c650e226b03b62

The profile’s ID

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

attributesToReturn
string
Example: attributesToReturn=firstName,lastName

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
{
  • "username": "john.doe",
  • "email": "john.doe@example.com",
  • "verified": false,
  • "enabled": false,
  • "createdOn": 1495733716728,
  • "lastModified": 1495733716728,
  • "tenant": "sample-tenant",
  • "roles": [ ],
  • "attributes": { },
  • "id": "592887d7d4c650213cc2f400"
}

Disable Profile

Disables a profile.

path Parameters
id
required
string
Example: 592715d4d4c650e226b03b62

The profile’s ID

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

attributesToReturn
string
Example: attributesToReturn=firstName,lastName

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
{
  • "username": "john.doe",
  • "email": "john.doe@example.com",
  • "verified": false,
  • "enabled": false,
  • "createdOn": 1495733716728,
  • "lastModified": 1495733716728,
  • "tenant": "sample-tenant",
  • "roles": [ ],
  • "attributes": { },
  • "id": "592887d7d4c650213cc2f400"
}

Add Roles

Assign roles to a profile.

path Parameters
id
required
string
Example: 592715d4d4c650e226b03b62

The profile’s ID

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

roles
string
Example: roles=APP_TEST,APP_REPORT

The roles to assign

attributesToReturn
string
Example: attributesToReturn=firstName,lastName

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
{
  • "username": "john.doe",
  • "email": "john.doe@example.com",
  • "verified": false,
  • "enabled": false,
  • "createdOn": 1495733716728,
  • "lastModified": 1495733716728,
  • "tenant": "sample-tenant",
  • "roles": [
    ],
  • "attributes": { },
  • "id": "592715d4d4c650e226b03b62"
}

Remove Roles

Remove assigned roles from a profile.

path Parameters
id
required
string
Example: 592715d4d4c650e226b03b62

The profile’s ID

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

roles
string
Example: roles=APP_TEST,APP_REPORT

The roles to remove

attributesToReturn
string
Example: attributesToReturn=firstName,lastName

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
{
  • "username": "john.doe",
  • "email": "john.doe@example.com",
  • "verified": false,
  • "enabled": false,
  • "createdOn": 1495733716728,
  • "lastModified": 1495733716728,
  • "tenant": "sample-tenant",
  • "roles": [ ],
  • "attributes": { },
  • "id": "592715d4d4c650e226b03b62"
}

Get Attributes

Returns the attributes of a profile.

path Parameters
id
required
string
Example: 592715d4d4c650e226b03b62

The profile’s ID

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

attributesToReturn
string
Example: attributesToReturn=firstName,lastName

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
{
  • "firstName": "John",
  • "lastName": "Doe"
}

Update Attributes

Updates the attributes of a profile.

NOTE: The specified attributes will be merged with existing attributes.

path Parameters
id
required
string
Example: 592715d4d4c650e226b03b62

The profile’s ID

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

attributesToReturn
string

The name of the attributes to return (don't specify to return all)

Request Body schema: application/json

The attribute(s) to be updated

property name*
additional property
string

Responses

Request samples

Content type
application/json
{
  • "avatarLink": "/static-assets/images/avatar.png"
}

Response samples

Content type
application/json
{
  • "username": "john.doe",
  • "email": "john.doe@example.com",
  • "verified": false,
  • "enabled": false,
  • "createdOn": 1495733716728,
  • "lastModified": 1495733716728,
  • "tenant": "sample-tenant",
  • "roles": [
    ],
  • "attributes": {
    },
  • "id": "592887d7d4c650213cc2f400"
}

Remove Attributes

Removes a list of attributes of a profile

path Parameters
id
required
string
Example: 592715d4d4c650e226b03b62

The profile’s ID

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

attributesName
string
Example: attributesName=avatarLink

The name of the attributes to remove

attributesToReturn
string

The name of the attributes to return (don't specify to return all)

Request Body schema: application/json

The attribute(s) to be updated

property name*
additional property
string

Responses

Request samples

Content type
application/json
{
  • "avatarLink": "/static-assets/images/avatar.png"
}

Response samples

Content type
application/json
{
  • "username": "john.doe",
  • "email": "john.doe@example.com",
  • "verified": false,
  • "enabled": false,
  • "createdOn": 1495733716728,
  • "lastModified": 1495733716728,
  • "tenant": "sample-tenant",
  • "roles": [
    ],
  • "attributes": {
    },
  • "id": "592887d7d4c650213cc2f400"
}

Delete Profile

Deletes a profile

path Parameters
id
required
string
Example: 592715d4d4c650e226b03b62

The profile’s ID

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
{
  • "message": "Internal Server Error"
}

Get Profile By Query

Returns the single profile that matches the specified query

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

tenantName
required
string
Example: tenantName=sample-tenant

The tenant's name

query
string
Example: query=%7B%20%22username%22%3A%20%22john.doe%22%20%7D

The Mongo query used to search for the profiles

Warning: The query must not contain the $where operator, the tenant's name (already specified) or any non-readable attribute by the application

attributesToReturn
string

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
{
  • "username": "john.doe",
  • "email": "john.doe@example.com",
  • "verified": false,
  • "enabled": false,
  • "createdOn": 1495733716728,
  • "lastModified": 1495733716728,
  • "tenant": "sample-tenant",
  • "roles": [ ],
  • "attributes": { },
  • "id": "592887d7d4c650213cc2f400"
}

Get Profile

Returns the profile for a specified ID.

path Parameters
id
required
string
Example: 592715d4d4c650e226b03b62

The profile’s ID

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

attributesToReturn
string
Example: attributesToReturn=firstName,lastName

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
{
  • "username": "john.doe",
  • "email": "john.doe@example.com",
  • "verified": false,
  • "enabled": false,
  • "createdOn": 1495733716728,
  • "lastModified": 1495733716728,
  • "tenant": "sample-tenant",
  • "roles": [ ],
  • "attributes": { },
  • "id": "592887d7d4c650213cc2f400"
}

Get Profile By Username

Returns the user for the specified tenant and username.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

tenantName
required
string
Example: tenantName=sample-tenant

The tenant's name

username
required
string
Example: username=john.doe

The profile's username

attributesToReturn
string

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
{
  • "username": "john.doe",
  • "email": "john.doe@example.com",
  • "verified": false,
  • "enabled": false,
  • "createdOn": 1495733716728,
  • "lastModified": 1495733716728,
  • "tenant": "sample-tenant",
  • "roles": [ ],
  • "attributes": { },
  • "id": "592887d7d4c650213cc2f400"
}

Get Profile By Ticket

Returns the profile for the specified ticket.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

ticketId
required
string
Example: ticketId=592887d7d4c650213cc2f400

The ID ticket of the authenticated profile

attributesToReturn
string

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
{
  • "username": "john.doe",
  • "email": "john.doe@example.com",
  • "verified": false,
  • "enabled": false,
  • "createdOn": 1495733716728,
  • "lastModified": 1495733716728,
  • "tenant": "sample-tenant",
  • "roles": [ ],
  • "attributes": { },
  • "id": "592887d7d4c650213cc2f400"
}

Get Profile Count

Returns the number of profiles for the specified tenant.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

tenantName
required
string
Example: tenantName=sample-tenant

The tenant's name

Responses

Response samples

Content type
application/json
1

Get Profile Count By Query

Returns the number of profiles that match the query for the specified tenant.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

tenantName
required
string
Example: tenantName=sample-tenant

The tenant's name

query
string
Example: query=%7B%20%22username%22%3A%20%22john.doe%22%20%7D

The Mongo query used to search for the profiles.

Warning: The query must not contain the $where operator, the tenant's name (already specified) or any non-readable attribute by the application

Responses

Response samples

Content type
application/json
1

Get Profiles By Query

Returns the profiles that match the specified query.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

tenantName
required
string
Example: tenantName=sample-tenant

The tenant's name

query
string
Example: query=%7B%20%22username%22%3A%20%22john.doe%22%20%7D

The Mongo query used to search for the profiles.

Warning: The query must not contain the $where operator, the tenant's name (already specified) or any non-readable attribute by the application

sortBy
string

Profile attribute to sort the list by

sortOrder
string

The sort order (either ASC or DESC)

start
string

From the entire list of results, the position where the actual results should start (useful for pagination)

count
string

The number of profiles to return

attributesToReturn
string

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Profiles By Ids

Returns a list of profiles for the specified IDs.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

id
required
string
Example: id=59284659d4c650213cc2f3fc,59284659d4c650213cc2f3ff

The IDs of the profiles to look for

sortBy
string

Profile attribute to sort the list by

sortOrder
string

The sort order (either ASC or DESC)

attributesToReturn
string

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Profiles By Range

Returns a range of profiles for the specified tenant.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

tenantName
required
string
Example: tenantName=sample-tenant

The tenant's name

sortBy
string

Profile attribute to sort the list by

sortOrder
string

The sort order (either ASC or DESC)

start
string

From the entire list of results, the position where the actual results should start (useful for pagination)

count
string

The number of profiles to return

attributesToReturn
string

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Profiles By Role

Returns a list of profiles for a specific role and tenant.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

tenantName
required
string
Example: tenantName=sample-tenant

The tenant's name

sortBy
string

Profile attribute to sort the list by

sortOrder
string

The sort order (either ASC or DESC)

role
required
string
Example: role=APP_TEST

The role's name

attributesToReturn
string

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Profiles By Attribute Value

Returns the list of profiles that have the given attribute with the given value.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

tenantName
required
string
Example: tenantName=sample-tenant

The tenant's name

sortBy
string

Profile attribute to sort the list by

sortOrder
string

The sort order (either ASC or DESC)

attributeName
required
string
Example: attributeName=lastName

The name of the attribute the profiles must have

attributeValue
required
string
Example: attributeValue=Doe

The value of the attribute the profiles must have

attributesToReturn
string

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Reset Password

Sends an email to the profile’s user to indicate that the password needs to be reset.

path Parameters
id
required
string
Example: 59284659d4c650213cc2f3fc

The profile's ID

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

resetPasswordUrl
required
string
Example: resetPasswordUrl=http://example.com

The base URL to use to build the final URL the profile will use to reset their password

attributesToReturn
string

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
{
  • "username": "john.doe",
  • "email": "john.doe@example.com",
  • "verified": false,
  • "enabled": false,
  • "createdOn": 1495733716728,
  • "lastModified": 1495733716728,
  • "tenant": "sample-tenant",
  • "roles": [
    ],
  • "attributes": { },
  • "id": "59284659d4c650213cc2f3fc"
}

Change Password

Resets a profile’s password.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

resetTokenId
required
string
Example: resetTokenId=a2be0e86-7c71-4edf-aed9-6b00c0c60c33

The reset token ID

newPassword
required
string
Example: newPassword=test123

The new password

attributesToReturn
string

The name of the attributes to return (don't specify to return all)

Responses

Response samples

Content type
application/json
{
  • "username": "john.doe",
  • "email": "john.doe@example.com",
  • "verified": false,
  • "enabled": false,
  • "createdOn": 1495733716728,
  • "lastModified": 1495733716728,
  • "tenant": "sample-tenant",
  • "roles": [
    ],
  • "attributes": { },
  • "id": "59284659d4c650213cc2f3fc"
}

Create Verification Token

Creates a token that can be sent to the user in an email as a link.

Note:
After the user clicks the link, the token then can be passed to /verify or /change_password to verify user requesting the token.

path Parameters
id
required
string
Example: 592715d4d4c650e226b03b62

The profile ID of the user

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
{
  • "tenant": "sample-tenant",
  • "profileId": "592715d4d4c650e226b03b62",
  • "timestamp": 1495746285875,
  • "id": "055d58c4-fabb-44da-96eb-261e24e1d0c9"
}

Get Verification Token

Returns the verification token that corresponds to the given ID.

path Parameters
id
required
string
Example: de60f56d-3a4b-4dec-b798-fb22b2964c14

The token ID

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
{
  • "tenant": "sample-tenant",
  • "profileId": "592715d4d4c650e226b03b62",
  • "timestamp": 1495746285875,
  • "id": "de60f56d-3a4b-4dec-b798-fb22b2964c14"
}

Delete Verification Token

Deletes a verification token when it’s not needed anymore.

Note:
Not necessary to call if /verify or /change_password were called, since they already delete the token.

path Parameters
id
required
string
Example: de60f56d-3a4b-4dec-b798-fb22b2964c14

The token ID

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
{
  • "message": "Internal Server Error"
}

Upload Profile Attachment

Upload a attachment to the specified profile.

Note:
If the mime type of the attachment is not on the valid list will fail.

path Parameters
id
required
string
Example: 59284659d4c650213cc2f3fc

The profile's ID

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Request Body schema: multipart/form-data
attachment
string <binary>

File to be uploaded.

Responses

Response samples

Content type
application/json
{
  • "md5": "498a1e16be56873ef53a1a61295d1781",
  • "contentType": "image/jpeg",
  • "fileSize": "22.6 KB",
  • "fileName": "picture1",
  • "fileSizeBytes": 23193,
  • "id": "59285cd3d4c650213cc2f3fd"
}

Get Profile Attachment

Gets the requested attachment of the given profile.

path Parameters
id
required
string
Example: 59284659d4c650213cc2f3fc

The profile's ID

attachmentName
required
string
Example: picture1

Name of the attachment to get

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
{
  • "message": "Internal Server Error"
}

Get All Profile Attachments

Gets all attachments for the given profile.

path Parameters
id
required
string
Example: 59284659d4c650213cc2f3fc

The profile's ID

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
{
  • "attachments": [
    ]
}

Get Profile Attachment Details

Returns the details for a given attachment in a profile.

path Parameters
id
required
string
Example: 59284659d4c650213cc2f3fc

The profile's ID

attachmentName
required
string
Example: picture1

Name of the attachment to get

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
{
  • "md5": "498a1e16be56873ef53a1a61295d1781",
  • "contentType": "image/jpeg",
  • "fileSize": "22.6 KB",
  • "fileName": "picture1",
  • "fileSizeBytes": 23193,
  • "id": "59285cd3d4c650213cc2f3fd"
}

authentication

Authentication

Authenticate

Authenticates the user, and returns a ticket identifying the authentication.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

tenantName
required
string
Example: tenantName=default

The tenant's name

username
required
string
Example: username=admin

The username

password
required
string
Example: password=admin

The password

Responses

Response samples

Content type
application/json
{
  • "tenant": "default",
  • "profileId": "5925a68def86951f895cf497",
  • "lastRequestedTime": 1495733716728,
  • "id": "59284659d4c650213cc2f3fc"
}

Create Ticket

Creates a new ticket for the specified profile.

Note:
This method should only be used when actual authentication is done through other means (like when authenticating through Facebook or Twitter) different than profile.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

profileId
required
string
Example: profileId=5925a68def86951f895cf497

The ID of the profile

Responses

Response samples

Content type
application/json
{
  • "tenant": "default",
  • "profileId": "5925a68def86951f895cf497",
  • "lastRequestedTime": 1495733716728,
  • "id": "7f036af3-1ab9-4791-b615-ecaece3f0010"
}

Get Ticket

Returns the ticket info for the given ticket ID.

path Parameters
ticketId
required
string
Example: b4d44030-d0af-11e3-9c1a-0800200c9a66

The ID of the ticket

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
{
  • "tenant": "default",
  • "profileId": "5925a68def86951f895cf497",
  • "lastRequestedTime": 1495733716728,
  • "id": "2e911e0b-ac47-423e-9174-4e8896f1b387"
}

Invalidate Ticket

Invalidates the given ticket.

path Parameters
ticketId
required
string
Example: b4d44030-d0af-11e3-9c1a-0800200c9a66

The ID of the ticket

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
{
  • "tenant": "default",
  • "profileId": "5925a68def86951f895cf497",
  • "lastRequestedTime": 1495733716728,
  • "id": "2e911e0b-ac47-423e-9174-4e8896f1b387"
}

Create Persistent Login

Creates a persistent login, used for remember me functionality.

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

profileId
required
string
Example: profileId=5925a68def86951f895cf497

The ID of the profile

Responses

Response samples

Content type
application/json
{
  • "tenant": "default",
  • "profileId": "5925a68def86951f895cf497",
  • "timestamp": 1495733716728,
  • "id": "2e911e0b-ac47-423e-9174-4e8896f1b387",
  • "token": "adf88dca-4960-474c-be63-c8c5e3bedaa7"
}

Get Persistent Login

Returns the persistent login info for the given ID.

path Parameters
id
required
string
Example: b68c0013-d7b2-4004-8463-d7ba03e15d94

The ID of the persistent login

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
{
  • "tenant": "default",
  • "profileId": "5925a68def86951f895cf497",
  • "timestamp": 1495733716728,
  • "id": "b68c0013-d7b2-4004-8463-d7ba03e15d94",
  • "token": "adf88dca-4960-474c-be63-c8c5e3bedaa7"
}

Refresh Persistent Login

Refreshes the token of the specified persistent login.

path Parameters
id
required
string
Example: b68c0013-d7b2-4004-8463-d7ba03e15d94

The ID of the persistent login

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
{
  • "tenant": "default",
  • "profileId": "5925a68def86951f895cf497",
  • "timestamp": 1495733716728,
  • "id": "b68c0013-d7b2-4004-8463-d7ba03e15d94",
  • "token": "f390e222-c844-44a2-ad38-afa471527101"
}

Delete Persistent Login

Deletes a persistent login.

path Parameters
id
required
string
Example: b68c0013-d7b2-4004-8463-d7ba03e15d94

The ID of the persistent login

query Parameters
accessTokenId
required
string
Example: accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d

The access token ID of the application making the call

Responses

Response samples

Content type
application/json
{
  • "message": "Internal Server Error"
}

monitoring

Monitoring operations

Get Memory Stats

Returns the Crafter Profile JVM memory details.

query Parameters
token
required
string
Example: token=defaultManagementToken

The authorization token.

Responses

Response samples

Content type
application/json
{
  • "totalJvmMemory": 2017984512,
  • "freeJvmMemory": 1113921056,
  • "maxJvmMemory": 3817865216,
  • "totalOsMemory": 17179869184,
  • "freeOsMemory": 2669301760,
  • "totalSwapMemory": 2147483648,
  • "freeSwapMemory": 1026555904
}

Get Status

Returns the Crafter Profile JVM status details.

query Parameters
token
required
string
Example: token=defaultManagementToken

The authorization token.

Responses

Response samples

Content type
application/json
{
  • "uptime": 4801,
  • "startup": "2019-03-07T21:29:11.049Z"
}

Get Version

Returns the Crafter Profile JVM version details.

query Parameters
token
required
string
Example: token=defaultManagementToken

The authorization token.

Responses

Response samples

Content type
application/json
{
  • "packageName": "Crafter Profile",
  • "packageVersion": "3.1.0-SNAPSHOT",
  • "packageBuild": "a68f1ff7ad84d5ecbeaa008f392e4cef0ca02f41",
  • "packageBuildDate": "2019-03-07T21:03:05.422Z",
  • "osName": "Mac OS X",
  • "osVersion": "10.13.6",
  • "osArch": "x86_64",
  • "javaVersion": "1.8",
  • "javaVendor": "Oracle Corporation",
  • "javaVm": "Java HotSpot(TM) 64-Bit Server VM"
}