diff --git a/source/_static/api/profile.html b/source/_static/api/profile.html new file mode 100644 index 000000000..dc50b01c1 --- /dev/null +++ b/source/_static/api/profile.html @@ -0,0 +1,2606 @@ + + + + + + Crafter Profile + + + + + + + + + +

Crafter Profile (4.0.8)

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"
}
+ + + + \ No newline at end of file diff --git a/source/developers/projects/profile/api/access_token/all.rst b/source/developers/projects/profile/api/access_token/all.rst deleted file mode 100644 index c3590e1e0..000000000 --- a/source/developers/projects/profile/api/access_token/all.rst +++ /dev/null @@ -1,120 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-access_token-all: - -====================== -Get All Access Tokens -====================== - -Get all existing access tokens. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/access_token/all`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+=========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -``GET .../api/1/access_token/all?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d`` - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - [ - { - "application": "adminconsole", - "master": true, - "tenantPermissions": [ - { - "allowedActions": [ - "*" - ], - "tenant": "*" - } - ], - "expiresOn": 1704067200000, - "id": "e8f5170c-877b-416f-b70f-4b09772f8e2d" - }, - { - "application": "crafterengine", - "master": false, - "tenantPermissions": [ - { - "allowedActions": [ - "MANAGE_TICKETS", - "READ_TENANT", - "MANAGE_PROFILES" - ], - "tenant": "*" - } - ], - "expiresOn": 1704067200000, - "id": "b4d44030-d0af-11e3-9c1a-0800200c9a66" - }, - { - "application": "craftersocial", - "master": false, - "tenantPermissions": [ - { - "allowedActions": [ - "MANAGE_TICKETS", - "READ_TENANT", - "MANAGE_PROFILES" - ], - "tenant": "*" - } - ], - "expiresOn": 1704067200000, - "id": "2ba3ac10-c43e-11e3-9c1a-0800200c9a66" - } - ] - ---------- -Responses ---------- - -+---------+---------------------------+----------------------------------------------------------+ -|| Status || Location || Response Body | -+=========+===========================+==========================================================+ -|| 200 || || See example above. | -+---------+---------------------------+----------------------------------------------------------+ -|| 403 || | .. code-block:: json | -|| || | | -|| || | { "errorCode": "ACTION_DENIED", "message": "Current | -|| || | subject doesnt have permission to execute global | -|| || | action \"READ_TOKEN\"" } | -+---------+---------------------------+----------------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+---------------------------+----------------------------------------------------------+ diff --git a/source/developers/projects/profile/api/access_token/create.rst b/source/developers/projects/profile/api/access_token/create.rst deleted file mode 100644 index 0303de8b3..000000000 --- a/source/developers/projects/profile/api/access_token/create.rst +++ /dev/null @@ -1,107 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-access_token-create: - -=================== -Create Access Token -=================== - -Creates a new access token. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/access_token/create`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+=========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -``POST .../api/1/access_token/create?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d`` - -.. code-block:: json - :linenos: - - { - "application": "sample-app", - "master": false, - "tenantPermissions": [ - { - "allowedActions": [ - "MANAGE_TICKETS", - "READ_TENANT", - "MANAGE_PROFILES" - ], - "tenant": "sample-tenant" - } - ], - "expiresOn": 1704067200000 - } - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "application": "sample-app", - "master": false, - "tenantPermissions": [ - { - "allowedActions": [ - "MANAGE_TICKETS", - "READ_TENANT", - "MANAGE_PROFILES" - ], - "tenant": "sample-tenant" - } - ], - "expiresOn": 1704067200000, - "id": "a3f1a69c-3a7d-4b28-a944-61a7dc6877b8" - } - ---------- -Responses ---------- - -+---------+----------------------------+---------------------------------------------------------+ -|| Status || Location || Response Body | -+=========+============================+=========================================================+ -|| 200 | | See example above. | -+---------+----------------------------+---------------------------------------------------------+ -|| 403 | | .. code-block:: json | -|| | | | -|| | | {"errorCode":"ACTION_DENIED", "message":"Current | -|| | | subject does not have permission to execute global | -|| | | action \"CREATE_TOKEN\""} | -+---------+----------------------------+---------------------------------------------------------+ -|| 500 | | ``{ "message" : "Internal server error" }`` | -+---------+----------------------------+---------------------------------------------------------+ diff --git a/source/developers/projects/profile/api/access_token/delete.rst b/source/developers/projects/profile/api/access_token/delete.rst deleted file mode 100644 index 597d1d61b..000000000 --- a/source/developers/projects/profile/api/access_token/delete.rst +++ /dev/null @@ -1,70 +0,0 @@ -:is-up-to-date: True - -.. .. include:: /includes/unicode-checkmark.rst - -.. _crafter-profile-api-access_token-delete: - -=================== -Delete Access Token -=================== - -Deletes an access token. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/access_token/:id/delete`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+=========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/access_token/a3f1a69c-3a7d-4b28-a944-61a7dc6877b8/delete - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - ---------- -Responses ---------- - -+---------+---------------------------------+----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+=================================+====================================================+ -|| 200 || || See example above. | -+---------+---------------------------------+----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+---------------------------------+----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/access_token/get.rst b/source/developers/projects/profile/api/access_token/get.rst deleted file mode 100644 index 08077d70b..000000000 --- a/source/developers/projects/profile/api/access_token/get.rst +++ /dev/null @@ -1,90 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-access_token-get: - -================ -Get Access Token -================ - -Get the information for a specific access token. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/access_token/:id`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+=========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/access_token/b4d44030-d0af-11e3-9c1a-0800200c9a66?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "application": "crafterengine", - "master": false, - "tenantPermissions": [ - { - "allowedActions": [ - "MANAGE_TICKETS", - "READ_TENANT", - "MANAGE_PROFILES" - ], - "tenant": "*" - } - ], - "expiresOn": 1704067200000, - "id": "b4d44030-d0af-11e3-9c1a-0800200c9a66" - } - ---------- -Responses ---------- - -+---------+--------------------------+-----------------------------------------------------------+ -|| Status || Location || Response Body | -+=========+==========================+===========================================================+ -|| 200 | | See example above. | -+---------+--------------------------+-----------------------------------------------------------+ -|| 403 | | .. code-block:: json | -|| | | | -|| | | {"errorCode":"ACTION_DENIED", "message":"Current | -|| | | subject does not have permission to execute action | -|| | | \"READ_TOKEN\" on e8f5170c-877b-416f-b70f-4b09772f8e2d"}| -+---------+--------------------------+-----------------------------------------------------------+ -|| 500 | | ``{ "message" : "Internal server error" }`` | -+---------+--------------------------+-----------------------------------------------------------+ diff --git a/source/developers/projects/profile/api/authentication/authenticate.rst b/source/developers/projects/profile/api/authentication/authenticate.rst deleted file mode 100644 index 6833d1d0c..000000000 --- a/source/developers/projects/profile/api/authentication/authenticate.rst +++ /dev/null @@ -1,91 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-authentication-authenticate: - -============ -Authenticate -============ - -Authenticates the user, and returns a ticket identifying the authentication. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/authentication/authenticate`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+=========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------------+-------------+---------------+-----------------------------------------+ -|| tentantName || String || |checkmark| || The tenant's name | -+-------------------------+-------------+---------------+-----------------------------------------+ -|| username || String || |checkmark| || The username | -+-------------------------+-------------+---------------+-----------------------------------------+ -|| password || String || |checkmark| || The password | -+-------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/authentication/authenticate - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - tenantName=default - username=admin - password=admin - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - - { - "tenant": "default", - "profileId": "5925a68def86951f895cf497", - "lastRequestTime": 1495659198937, - "id": "6b701758-cc0b-4858-8de0-3139a1d7bdc8" - } - ---------- -Responses ---------- - -+---------+------------------------------------+-------------------------------------------------+ -|| Status || Location || Response Body | -+=========+====================================+=================================================+ -|| 200 | | See example above. | -+---------+------------------------------------+-------------------------------------------------+ -|| 401 | | .. code-block:: json | -|| | | | -|| | | { "errorCode": "BAD_CREDENTIALS", "message": | -|| | | "Invalid username and/or password" } | -+---------+------------------------------------+-------------------------------------------------+ -|| 500 | | ``{ "message" : "Internal server error" }`` | -+---------+------------------------------------+-------------------------------------------------+ diff --git a/source/developers/projects/profile/api/authentication/persistent_login/create.rst b/source/developers/projects/profile/api/authentication/persistent_login/create.rst deleted file mode 100644 index 6dffde395..000000000 --- a/source/developers/projects/profile/api/authentication/persistent_login/create.rst +++ /dev/null @@ -1,81 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-authentication-persistent_login-create: - -======================= -Create Persistent Login -======================= - -Creates a persistent login, used for remember me functionality. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+------------------------------------------------------------------------------------------------+ -|| HTTP Verb | POST | -+------------------------------------------------------------------------------------------------+ -|| URL | ``/api/1/authentication//persistent_login/create`` | -+------------------------------------------------------------------------------------------------+ -|| Response Formats | ``JSON`` | -+------------------------------------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+=========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------------+-------------+---------------+-----------------------------------------+ -|| profileId || String || |checkmark| || The ID of the profile | -+-------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/authentication/persistent_login/create - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - profileId=5925a68def86951f895cf497 - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - - { - "tenant": "default", - "profileId": "5925a68def86951f895cf497", - "token": "adf88dca-4960-474c-be63-c8c5e3bedaa7", - "timestamp": 1495665332589, - "id": "b68c0013-d7b2-4004-8463-d7ba03e15d94" - } - ---------- -Responses ---------- - -+---------+---------------------------------+----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+=================================+====================================================+ -|| 200 || || See example above. | -+---------+---------------------------------+----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+---------------------------------+----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/authentication/persistent_login/delete.rst b/source/developers/projects/profile/api/authentication/persistent_login/delete.rst deleted file mode 100644 index 7cae7ec0f..000000000 --- a/source/developers/projects/profile/api/authentication/persistent_login/delete.rst +++ /dev/null @@ -1,70 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-authentication-persistent_login-delete: - -======================= -Delete Persistent Login -======================= - -Deletes a persistent login. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/access_token/:id/delete`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+=========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------------+-------------+---------------+-----------------------------------------+ -|| id || String || |checkmark| || The ID of the persistent login | -+-------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/authentication/persistent_login/b68c0013-d7b2-4004-8463-d7ba03e15d94/delete - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - ---------- -Responses ---------- - -+---------+---------------------------------+----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+=================================+====================================================+ -|| 200 || || See example above. | -+---------+---------------------------------+----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+---------------------------------+----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/authentication/persistent_login/get.rst b/source/developers/projects/profile/api/authentication/persistent_login/get.rst deleted file mode 100644 index 10056cfe6..000000000 --- a/source/developers/projects/profile/api/authentication/persistent_login/get.rst +++ /dev/null @@ -1,76 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-authentication-persistent_login-get: - -==================== -Get Persistent Login -==================== - -Returns the persistent login info for the given ID. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+-----------------------+------------------------------------------------------------------------+ -|| HTTP Verb || GET | -+-----------------------+------------------------------------------------------------------------+ -|| URL || ``/api/1/authentication/persistent_login/:id`` | -+-----------------------+------------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+-----------------------+------------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+=========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------------+-------------+---------------+-----------------------------------------+ -|| id || String || |checkmark| || The ID of the persistent login | -+-------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/authentication/persistent_login/b68c0013-d7b2-4004-8463-d7ba03e15d94?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - - { - "tenant": "default", - "profileId": "5925a68def86951f895cf497", - "token": "adf88dca-4960-474c-be63-c8c5e3bedaa7", - "timestamp": 1495665332589, - "id": "b68c0013-d7b2-4004-8463-d7ba03e15d94" - } - ---------- -Responses ---------- - -+---------+---------------------------------+----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+=================================+====================================================+ -|| 200 || || See example above. | -+---------+---------------------------------+----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+---------------------------------+----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/authentication/persistent_login/refresh_token.rst b/source/developers/projects/profile/api/authentication/persistent_login/refresh_token.rst deleted file mode 100644 index 0bbff6991..000000000 --- a/source/developers/projects/profile/api/authentication/persistent_login/refresh_token.rst +++ /dev/null @@ -1,80 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-authentication-persistent_login-refresh_token: - -======================== -Refresh Persistent Login -======================== - -Refreshes the token of the specified persistent login. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+-----------------+-----------------------------------------------------------------------------+ -| HTTP Verb | POST | -+-----------------+-----------------------------------------------------------------------------+ -| URL | ``/api/1/authentication/persistent_login/:id/refresh_token`` | -+-----------------+-----------------------------------------------------------------------------+ -| Response Formats| ``JSON`` | -+-----------------+-----------------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+=========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------------+-------------+---------------+-----------------------------------------+ -|| id || String || |checkmark| || The ID of the persistent login | -+-------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/authentication/persistent_login/b68c0013-d7b2-4004-8463-d7ba03e15d94/refresh_token - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - - { - "tenant": "default", - "profileId": "5925a68def86951f895cf497", - "token": "f390e222-c844-44a2-ad38-afa471527101", - "timestamp": 1495665332589, - "id": "b68c0013-d7b2-4004-8463-d7ba03e15d94" - } - ---------- -Responses ---------- - -+---------+---------------------------------+----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+=================================+====================================================+ -|| 200 || || See example above. | -+---------+---------------------------------+----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+---------------------------------+----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/authentication/ticket/create.rst b/source/developers/projects/profile/api/authentication/ticket/create.rst deleted file mode 100644 index 70698c840..000000000 --- a/source/developers/projects/profile/api/authentication/ticket/create.rst +++ /dev/null @@ -1,89 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-authentication-ticket-create: - -============= -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. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/authentication/ticket/create`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+=========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------------+-------------+---------------+-----------------------------------------+ -|| profileId || String || |checkmark| || The ID of the profile | -+-------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/authentication/ticket/2e911e0b-ac47-423e-9174-4e8896f1b387 - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - - { - "tenant": "default", - "profileId": "5925a68def86951f895cf497", - "lastRequestTime": 1495660441508, - "id": "7f036af3-1ab9-4791-b615-ecaece3f0010" - } - ---------- -Responses ---------- - -+--------+------------------------------------+--------------------------------------------------+ -|| Status|| Location || Response Body | -+========+====================================+==================================================+ -| 200 | | See example above. | -+--------+------------------------------------+--------------------------------------------------+ -| 403 | | .. code-block:: json | -| | | | -| | | { "errorCode": "NO_SUCH_ACCESS_TOKEN_ID", | -| | | "message": "No access token found for ID | -| | | \"e8f5170c-877b-416f-b70f-4b09772f8e2d\"" } | -+--------+------------------------------------+--------------------------------------------------+ -| 500 | | ``{ "message" : "Internal server error" }`` | -+--------+------------------------------------+--------------------------------------------------+ diff --git a/source/developers/projects/profile/api/authentication/ticket/get.rst b/source/developers/projects/profile/api/authentication/ticket/get.rst deleted file mode 100644 index 4d2ea8024..000000000 --- a/source/developers/projects/profile/api/authentication/ticket/get.rst +++ /dev/null @@ -1,75 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-authentication-ticket-get: - -========== -Get Ticket -========== - -Returns the ticket info for the given ticket ID. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/authentication/token/:id`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+=========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------------+-------------+---------------+-----------------------------------------+ -|| ticketId || String || |checkmark| || The ID of the ticket | -+-------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/authentication/ticket/b4d44030-d0af-11e3-9c1a-0800200c9a66?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - - { - "tenant": "default", - "profileId": "5925a68def86951f895cf497", - "lastRequestTime": 1495664265318, - "id": "2e911e0b-ac47-423e-9174-4e8896f1b387" - } - ---------- -Responses ---------- - -+---------+------------------------------------+-------------------------------------------------+ -|| Status || Location || Response Body | -+=========+====================================+=================================================+ -|| 200 || || See example above. | -+---------+------------------------------------+-------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+------------------------------------+-------------------------------------------------+ diff --git a/source/developers/projects/profile/api/authentication/ticket/invalidate.rst b/source/developers/projects/profile/api/authentication/ticket/invalidate.rst deleted file mode 100644 index e6c622183..000000000 --- a/source/developers/projects/profile/api/authentication/ticket/invalidate.rst +++ /dev/null @@ -1,70 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-authentication-ticket-invalidate: - -================= -Invalidate Ticket -================= - -Invalidates the given ticket. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+------------------------+-----------------------------------------------------------------------+ -|| HTTP Verb || POST | -+------------------------+-----------------------------------------------------------------------+ -|| URL || ``/api/1/authentication/token/:id/invalidate`` | -+------------------------+-----------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+------------------------+-----------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+=========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------------+-------------+---------------+-----------------------------------------+ -|| ticketId || String || |checkmark| || The ID of the ticket | -+-------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/authentication/ticket/fdc5fc1f-83ba-4cbd-9cdb-d345db8b89c6/invalidate - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - ---------- -Responses ---------- - -+---------+------------------------------------+-------------------------------------------------+ -|| Status || Location || Response Body | -+=========+====================================+=================================================+ -|| 200 || || See example above. | -+---------+------------------------------------+-------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+------------------------------------+-------------------------------------------------+ diff --git a/source/developers/projects/profile/api/index.rst b/source/developers/projects/profile/api/index.rst deleted file mode 100644 index d753ba6be..000000000 --- a/source/developers/projects/profile/api/index.rst +++ /dev/null @@ -1,118 +0,0 @@ -:is-up-to-date: True - -.. index:: API; Crafter Profile - -.. _crafter-profile-api: - -=================== -Crafter Profile API -=================== - -The context for this API is ``/crafter-profile/``, please prefix the API URLs with this context. - -.. NOTE:: - All endpoints in this API require an ``accessTokenId`` parameter that needs - to be known by the client prior to any request. This value needs to be - obtained from the system administrator or maintainer. See :ref:`profile-admin-access-tokens` - ------------------------ -Access Token Management ------------------------ - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - access_token/create - access_token/get - access_token/all - access_token/delete - ------------------ -Tenant Management ------------------ - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - tenant/create - tenant/get - tenant/update - tenant/delete - tenant/count - tenant/all - tenant/verify_new_profiles - tenant/roles/add - tenant/roles/remove - tenant/attributes/add - tenant/attributes/update - tenant/attributes/remove - ------------------- -Profile Management ------------------- - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - profile/create - profile/update - profile/verify - profile/enable - profile/disable - profile/roles/add - profile/roles/remove - profile/attributes/get - profile/attributes/update - profile/attributes/remove - profile/delete - profile/one_by_query - profile/get - profile/by_username - profile/by_ticket - profile/count - profile/count_by_query - profile/by_query - profile/by_ids - profile/range - profile/by_role - profile/by_existing_attribute - profile/reset_password - profile/change_password - profile/verification_token/create - profile/verification_token/get - profile/verification_token/delete - profile/attachment/upload - profile/attachment/get - profile/attachment/all - profile/attachment/details - --------------- -Authentication --------------- - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - authentication/authenticate - authentication/ticket/create - authentication/ticket/get - authentication/ticket/invalidate - authentication/persistent_login/create - authentication/persistent_login/get - authentication/persistent_login/refresh_token - authentication/persistent_login/delete - ----------- -Monitoring ----------- - -.. toctree:: - :maxdepth: 1 - - monitoring/memory - monitoring/status - monitoring/version diff --git a/source/developers/projects/profile/api/monitoring/memory.rst b/source/developers/projects/profile/api/monitoring/memory.rst deleted file mode 100644 index edbc31d93..000000000 --- a/source/developers/projects/profile/api/monitoring/memory.rst +++ /dev/null @@ -1,80 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-monitoring-memory: - -================ -Get Memory Stats -================ - -Returns the Crafter Profile JVM memory details. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/monitoring/memory`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------------+-------------+---------------+--------------------------------------+ -|| Name || Type || Required || Description | -+=========================+=============+===============+======================================+ -|| token || String || |checkmark| || The authorization token | -+-------------------------+-------------+---------------+--------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -``GET .../api/1/monitoring/memory.json?token=defaultManagementToken`` - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "totalJvmMemory": 2017984512, - "freeJvmMemory": 1113921056, - "maxJvmMemory": 3817865216, - "totalOsMemory": 17179869184, - "freeOsMemory": 2669301760, - "totalSwapMemory": 2147483648, - "freeSwapMemory": 1026555904, - } - ---------- -Responses ---------- - -+---------+------------------+--------------------------------------------------------------------+ -|| Status || Location || Response Body | -+=========+==================+====================================================================+ -|| 200 || || See example above. | -+---------+------------------+--------------------------------------------------------------------+ -|| 400 || || {"errorCode":"OTHER", | -|| || || "message":"Required String parameter 'token' is not present"} | -+---------+------------------+--------------------------------------------------------------------+ -|| 401 || || {"errorCode":"ACCESS_DENIED", | -|| || || "message":"Management authorization failed, invalid token."} | -+---------+------------------+--------------------------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+------------------+--------------------------------------------------------------------+ diff --git a/source/developers/projects/profile/api/monitoring/status.rst b/source/developers/projects/profile/api/monitoring/status.rst deleted file mode 100644 index 41a2e9a7a..000000000 --- a/source/developers/projects/profile/api/monitoring/status.rst +++ /dev/null @@ -1,74 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-monitoring-status: - -========== -Get Status -========== - -Returns the Crafter Profile JVM status details. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/monitoring/status`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------------+-------------+---------------+--------------------------------------+ -|| Name || Type || Required || Description | -+=========================+=============+===============+======================================+ -|| token || String || |checkmark| || The authorization token | -+-------------------------+-------------+---------------+--------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -``GET .../api/1/monitoring/status.json?token=defaultManagementToken`` - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - - { - "uptime": 4801, - "startup": "2019-03-07T21:29:11.049Z", - } - ---------- -Responses ---------- - -+---------+------------------+--------------------------------------------------------------------+ -|| Status || Location || Response Body | -+=========+==================+====================================================================+ -|| 200 || || See example above. | -+---------+------------------+--------------------------------------------------------------------+ -|| 400 || || {"errorCode":"OTHER", | -|| || || "message":"Required String parameter 'token' is not present"} | -+---------+------------------+--------------------------------------------------------------------+ -|| 401 || || {"errorCode":"ACCESS_DENIED", | -|| || || "message":"Management authorization failed, invalid token."} | -+---------+------------------+--------------------------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+------------------+--------------------------------------------------------------------+ diff --git a/source/developers/projects/profile/api/monitoring/version.rst b/source/developers/projects/profile/api/monitoring/version.rst deleted file mode 100644 index 42b10e71e..000000000 --- a/source/developers/projects/profile/api/monitoring/version.rst +++ /dev/null @@ -1,83 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-monitoring-version: - -=========== -Get Version -=========== - -Returns the Crafter Profile JVM version details. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/monitoring/version`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------------+-------------+---------------+--------------------------------------+ -|| Name || Type || Required || Description | -+=========================+=============+===============+======================================+ -|| token || String || |checkmark| || The authorization token | -+-------------------------+-------------+---------------+--------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -``GET .../api/1/monitoring/version.json?token=defaultManagementToken`` - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "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", - } - ---------- -Responses ---------- - -+---------+------------------+--------------------------------------------------------------------+ -|| Status || Location || Response Body | -+=========+==================+====================================================================+ -|| 200 || || See example above. | -+---------+------------------+--------------------------------------------------------------------+ -|| 400 || || {"errorCode":"OTHER", | -|| || || "message":"Required String parameter 'token' is not present"} | -+---------+------------------+--------------------------------------------------------------------+ -|| 401 || || {"errorCode":"ACCESS_DENIED", | -|| || || "message":"Management authorization failed, invalid token."} | -+---------+------------------+--------------------------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+------------------+--------------------------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/attachment/all.rst b/source/developers/projects/profile/api/profile/attachment/all.rst deleted file mode 100644 index 693503803..000000000 --- a/source/developers/projects/profile/api/profile/attachment/all.rst +++ /dev/null @@ -1,81 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-attachment-all: - -=========================== -Get All Profile Attachments -=========================== - -Gets all attachments for the given profile. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/:id/attachments/`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+===================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------+-------------+---------------+----------------------------------------------+ -|| id || String || |checkmark| || The profile's ID | -+-------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/profile/59284659d4c650213cc2f3fc/attachments?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - [ - { - "md5": "498a1e16be56873ef53a1a61295d1781", - "contentType": "image/jpeg", - "fileSize": "22.6 KB", - "fileName": "picture1", - "fileSizeBytes": 23193, - "id": "59285cd3d4c650213cc2f3fd" - } - ] - ---------- -Responses ---------- - -+---------+-----------------------------------+--------------------------------------------------+ -|| Status || Location || Response Body | -+=========+===================================+==================================================+ -|| 200 || || See example above. | -+---------+-----------------------------------+--------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+-----------------------------------+--------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/attachment/details.rst b/source/developers/projects/profile/api/profile/attachment/details.rst deleted file mode 100644 index 49febe38d..000000000 --- a/source/developers/projects/profile/api/profile/attachment/details.rst +++ /dev/null @@ -1,81 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-attachment-details: - -============================== -Get Profile Attachment Details -============================== - -Returns the details for a given attachment in a profile. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+------------------+-----------------------------------------------------------------------------+ -|| HTTP Verb || GET | -+------------------+-----------------------------------------------------------------------------+ -|| URL || ``/api/1/profile/:id/attachment/:attachmentName/details`` | -+------------------+-----------------------------------------------------------------------------+ -|| Response Formats|| ``JSON`` | -+------------------+-----------------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+===================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------+-------------+---------------+----------------------------------------------+ -|| id || String || |checkmark| || The profile's ID | -+-------------------+-------------+---------------+----------------------------------------------+ -|| attachmentName || String || |checkmark| || Name of the attachment get | -+-------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/profile/59284659d4c650213cc2f3fc/attachment/picture1/details?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "md5": "498a1e16be56873ef53a1a61295d1781", - "contentType": "image/jpeg", - "fileSize": "22.6 KB", - "fileName": "picture1", - "fileSizeBytes": 23193, - "id": "59285cd3d4c650213cc2f3fd" - } - ---------- -Responses ---------- - -+---------+--------------------------------------------------------+----------------------------------------------+ -|| Status || Location || Response Body | -+=========+========================================================+==============================================+ -|| 200 || ``.../profile/:id/attachment/:attachmentName/details``|| See example above. | -+---------+--------------------------------------------------------+----------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------------------------------+----------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/attachment/get.rst b/source/developers/projects/profile/api/profile/attachment/get.rst deleted file mode 100644 index 5cc6e7138..000000000 --- a/source/developers/projects/profile/api/profile/attachment/get.rst +++ /dev/null @@ -1,75 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-attachment-get: - -====================== -Get Profile Attachment -====================== - -Gets the requested attachment of the given profile. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+--------------------------+---------------------------------------------------------------------+ -|| HTTP Verb || GET | -+--------------------------+---------------------------------------------------------------------+ -|| URL || ``/api/1/profile/:id/attachment/:attachmentName`` | -+--------------------------+---------------------------------------------------------------------+ -|| Response Formats || Will change based on the mime type of the attachment requested. | -+--------------------------+---------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+===================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------+-------------+---------------+----------------------------------------------+ -|| id || String || |checkmark| || The profile's ID | -+-------------------+-------------+---------------+----------------------------------------------+ -|| attachmentName || String || |checkmark| || Name of the attachment get | -+-------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/profile/59284659d4c650213cc2f3fc/attachment/picture1?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` -``Content-Type image/jpeg;charset=UTF-8`` -``Content-Length 23193`` - -.. code-block:: none - - Binary file content - ---------- -Responses ---------- - -+---------+------------------------------------------------+---------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================================+=============================================+ -|| 200 || || See example above. | -+---------+------------------------------------------------+---------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }``| -+---------+------------------------------------------------+---------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/attachment/upload.rst b/source/developers/projects/profile/api/profile/attachment/upload.rst deleted file mode 100644 index f10860b97..000000000 --- a/source/developers/projects/profile/api/profile/attachment/upload.rst +++ /dev/null @@ -1,86 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-attachment-upload: - -========================= -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. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/:id/uploadAttachment`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+===================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------+-------------+---------------+----------------------------------------------+ -|| id || File || |checkmark| || The profile's ID | -+-------------------+-------------+---------------+----------------------------------------------+ -|| attachment || String || |checkmark| || File to be uploaded | -+-------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/profile/59284659d4c650213cc2f3fc/uploadAttachment?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -.. NOTE:: - This request needs to be sent with ``Content-Type=multipart/form-data`` and the binary file as parameter ``attachment``. - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "md5": "498a1e16be56873ef53a1a61295d1781", - "contentType": "image/jpeg", - "fileSize": "22.6 KB", - "fileName": "picture1", - "fileSizeBytes": 23193, - "id": "59285cd3d4c650213cc2f3fd" - } - ---------- -Responses ---------- - -+---------+---------------------------------------+----------------------------------------------+ -|| Status || Location || Response Body | -+=========+=======================================+==============================================+ -|| 200 || || See example above. | -+---------+---------------------------------------+----------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+---------------------------------------+----------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/attributes/get.rst b/source/developers/projects/profile/api/profile/attributes/get.rst deleted file mode 100644 index d605460d8..000000000 --- a/source/developers/projects/profile/api/profile/attributes/get.rst +++ /dev/null @@ -1,78 +0,0 @@ -:is-up-to-date: True - - -.. _crafter-profile-api-profile-attributes-get: - -============== -Get Attributes -============== - -Returns the attributes of a profile. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/:id/attributes`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| id || String || |checkmark| || The profile's ID | -+---------------------+-------------+---------------+----------------------------------------------+ -|| attributesToReturn || String || || The name of the attributes to return | -|| || || || (don't specify to return all) | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/profile/592887d7d4c650213cc2f400/attributes?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - - { - "firstName": "John", - "lastName": "Doe" - } - ---------- -Responses ---------- - -+---------+--------------------------------------+-----------------------------------------------+ -|| Status || Location || Response Body | -+=========+======================================+===============================================+ -|| 200 || || See example above. | -+---------+--------------------------------------+-----------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------------+-----------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/attributes/remove.rst b/source/developers/projects/profile/api/profile/attributes/remove.rst deleted file mode 100644 index ecdb7536f..000000000 --- a/source/developers/projects/profile/api/profile/attributes/remove.rst +++ /dev/null @@ -1,93 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-attributes-remove: - -================= -Remove Attributes -================= - -Removes a list of attributes of a profile. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/:id/attributes/remove`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| id || String || |checkmark| || The profile's ID | -+---------------------+-------------+---------------+----------------------------------------------+ -|| attributeName || String || |checkmark| || The name of the attributes to remove | -+---------------------+-------------+---------------+----------------------------------------------+ -|| attributesToReturn || String || || The name of the attributes to return | -|| || || || (don't specify to return all) | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/profile/592887d7d4c650213cc2f400/attributes/remove?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d&attributeName=avatarLink - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495828439317, - "lastModified": 1495829514251, - "tenant": "sample-tenant", - "roles": [ - "APP_TEST", - "APP_REPORT" - ], - "attributes": { - "firstName": "John", - "lastName": "Doe" - }, - "id": "592887d7d4c650213cc2f400" - } - ---------- -Responses ---------- - -+---------+----------------------------------------+---------------------------------------------+ -|| Status || Location || Response Body | -+=========+========================================+=============================================+ -|| 200 || || See example above. | -+---------+----------------------------------------+---------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }``| -+---------+----------------------------------------+---------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/attributes/update.rst b/source/developers/projects/profile/api/profile/attributes/update.rst deleted file mode 100644 index 131ea487f..000000000 --- a/source/developers/projects/profile/api/profile/attributes/update.rst +++ /dev/null @@ -1,101 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-attributes-update: - -================= -Update Attributes -================= - -Updates the attributes of a profile. - -.. NOTE:: - The specified attributes will be merged with existing attributes. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/:id/attributes/update`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| id || String || |checkmark| || The profile's ID | -+---------------------+-------------+---------------+----------------------------------------------+ -|| attributesToReturn || String || || The name of the attributes to return | -|| || || || (don't specify to return all) | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/profile/592715d4d4c650e226b03b62/roles/add?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d&role=APP_TEST,APP_REPORT - -.. code-block:: json - - { - "avatarLink": "/static-assets/images/avatar.png" - } - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495828439317, - "lastModified": 1495829274842, - "tenant": "sample-tenant", - "roles": [ - "APP_TEST", - "APP_REPORT" - ], - "attributes": { - "firstName": "John", - "lastName": "Doe", - "avatarLink": "/static-assets/images/avatar.png" - }, - "id": "592887d7d4c650213cc2f400" - } - ---------- -Responses ---------- - -+---------+----------------------------------------+---------------------------------------------+ -|| Status || Location || Response Body | -+=========+========================================+=============================================+ -|| 200 || || See example above. | -+---------+----------------------------------------+---------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }``| -+---------+----------------------------------------+---------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/by_existing_attribute.rst b/source/developers/projects/profile/api/profile/by_existing_attribute.rst deleted file mode 100644 index 626e3c261..000000000 --- a/source/developers/projects/profile/api/profile/by_existing_attribute.rst +++ /dev/null @@ -1,103 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-by_existing_attribute: - -=============================== -Get Profiles By Attribute Value -=============================== - -Returns the list of profiles that have the given attribute with the given value. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/by_existing_attribute`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| tenantName || String || |checkmark| || The tenant's name | -+---------------------+-------------+---------------+----------------------------------------------+ -|| attributeName || String || |checkmark| || The name of the attribute the profiles | -|| || || || must have | -+---------------------+-------------+---------------+----------------------------------------------+ -|| attributeName || String || |checkmark| || The value of the attribute the profiles | -|| || || || must have | -+---------------------+-------------+---------------+----------------------------------------------+ -|| 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) | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/profile/by_existing_attribute?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d&tenantName=sample-tenant&attributeName=lastName&attributeValue=Doe - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - [ - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495828439317, - "lastModified": 1495829514251, - "tenant": "sample-tenant", - "roles": [ - "APP_TEST", - "APP_REPORT" - ], - "attributes": { - "firstName": "John", - "lastName": "Doe" - }, - "id": "592887d7d4c650213cc2f400" - } - ] - ---------- -Responses ---------- - -+---------+----------------------------------------+---------------------------------------------+ -|| Status || Location || Response Body | -+=========+========================================+=============================================+ -|| 200 || || See example above. | -+---------+----------------------------------------+---------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }``| -+---------+----------------------------------------+---------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/by_ids.rst b/source/developers/projects/profile/api/profile/by_ids.rst deleted file mode 100644 index 9db4aaf7a..000000000 --- a/source/developers/projects/profile/api/profile/by_ids.rst +++ /dev/null @@ -1,91 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-by_ids: - -=================== -Get Profiles By Ids -=================== - -Returns a list of profiles for the specified list of IDs. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/by_query`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| id || String || |checkmark| || 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) | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/profile/by_ids?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d&id=59284659d4c650213cc2f3fc,59284659d4c650213cc2f3ff - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - [ - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495811673842, - "lastModified": 1495811673842, - "tenant": "sample-tenant", - "roles": [], - "attributes": {}, - "id": "59284659d4c650213cc2f3fc" - } - ] - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/by_query.rst b/source/developers/projects/profile/api/profile/by_query.rst deleted file mode 100644 index d5ff04374..000000000 --- a/source/developers/projects/profile/api/profile/by_query.rst +++ /dev/null @@ -1,102 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-by_query: - -===================== -Get Profiles By Query -===================== - -Returns the profiles that match the specified query. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/by_query`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+---------+---------------+--------------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=========+===============+==================================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+---------+---------------+--------------------------------------------------+ -|| tenantName || String || |checkmark| || The tenant's name | -+---------------------+---------+---------------+--------------------------------------------------+ -|| query || String || |checkmark| || The Mongo query used to search for the profiles | -+---------------------+---------+---------------+--------------------------------------------------+ -|| 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) | -+---------------------+---------+---------------+--------------------------------------------------+ - -.. WARNING:: - The query must not contain the ``$where`` operator, the tenant's name (already specified) or any non-readable attribute by the application - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/profile/by_query?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d&tenantName=sample-tenant&query=%7B%20%22username%22%3A%20%22john.doe%22%20%7D - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - [ - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495748091232, - "lastModified": 1495748091232, - "tenant": "sample-tenant", - "roles": [], - "attributes": {}, - "id": "59274dfbd4c650e226b03b65" - } - ] - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/by_role.rst b/source/developers/projects/profile/api/profile/by_role.rst deleted file mode 100644 index 80f0f720c..000000000 --- a/source/developers/projects/profile/api/profile/by_role.rst +++ /dev/null @@ -1,96 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-by_role: - -==================== -Get Profiles By Role -==================== - -Returns a list of profiles for a specific role and tenant. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/by_role`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| tenantName || String || |checkmark| || The tenant's name | -+---------------------+-------------+---------------+----------------------------------------------+ -|| role || String || |checkmark| || The role's name | -+---------------------+-------------+---------------+----------------------------------------------+ -|| 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) | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/profile/by_role?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d&tenantName=sample-tenant&role=APP_TEST - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - [ - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495811673842, - "lastModified": 1495812397986, - "tenant": "sample-tenant", - "roles": [ - "APP_TEST", - "APP_REPORT" - ], - "attributes": {}, - "id": "59284659d4c650213cc2f3fc" - } - ] - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/by_ticket.rst b/source/developers/projects/profile/api/profile/by_ticket.rst deleted file mode 100644 index 4f709454a..000000000 --- a/source/developers/projects/profile/api/profile/by_ticket.rst +++ /dev/null @@ -1,94 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-by_ticket: - -===================== -Get Profile By Ticket -===================== - -Returns the profile for the specified ticket. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/by_ticket`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| ticketId || String || |checkmark| || The ID ticket of the authenticated profile | -+---------------------+-------------+---------------+----------------------------------------------+ -|| attributesToReturn || String || || The name of the attributes to return | -|| || || || (don't specify to return all) | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/profile/one_by_query?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d&tenantName=sample-tenant&query=%7B%20%22username%22%3A%20%22john.doe%22%20%7D - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": true, - "createdOn": 1495811673842, - "lastModified": 1495816425048, - "tenant": "sample-tenant", - "roles": [ - "APP_TEST", - "APP_REPORT" - ], - "attributes": {}, - "id": "59284659d4c650213cc2f3fc" - } - ---------- -Responses ---------- - -+--------+--------------------------+------------------------------------------------------------+ -|| Status|| Location || Response Body | -+========+==========================+============================================================+ -|| 200 | | See example above. | -+--------+--------------------------+------------------------------------------------------------+ -|| 403 | | .. code-block:: json | -|| | | | -|| | | {"errorCode":"DISABLED_PROFILE", "message":"Profile | -|| | | \"59284659d4c650213cc2f3fc\" of tenant \"sample-tenant\" | -|| | | is disabled"} | -+--------+--------------------------+------------------------------------------------------------+ -|| 500 | | ``{ "message" : "Internal server error" }`` | -+--------+--------------------------+------------------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/by_username.rst b/source/developers/projects/profile/api/profile/by_username.rst deleted file mode 100644 index 535841d28..000000000 --- a/source/developers/projects/profile/api/profile/by_username.rst +++ /dev/null @@ -1,87 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-by_username: - -======================= -Get Profile By Username -======================= - -Returns the user for the specified tenant and username. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/by_username`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| tenantName || String || |checkmark| || The tenant's name | -+---------------------+-------------+---------------+----------------------------------------------+ -|| username || String || |checkmark| || The profile's username | -+---------------------+-------------+---------------+----------------------------------------------+ -|| attributesToReturn || String || || The name of the attributes to return | -|| || || || (don't specify to return all) | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/profile/by_username?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d&tenantName=sample-tenant&username=john.doe - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495748091232, - "lastModified": 1495748091232, - "tenant": "sample-tenant", - "roles": [], - "attributes": {}, - "id": "59274dfbd4c650e226b03b65" - } - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/change_password.rst b/source/developers/projects/profile/api/profile/change_password.rst deleted file mode 100644 index cb9828ebd..000000000 --- a/source/developers/projects/profile/api/profile/change_password.rst +++ /dev/null @@ -1,97 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-change_password: - -=============== -Change Password -=============== - -Resets a profile's password. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/change_password`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| resetTokenId || String || |checkmark| || The reset token ID | -+---------------------+-------------+---------------+----------------------------------------------+ -|| newPassword || String || |checkmark| || The new password | -+---------------------+-------------+---------------+----------------------------------------------+ -|| attributesToReturn || String || || The name of the attributes to return | -|| || || || (don't specify to return all) | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/profile/change_password - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - resetTokenId=a2be0e86-7c71-4edf-aed9-6b00c0c60c33 - newPassword=test123 - - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495811673842, - "lastModified": 1495815997208, - "tenant": "sample-tenant", - "roles": [ - "APP_TEST", - "APP_REPORT" - ], - "attributes": {}, - "id": "59284659d4c650213cc2f3fc" - } - ---------- -Responses ---------- - -+---------+---------------------------------+----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+=================================+====================================================+ -|| 200 || ``.../profile/change_password``|| See example above. | -+---------+---------------------------------+----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+---------------------------------+----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/count.rst b/source/developers/projects/profile/api/profile/count.rst deleted file mode 100644 index 0b08d9d98..000000000 --- a/source/developers/projects/profile/api/profile/count.rst +++ /dev/null @@ -1,70 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-count: - -================= -Get Profile Count -================= - -Returns the number of profiles for the specified tenant. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/count`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+===================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------+-------------+---------------+----------------------------------------------+ -|| tenantName || String || |checkmark| || The tenant's name | -+-------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/profile/count?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d&tenantName=sample-tenant - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - - 1 - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/count_by_query.rst b/source/developers/projects/profile/api/profile/count_by_query.rst deleted file mode 100644 index c333092fd..000000000 --- a/source/developers/projects/profile/api/profile/count_by_query.rst +++ /dev/null @@ -1,75 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-count_by_query: - -========================== -Get Profile Count By Query -========================== - -Returns the number of profiles that match the query for the specified tenant. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/count_by_query`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+----------------+----------+---------------+----------------------------------------------------+ -|| Name || Type || Required || Description | -+================+==========+===============+====================================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+----------------+----------+---------------+----------------------------------------------------+ -|| tenantName || String || |checkmark| || The tenant's name | -+----------------+----------+---------------+----------------------------------------------------+ -|| query || String || |checkmark| || 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 - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/profile/count_by_query?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d&tenantName=sample-tenant&query=%7B%20%22username%22%3A%20%22john.doe%22%20%7D - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - - 1 - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/create.rst b/source/developers/projects/profile/api/profile/create.rst deleted file mode 100644 index eb62d084d..000000000 --- a/source/developers/projects/profile/api/profile/create.rst +++ /dev/null @@ -1,116 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-create: - -============== -Create Profile -============== - -Creates a new profile for a specific tenant. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/create`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+------------------+---------+--------------+-----------------------------------------------------+ -|| Name || Type || Required || Description | -+==================+=========+==============+=====================================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+------------------+---------+--------------+-----------------------------------------------------+ -|| tenantName || String || |checkmark| || The name of the tenant to add the profile to | -+------------------+---------+--------------+-----------------------------------------------------+ -|| username || String || |checkmark| || The profile's username | -+------------------+---------+--------------+-----------------------------------------------------+ -|| password || String || || The profile's password | -+------------------+---------+--------------+-----------------------------------------------------+ -|| email || String || |checkmark| || The profile's email | -+------------------+---------+--------------+-----------------------------------------------------+ -|| enabled || String || |checkmark| || If the profile should be enabled or not | -+------------------+---------+--------------+-----------------------------------------------------+ -|| role || String || || The profile's roles | -+------------------+---------+--------------+-----------------------------------------------------+ -|| attributes || String || || The additional attributes to add to the profile | -|| || || || (specify a JSON string) | -+------------------+---------+--------------+-----------------------------------------------------+ -|| verificationUrl || String || || The URL (sans token) the user needs to go in case | -|| || || || it needs to verify the created profile | -|| || || || (verification depends on tenant) | -+------------------+---------+--------------+-----------------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/profile/create - -.. code-block:: none - :linenos: - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - tenantName=sample-tenant - username=john.doe - password=passw0rd - email=john.doe@example.com - enabled=false - attributes={"firstName":"John","lastName":"Doe"} - verificationUrl - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495733716728, - "lastModified": 1495733716728, - "tenant": "sample-tenant", - "roles": [], - "attributes": {}, - "id": "592715d4d4c650e226b03b62" - } - ---------- -Responses ---------- - -+---------+------------------------+-------------------------------------------------------------+ -|| Status || Location || Response Body | -+=========+========================+=============================================================+ -|| 200 || | See example above. | -+---------+------------------------+-------------------------------------------------------------+ -|| 400 || | .. code-block:: json | -|| || | | -|| || | {"errorCode":"PROFILE_EXISTS", "message":"A profile with | -|| || | name \"john.doe\" already exists"} | -+---------+------------------------+-------------------------------------------------------------+ -|| 500 || | ``{ "message" : "Internal server error" }`` | -+---------+------------------------+-------------------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/delete.rst b/source/developers/projects/profile/api/profile/delete.rst deleted file mode 100644 index fbd00e023..000000000 --- a/source/developers/projects/profile/api/profile/delete.rst +++ /dev/null @@ -1,70 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-delete: - -============== -Delete Profile -============== - -Deletes a profile. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/:id/delete`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+-------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+===================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+-------------------+-------------+--------------+-----------------------------------------------+ -|| id || String || |checkmark| || The profile's ID | -+-------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/profile/592715d4d4c650e226b03b62/delete - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/disable.rst b/source/developers/projects/profile/api/profile/disable.rst deleted file mode 100644 index e6f6a5cee..000000000 --- a/source/developers/projects/profile/api/profile/disable.rst +++ /dev/null @@ -1,87 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-disable: - -=============== -Disable Profile -=============== - -Disables a profile. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/:id/disable`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| id || String || |checkmark| || The profile's ID | -+---------------------+-------------+---------------+----------------------------------------------+ -|| attributesToReturn || String || || The name of the attributes to return | -|| || || || (don't specify to return all) | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -``POST .../api/1/profile/592715d4d4c650e226b03b62/disable`` - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495733716728, - "lastModified": 1495733716728, - "tenant": "sample-tenant", - "roles": [], - "attributes": {}, - "id": "592715d4d4c650e226b03b62" - } - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || ``.../profile/:id/disable`` || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/enable.rst b/source/developers/projects/profile/api/profile/enable.rst deleted file mode 100644 index 8c9043358..000000000 --- a/source/developers/projects/profile/api/profile/enable.rst +++ /dev/null @@ -1,90 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-enable: - -============== -Enable Profile -============== - -Enables a profile. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/:id/enable`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| id || String || |checkmark| || The profile's ID | -+---------------------+-------------+---------------+----------------------------------------------+ -|| attributesToReturn || String || || The name of the attributes to return | -|| || || || (don't specify to return all) | -+---------------------+-------------+---------------+----------------------------------------------+ - - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/profile/592715d4d4c650e226b03b62/enable - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": true, - "createdOn": 1495733716728, - "lastModified": 1495733716728, - "tenant": "sample-tenant", - "roles": [], - "attributes": {}, - "id": "592715d4d4c650e226b03b62" - } - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/get.rst b/source/developers/projects/profile/api/profile/get.rst deleted file mode 100644 index a6f55b6da..000000000 --- a/source/developers/projects/profile/api/profile/get.rst +++ /dev/null @@ -1,85 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-get: - -=========== -Get Profile -=========== - -Returns the profile for the specified ID. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/:id`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| id || String || |checkmark| || The profile's ID | -+---------------------+-------------+---------------+----------------------------------------------+ -|| attributesToReturn || String || || The name of the attributes to return | -|| || || || (don't specify to return all) | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/profile/59274dfbd4c650e226b03b65?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495748091232, - "lastModified": 1495748091232, - "tenant": "sample-tenant", - "roles": [], - "attributes": {}, - "id": "59274dfbd4c650e226b03b65" - } - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/one_by_query.rst b/source/developers/projects/profile/api/profile/one_by_query.rst deleted file mode 100644 index 5a063b510..000000000 --- a/source/developers/projects/profile/api/profile/one_by_query.rst +++ /dev/null @@ -1,91 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-one_by_query: - -==================== -Get Profile By Query -==================== - -Returns the single profile that matches the specified query. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/one_by_query`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| tenantName || String || |checkmark| || The tenant's name | -+---------------------+-------------+---------------+----------------------------------------------+ -|| query || String || |checkmark| || The Mongo query used to search for the | -|| || || || profiles. | -+---------------------+-------------+---------------+----------------------------------------------+ -|| attributesToReturn || String || || The name of the attributes to return | -|| || || || (don't specify to return all) | -+---------------------+-------------+---------------+----------------------------------------------+ - -.. WARNING:: - The query must not contain the ``$where`` operator, the tenant's name (already specified) or any non-readable attribute by the application - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/profile/one_by_query?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d&tenantName=sample-tenant&query=%7B%20%22username%22%3A%20%22john.doe%22%20%7D - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495748091232, - "lastModified": 1495748091232, - "tenant": "sample-tenant", - "roles": [], - "attributes": {}, - "id": "59274dfbd4c650e226b03b65" - } - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/range.rst b/source/developers/projects/profile/api/profile/range.rst deleted file mode 100644 index a7e1a0178..000000000 --- a/source/developers/projects/profile/api/profile/range.rst +++ /dev/null @@ -1,97 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-range: - -===================== -Get Profiles By Range -===================== - -Returns a range of profiles for the specified tenant. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/range`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| tenantName || String || |checkmark| || 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) | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/profile/range?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d&tenantName=sample-tenant - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - [ - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495811673842, - "lastModified": 1495811673842, - "tenant": "sample-tenant", - "roles": [], - "attributes": {}, - "id": "59284659d4c650213cc2f3fc" - } - ] - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/reset_password.rst b/source/developers/projects/profile/api/profile/reset_password.rst deleted file mode 100644 index e43563395..000000000 --- a/source/developers/projects/profile/api/profile/reset_password.rst +++ /dev/null @@ -1,96 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-reset_password: - -============== -Reset Password -============== - -Sends an email to the profile's user to indicate that the password needs to be reset. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/:id/reset_password`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| id || String || |checkmark| || The profile's ID | -+---------------------+-------------+---------------+----------------------------------------------+ -|| resetPasswordUrl || String || |checkmark| || 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) | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/profile/59284659d4c650213cc2f3fc/reset_password - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - resetPasswordUrl=http://example.com - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495811673842, - "lastModified": 1495812397986, - "tenant": "sample-tenant", - "roles": [ - "APP_TEST", - "APP_REPORT" - ], - "attributes": {}, - "id": "59284659d4c650213cc2f3fc" - } - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || ``.../profile/:id/enable`` || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/roles/add.rst b/source/developers/projects/profile/api/profile/roles/add.rst deleted file mode 100644 index e6a524e51..000000000 --- a/source/developers/projects/profile/api/profile/roles/add.rst +++ /dev/null @@ -1,89 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-roles-add: - -========= -Add Roles -========= - -Assigns roles to a profile. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/:id/roles/add`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| id || String || |checkmark| || The profile's ID | -+---------------------+-------------+---------------+----------------------------------------------+ -|| role || String || |checkmark| || The roles to assign | -+---------------------+-------------+---------------+----------------------------------------------+ -|| attributesToReturn || String || || The name of the attributes to return | -|| || || || (don't specify to return all) | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/profile/592715d4d4c650e226b03b62/roles/add?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d&role=APP_TEST,APP_REPORT - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495733716728, - "lastModified": 1495744519401, - "tenant": "sample-tenant", - "roles": [ - "APP_TEST", - "APP_REPORT" - ], - "attributes": {}, - "id": "592715d4d4c650e226b03b62" - } - ---------- -Responses ---------- -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/roles/remove.rst b/source/developers/projects/profile/api/profile/roles/remove.rst deleted file mode 100644 index 3caedf771..000000000 --- a/source/developers/projects/profile/api/profile/roles/remove.rst +++ /dev/null @@ -1,87 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-roles-remove: - -============ -Remove Roles -============ - -Removes assigned roles from a profile. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/:id/roles/remove`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| id || String || |checkmark| || The profile's ID | -+---------------------+-------------+---------------+----------------------------------------------+ -|| role || String || |checkmark| || The roles to remove | -+---------------------+-------------+---------------+----------------------------------------------+ -|| attributesToReturn || String || || The name of the attributes to return | -|| || || || (don't specify to return all) | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/profile/592715d4d4c650e226b03b62/roles/remove?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d&role=APP_TEST,APP_REPORT - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495733716728, - "lastModified": 1495744610750, - "tenant": "sample-tenant", - "roles": [], - "attributes": {}, - "id": "592715d4d4c650e226b03b62" - } - ---------- -Responses ---------- - -+---------+-----------------------------------+--------------------------------------------------+ -|| Status || Location || Response Body | -+=========+===================================+==================================================+ -|| 200 || || See example above. | -+---------+-----------------------------------+--------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+-----------------------------------+--------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/update.rst b/source/developers/projects/profile/api/profile/update.rst deleted file mode 100644 index c9ef88b62..000000000 --- a/source/developers/projects/profile/api/profile/update.rst +++ /dev/null @@ -1,112 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-update: - -============== -Update Profile -============== - -Updates the profile's info. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/:id/update`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+---------+---------------+---------------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=========+===============+===================================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+---------+---------------+---------------------------------------------------+ -|| id || String || |checkmark| || The profile's ID | -+---------------------+---------+---------------+---------------------------------------------------+ -|| username || String || |checkmark| || The new username for the profile | -+---------------------+---------+---------------+---------------------------------------------------+ -|| password || String || || The new password for the profile | -+---------------------+---------+---------------+---------------------------------------------------+ -|| email || String || |checkmark| || The new email for the profile | -+---------------------+---------+---------------+---------------------------------------------------+ -|| enabled || String || |checkmark| || If the profile should be enabled or not | -+---------------------+---------+---------------+---------------------------------------------------+ -|| role || String || || The new roles for the profile | -+---------------------+---------+---------------+---------------------------------------------------+ -|| attributes || String || || The attributes to update (specify a JSON string) | -+---------------------+---------+---------------+---------------------------------------------------+ -|| attributesToReturn || String || || The name of the attributes to return | -|| || || || (don't specify to return all) | -+---------------------+---------+---------------+---------------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/profile/592887d7d4c650213cc2f400/update - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - username=john.doe - password=passw0rd - email=john.doe@example.com - enabled=false - role=APP_TEST,APP_REPORT - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": false, - "enabled": false, - "createdOn": 1495828439317, - "lastModified": 1495828570508, - "tenant": "sample-tenant", - "roles": [ - "APP_TEST", - "APP_REPORT" - ], - "attributes": { - "firstName": "John", - "lastName": "Doe" - }, - "id": "592887d7d4c650213cc2f400" - } - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/verification_token/create.rst b/source/developers/projects/profile/api/profile/verification_token/create.rst deleted file mode 100644 index 30dfa0754..000000000 --- a/source/developers/projects/profile/api/profile/verification_token/create.rst +++ /dev/null @@ -1,79 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-verification_token-create: - -========================= -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. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/:id/verification_token/create`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| id || String || |checkmark| || The profile ID of the user | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/profile/592715d4d4c650e226b03b62/verification_token/create?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - - { - "tenant": "sample-tenant", - "profileId": "592715d4d4c650e226b03b62", - "timestamp": 1495746285875, - "id": "055d58c4-fabb-44da-96eb-261e24e1d0c9" - } - ---------- -Responses ---------- - -+---------+----------------------------------------------+----------------------------------------------+ -|| Status || Location || Response Body | -+=========+==============================================+==============================================+ -|| 200 || See example above. || | -+---------+----------------------------------------------+----------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+----------------------------------------------+----------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/verification_token/delete.rst b/source/developers/projects/profile/api/profile/verification_token/delete.rst deleted file mode 100644 index ee1fd9303..000000000 --- a/source/developers/projects/profile/api/profile/verification_token/delete.rst +++ /dev/null @@ -1,69 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-verification_token-delete: - -========================= -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. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/verification_token/:id/delete`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| id || String || |checkmark| || The token ID | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/profile/verification_token/de60f56d-3a4b-4dec-b798-fb22b2964c14/delete?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - ---------- -Responses ---------- -+---------+----------------------------------------------+----------------------------------------------+ -|| Status || Location || Response Body | -+=========+==============================================+==============================================+ -|| 200 || See example above. || | -+---------+----------------------------------------------+----------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+----------------------------------------------+----------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/verification_token/get.rst b/source/developers/projects/profile/api/profile/verification_token/get.rst deleted file mode 100644 index 181829d43..000000000 --- a/source/developers/projects/profile/api/profile/verification_token/get.rst +++ /dev/null @@ -1,75 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-verification_token-get: - -====================== -Get Verification Token -====================== - -Returns the verification token that corresponds to the given ID. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/verification_token/:id`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+----------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+==============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+----------------------------------------------+ -|| id || String || |checkmark| || The token ID | -+---------------------+-------------+---------------+----------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - GET .../api/1/profile/verification_token/de60f56d-3a4b-4dec-b798-fb22b2964c14?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - - { - "tenant": "sample-tenant", - "profileId": "592715d4d4c650e226b03b62", - "timestamp": 1495746812910, - "id": "de60f56d-3a4b-4dec-b798-fb22b2964c14" - } - ---------- -Responses ---------- - -+---------+----------------------------------------+---------------------------------------------+ -|| Status || Location || Response Body | -+=========+========================================+=============================================+ -|| 200 || || See example above. | -+---------+----------------------------------------+---------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }``| -+---------+----------------------------------------+---------------------------------------------+ diff --git a/source/developers/projects/profile/api/profile/verify.rst b/source/developers/projects/profile/api/profile/verify.rst deleted file mode 100644 index ae2f1197a..000000000 --- a/source/developers/projects/profile/api/profile/verify.rst +++ /dev/null @@ -1,90 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-profile-verify: - -============== -Verify Profile -============== - -Sets the profile as verified if the verification token is valid. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/profile/verify`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+----------------------+---------+---------------+-------------------------------------------+ -|| Name || Type || Required || Description | -+======================+=========+===============+===========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+----------------------+---------+---------------+-------------------------------------------+ -|| verificationTokenId || String || |checkmark| || The verification token ID | -+----------------------+---------+---------------+-------------------------------------------+ -|| attributesToReturn || String || || The name of the attributes to return | -|| || || || (don't specify to return all) | -+----------------------+---------+---------------+-------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/profile/verify - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - verificationTokenId=055d58c4-fabb-44da-96eb-261e24e1d0c9 - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "username": "john.doe", - "email": "john.doe@example.com", - "verified": true, - "enabled": true, - "createdOn": 1495733716728, - "lastModified": 1495746467551, - "tenant": "sample-tenant", - "roles": [], - "attributes": {}, - "id": "592715d4d4c650e226b03b62" - } - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/tenant/all.rst b/source/developers/projects/profile/api/tenant/all.rst deleted file mode 100644 index d7c7fbc14..000000000 --- a/source/developers/projects/profile/api/tenant/all.rst +++ /dev/null @@ -1,249 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-tenant-all: - -=============== -Get All Tenants -=============== - -Returns a list with all the tenants. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/tenant/all`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+------------------------+-------------+---------------+-----------------------------------------+ -|| name || String || |checkmark| || The tenant's name | -+------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -``GET .../api/1/tenant/all?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d`` - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - [ - { - "name": "default", - "verifyNewProfiles": false, - "availableRoles": [ - "SOCIAL_SUPERADMIN", - "PROFILE_ADMIN", - "PROFILE_SUPERADMIN", - "PROFILE_TENANT_ADMIN" - ], - "ssoEnabled": false, - "attributeDefinitions": [ - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "firstName", - "metadata": { - "label": "First Name", - "type": "TEXT", - "displayOrder": 0.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "lastName", - "metadata": { - "label": "Last Name", - "type": "TEXT", - "displayOrder": 1.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "displayName", - "metadata": { - "label": "Display Name", - "type": "TEXT", - "displayOrder": 2.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "avatarLink", - "metadata": { - "label": "Avatar Link", - "type": "TEXT", - "displayOrder": 3.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "socialContexts", - "metadata": { - "label": "Social Contexts", - "type": "COMPLEX", - "displayOrder": 4.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "connections", - "metadata": { - "label": "Connections", - "type": "COMPLEX", - "displayOrder": 5.0 - }, - "defaultValue": null - } - ], - "id": "5926f6c524d9aaad9804a401" - }, - { - "name": "sample-tenant", - "verifyNewProfiles": false, - "availableRoles": [ - "APP_ADMIN", - "APP_USER" - ], - "ssoEnabled": false, - "attributeDefinitions": [ - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "firstName", - "metadata": { - "label": "First Name", - "type": "TEXT", - "displayOrder": 0.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "lastName", - "metadata": { - "label": "Last Name", - "type": "TEXT", - "displayOrder": 1.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "avatarLink", - "metadata": { - "label": "Avatar Link", - "type": "TEXT", - "displayOrder": 3.0 - }, - "defaultValue": null - } - ], - "id": "5926f6d9d4c650e226b03b61" - } - ] - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/tenant/attributes/add.rst b/source/developers/projects/profile/api/tenant/attributes/add.rst deleted file mode 100644 index d5a0e16e8..000000000 --- a/source/developers/projects/profile/api/tenant/attributes/add.rst +++ /dev/null @@ -1,179 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-tenant-attributes-add: - -============== -Add Attributes -============== - -Adds the given attribute definitions to the specified tenant. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+-------------------------+----------------------------------------------------------------------+ -|| HTTP Verb || POST | -+-------------------------+----------------------------------------------------------------------+ -|| URL || ``/api/1/tenant/:name/attribute_definitions/add`` | -+-------------------------+----------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+-------------------------+----------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+--------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+--------------------------------------------+ -|| name || String || |checkmark| || The tenant's name | -+---------------------+-------------+---------------+--------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/tenant/sample-tenant/attribute_definitions/add?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -.. code-block:: json - :linenos: - - [ - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "nickname", - "metadata": { - "label": "Nickname", - "type": "TEXT", - "displayOrder": 1.0 - }, - "defaultValue": null - } - ] - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "name": "sample-tenant", - "verifyNewProfiles": false, - "availableRoles": [ - "APP_ADMIN", - "APP_USER" - ], - "ssoEnabled": false, - "attributeDefinitions": [ - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "firstName", - "metadata": { - "label": "First Name", - "type": "TEXT", - "displayOrder": 0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "lastName", - "metadata": { - "label": "Last Name", - "type": "TEXT", - "displayOrder": 1 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "avatarLink", - "metadata": { - "label": "Avatar Link", - "type": "TEXT", - "displayOrder": 3 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "nickname", - "metadata": { - "label": "Nickname", - "type": "TEXT", - "displayOrder": 1.0 - }, - "defaultValue": null - } - ], - "id": "59284656d4c650213cc2f3fb" - } - ---------- -Responses ---------- - -+--------+----------------------------------------------+----------------------------------------+ -|| Status|| Location || Response Body | -+========+==============================================+========================================+ -|| 200 | | See example above. | -+--------+----------------------------------------------+----------------------------------------+ -|| 400 | | .. code-block:: json | -|| | | | -|| | | {"errorCode":"NO_SUCH_TENANT", | -|| | | "message": "No tenant with name | -|| | | \"test\" found"} | -+--------+----------------------------------------------+----------------------------------------+ -|| 500 | | ``{"message":"Internal server error"}``| -+--------+----------------------------------------------+----------------------------------------+ diff --git a/source/developers/projects/profile/api/tenant/attributes/remove.rst b/source/developers/projects/profile/api/tenant/attributes/remove.rst deleted file mode 100644 index 0818ac0a7..000000000 --- a/source/developers/projects/profile/api/tenant/attributes/remove.rst +++ /dev/null @@ -1,150 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-tenant-attributes-remove: - -================= -Remove Attributes -================= - -Removes the given attribute definitions from the specified tenant. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+-----------------------+------------------------------------------------------------------------+ -|| HTTP Verb || POST | -+-----------------------+------------------------------------------------------------------------+ -|| URL || ``/api/1/tenant/:name/attribute_definitions/remove`` | -+-----------------------+------------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+-----------------------+------------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+----------------+----------+---------------+-----------------------------------------------------+ -|| Name || Type || Required || Description | -+================+=========+===============+======================================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+----------------+---------+---------------+------------------------------------------------------+ -|| name || String || |checkmark| || The tenant's name | -+----------------+---------+---------------+------------------------------------------------------+ -|| attributeName || String || |checkmark| || The name of the attributes whose definitions should | -|| || || || be removed (the parmeter can be repeated) | -+----------------+---------+---------------+------------------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST ...crafter-profile/api/1/tenant/sample-tenant/attribute_definitions/remove - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - attributeName=nickname - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "name": "sample-tenant", - "verifyNewProfiles": true, - "availableRoles": [ - "APP_ADMIN", - "APP_USER" - ], - "ssoEnabled": false, - "attributeDefinitions": [ - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "firstName", - "metadata": { - "label": "First Name", - "type": "TEXT", - "displayOrder": 0.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "lastName", - "metadata": { - "label": "Last Name", - "type": "TEXT", - "displayOrder": 1.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "avatarLink", - "metadata": { - "label": "Avatar Link", - "type": "TEXT", - "displayOrder": 3.0 - }, - "defaultValue": null - } - ], - "id": "5926f6d9d4c650e226b03b61" - } - ---------- -Responses ---------- - -+--------+--------------------------------------------------+------------------------------------+ -|| Status|| Location || Response Body | -+========+==================================================+====================================+ -|| 200 | | See example above. | -+--------+--------------------------------------------------+------------------------------------+ -|| 400 | | .. code-block:: json | -|| | | | -|| | | {"errorCode": "NO_SUCH_TENANT", | -|| | | "message": "No tenant with name | -|| | | \"test\" found"} | -+--------+--------------------------------------------------+------------------------------------+ -|| 500 | | .. code-block:: json | -|| | | | -|| | | {"message":"Internal server | -|| | | error"} | -+--------+--------------------------------------------------+------------------------------------+ diff --git a/source/developers/projects/profile/api/tenant/attributes/update.rst b/source/developers/projects/profile/api/tenant/attributes/update.rst deleted file mode 100644 index c6bb0ceeb..000000000 --- a/source/developers/projects/profile/api/tenant/attributes/update.rst +++ /dev/null @@ -1,182 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-tenant-attributes-update: - -================= -Update Attributes -================= - -Updates the given attribute definitions of the specified tenant. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------+-------------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------+-------------------------------------------------------------------------+ -|| URL || ``/api/1/tenant/:name/attribute_definitions/update`` | -+----------------------+-------------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------+-------------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+--------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+--------------------------------------------+ -|| name || String || |checkmark| || The tenant's name | -+---------------------+-------------+---------------+--------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/tenant/sample-tenant/attribute_definitions/add?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -.. code-block:: json - :linenos: - - [ - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "nickname", - "metadata": { - "label": "Nickname", - "type": "TEXT", - "displayOrder": 10 - }, - "defaultValue": null - } - ] - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "name": "sample-tenant", - "verifyNewProfiles": false, - "availableRoles": [ - "APP_ADMIN", - "APP_USER" - ], - "ssoEnabled": false, - "attributeDefinitions": [ - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "firstName", - "metadata": { - "label": "First Name", - "type": "TEXT", - "displayOrder": 0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "lastName", - "metadata": { - "label": "Last Name", - "type": "TEXT", - "displayOrder": 1 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "avatarLink", - "metadata": { - "label": "Avatar Link", - "type": "TEXT", - "displayOrder": 3 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "nickname", - "metadata": { - "label": "Nickname", - "type": "TEXT", - "displayOrder": 10 - }, - "defaultValue": null - } - ], - "id": "59284656d4c650213cc2f3fb" - } - ---------- -Responses ---------- - -+--------+--------------------------------------------------+------------------------------------+ -|| Status|| Location || Response Body | -+========+==================================================+====================================+ -|| 200 | | See example above. | -+--------+--------------------------------------------------+------------------------------------+ -|| 400 | | .. code-block:: json | -|| | | | -|| | | {"errorCode": "NO_SUCH_TENANT", | -|| | | "message": "No tenant with name | -|| | | \"test\" found"} | -+--------+--------------------------------------------------+------------------------------------+ -|| 500 | | .. code-block:: json | -|| | | | -|| | | {"message":"Internal server | -|| | | error"} | -+--------+--------------------------------------------------+------------------------------------+ diff --git a/source/developers/projects/profile/api/tenant/count.rst b/source/developers/projects/profile/api/tenant/count.rst deleted file mode 100644 index 6c36e34e9..000000000 --- a/source/developers/projects/profile/api/tenant/count.rst +++ /dev/null @@ -1,66 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-tenant-count: - -============= -Count Tenants -============= - -Returns the total number of tenants. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/count`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -``GET .../api/1/tenant/count?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d`` - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - - 1 - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/tenant/create.rst b/source/developers/projects/profile/api/tenant/create.rst deleted file mode 100644 index 0b2c2a7da..000000000 --- a/source/developers/projects/profile/api/tenant/create.rst +++ /dev/null @@ -1,196 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-tenant-create: - -============= -Create Tenant -============= - -Creates the given tenant. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/tenant/create`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -``POST .../api/1/tenant/create?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d`` - -.. code-block:: json - :linenos: - - { - "name" : "sample-tenant", - "verifyNewProfiles" : false, - "availableRoles" : [ - "APP_ADMIN", - "APP_USER" - ], - "attributeDefinitions" : [ - { - "name" : "firstName", - "metadata" : { - "label" : "First Name", - "type" : "TEXT", - "displayOrder" : 0.0 - }, - "permissions" : [ - { - "application" : "*", - "allowedActions" : [ - "*" - ] - } - ] - }, - { - "name" : "lastName", - "metadata" : { - "label" : "Last Name", - "type" : "TEXT", - "displayOrder" : 1.0 - }, - "permissions" : [ - { - "application" : "*", - "allowedActions" : [ - "*" - ] - } - ] - }, - { - "name" : "avatarLink", - "metadata" : { - "label" : "Avatar Link", - "type" : "TEXT", - "displayOrder" : 3.0 - }, - "permissions" : [ - { - "application" : "*", - "allowedActions" : [ - "*" - ] - } - ] - } - ] - } - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "name": "sample-tenant", - "verifyNewProfiles": false, - "availableRoles": [ - "APP_ADMIN", - "APP_USER" - ], - "ssoEnabled": false, - "attributeDefinitions": [ - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "firstName", - "metadata": { - "label": "First Name", - "type": "TEXT", - "displayOrder": 0.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "lastName", - "metadata": { - "label": "Last Name", - "type": "TEXT", - "displayOrder": 1.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "avatarLink", - "metadata": { - "label": "Avatar Link", - "type": "TEXT", - "displayOrder": 3.0 - }, - "defaultValue": null - } - ], - "id": "5926ee77d4c6ad51e5e44f45" - } - ---------- -Responses ---------- - -+---------+----------------------+---------------------------------------------------------------+ -|| Status || Location || Response Body | -+=========+======================+===============================================================+ -|| 200 | | See example above. | -+---------+----------------------+---------------------------------------------------------------+ -|| 400 | | .. code-block:: json | -|| | | | -|| | | {"errorCode":"TENANT_EXISTS", "message":"The tenant | -|| | | \"sample-tenant\" already exists"} | -+---------+----------------------+---------------------------------------------------------------+ -|| 500 | | ``{ "message" : "Internal server error" }`` | -+---------+----------------------+---------------------------------------------------------------+ diff --git a/source/developers/projects/profile/api/tenant/delete.rst b/source/developers/projects/profile/api/tenant/delete.rst deleted file mode 100644 index f5e57f845..000000000 --- a/source/developers/projects/profile/api/tenant/delete.rst +++ /dev/null @@ -1,68 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-tenant-delete: - -============= -Delete Tenant -============= - -Deletes a tenant. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/tenant/:name/delete`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+------------------------+-------------+---------------+-----------------------------------------+ -|| name || String || |checkmark| || The tenant's name | -+------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -``POST .../api/1/tenant/sample-tenant/delete`` - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - ---------- -Responses ---------- - -+---------+---------------------------------+----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+=================================+====================================================+ -|| 200 || || See example above. | -+---------+---------------------------------+----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+---------------------------------+----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/tenant/get.rst b/source/developers/projects/profile/api/tenant/get.rst deleted file mode 100644 index 4b9c0177b..000000000 --- a/source/developers/projects/profile/api/tenant/get.rst +++ /dev/null @@ -1,131 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-tenant-get: - -========== -Get Tenant -========== - -Returns a tenant. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || GET | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/tenant/:name`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+------------------------+-------------+---------------+-----------------------------------------+ -|| name || String || |checkmark| || The tenant's name | -+------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -``GET .../api/1/tenant/sample-tenant?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d`` - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "name": "sample-tenant", - "verifyNewProfiles": false, - "availableRoles": [ - "APP_ADMIN", - "APP_USER" - ], - "ssoEnabled": false, - "attributeDefinitions": [ - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "firstName", - "metadata": { - "label": "First Name", - "type": "TEXT", - "displayOrder": 0.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "lastName", - "metadata": { - "label": "Last Name", - "type": "TEXT", - "displayOrder": 1.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "avatarLink", - "metadata": { - "label": "Avatar Link", - "type": "TEXT", - "displayOrder": 3.0 - }, - "defaultValue": null - } - ], - "id": "5926ee77d4c6ad51e5e44f45" - } - ---------- -Responses ---------- - -+---------+--------------------------------+-----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+================================+=====================================================+ -|| 200 || || See example above. | -+---------+--------------------------------+-----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+--------------------------------+-----------------------------------------------------+ diff --git a/source/developers/projects/profile/api/tenant/roles/add.rst b/source/developers/projects/profile/api/tenant/roles/add.rst deleted file mode 100644 index edb3994f1..000000000 --- a/source/developers/projects/profile/api/tenant/roles/add.rst +++ /dev/null @@ -1,147 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-tenant-roles-add: - -========= -Add Roles -========= - -Adds the given roles to the specified tenant. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/tenant/:name/roles/add`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+--------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+--------------------------------------------+ -|| name || String || |checkmark| || The tenant's name | -+---------------------+-------------+---------------+--------------------------------------------+ -|| role || String || |checkmark| || The roles to add | -+---------------------+-------------+---------------+--------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/tenant/sample-tenant/roles/add - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - role=APP_TEST,APP_REPORT - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "name": "sample-tenant", - "verifyNewProfiles": true, - "availableRoles": [ - "APP_ADMIN", - "APP_TEST", - "APP_REPORT", - "APP_USER" - ], - "ssoEnabled": false, - "attributeDefinitions": [ - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "firstName", - "metadata": { - "label": "First Name", - "type": "TEXT", - "displayOrder": 0.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "lastName", - "metadata": { - "label": "Last Name", - "type": "TEXT", - "displayOrder": 1.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "avatarLink", - "metadata": { - "label": "Avatar Link", - "type": "TEXT", - "displayOrder": 3.0 - }, - "defaultValue": null - } - ], - "id": "5926f6d9d4c650e226b03b61" - } - ---------- -Responses ---------- - -+---------+-------------------------------+------------------------------------------------------+ -|| Status || Location || Response Body | -+=========+===============================+======================================================+ -|| 200 | | See example above. | -+---------+-------------------------------+------------------------------------------------------+ -|| 400 | | .. code-block:: json | -|| | | | -|| | | {"errorCode":"NO_SUCH_TENANT", "message":"No tenant | -|| | | with name \"test\" found"} | -+---------+-------------------------------+------------------------------------------------------+ -|| 500 | | ``{ "message" : "Internal server error" }`` | -+---------+-------------------------------+------------------------------------------------------+ diff --git a/source/developers/projects/profile/api/tenant/roles/remove.rst b/source/developers/projects/profile/api/tenant/roles/remove.rst deleted file mode 100644 index e78aaa51c..000000000 --- a/source/developers/projects/profile/api/tenant/roles/remove.rst +++ /dev/null @@ -1,143 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-tenant-roles-remove: - -============ -Remove Roles -============ - -Removes the given roles to the specified tenant. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+-------------------+----------------------------------------------------------------------------+ -|| HTTP Verb || POST | -+-------------------+----------------------------------------------------------------------------+ -|| URL || ``/api/1/tenant/:name/attribute_definitions/remove`` | -+-------------------+----------------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+-------------------+----------------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+---------------------+-------------+---------------+--------------------------------------------+ -|| Name || Type || Required || Description | -+=====================+=============+===============+============================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+---------------------+-------------+---------------+--------------------------------------------+ -|| name || String || |checkmark| || The tenant's name | -+---------------------+-------------+---------------+--------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/tenant/sample-tenant/roles/remove - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - role=APP_TEST,APP_REPORT - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "name": "sample-tenant", - "verifyNewProfiles": true, - "availableRoles": [ - "APP_ADMIN", - "APP_USER" - ], - "ssoEnabled": false, - "attributeDefinitions": [ - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "firstName", - "metadata": { - "label": "First Name", - "type": "TEXT", - "displayOrder": 0.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "lastName", - "metadata": { - "label": "Last Name", - "type": "TEXT", - "displayOrder": 1.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "avatarLink", - "metadata": { - "label": "Avatar Link", - "type": "TEXT", - "displayOrder": 3.0 - }, - "defaultValue": null - } - ], - "id": "5926f6d9d4c650e226b03b61" - } - ---------- -Responses ---------- - -+---------+----------------------------------+---------------------------------------------------+ -|| Status || Location || Response Body | -+=========+==================================+===================================================+ -|| 200 | | See example above. | -+---------+----------------------------------+---------------------------------------------------+ -|| 400 | | .. code-block:: json | -|| | | | -|| | | {"errorCode":"NO_SUCH_TENANT", "message":"No | -|| | | tenant with name \"test\" found"} | -+---------+----------------------------------+---------------------------------------------------+ -|| 500 | | ``{ "message" : "Internal server error" }`` | -+---------+----------------------------------+---------------------------------------------------+ diff --git a/source/developers/projects/profile/api/tenant/update.rst b/source/developers/projects/profile/api/tenant/update.rst deleted file mode 100644 index e1853a98a..000000000 --- a/source/developers/projects/profile/api/tenant/update.rst +++ /dev/null @@ -1,197 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-tenant-update: - -============= -Update Tenant -============= - -Updates the given tenant. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/tenant/update`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+------------------------+-------------+---------------+-----------------------------------------+ -|| Name || Type || Required || Description | -+========================+=============+===============+=========================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+------------------------+-------------+---------------+-----------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -``POST .../api/1/tenant/update?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d`` - -.. code-block:: json - :linenos: - - { - "name" : "sample-tenant", - "verifyNewProfiles" : true, - "ssoEnabled": true, - "availableRoles" : [ - "APP_ADMIN", - "APP_USER" - ], - "attributeDefinitions" : [ - { - "name" : "firstName", - "metadata" : { - "label" : "First Name", - "type" : "TEXT", - "displayOrder" : 0.0 - }, - "permissions" : [ - { - "application" : "*", - "allowedActions" : [ - "*" - ] - } - ] - }, - { - "name" : "lastName", - "metadata" : { - "label" : "Last Name", - "type" : "TEXT", - "displayOrder" : 1.0 - }, - "permissions" : [ - { - "application" : "*", - "allowedActions" : [ - "*" - ] - } - ] - }, - { - "name" : "avatarLink", - "metadata" : { - "label" : "Avatar Link", - "type" : "TEXT", - "displayOrder" : 3.0 - }, - "permissions" : [ - { - "application" : "*", - "allowedActions" : [ - "*" - ] - } - ] - } - ] - } - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "name": "sample-tenant", - "verifyNewProfiles": true, - "availableRoles": [ - "APP_ADMIN", - "APP_USER" - ], - "ssoEnabled": true, - "attributeDefinitions": [ - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "firstName", - "metadata": { - "label": "First Name", - "type": "TEXT", - "displayOrder": 0.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "lastName", - "metadata": { - "label": "Last Name", - "type": "TEXT", - "displayOrder": 1.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "avatarLink", - "metadata": { - "label": "Avatar Link", - "type": "TEXT", - "displayOrder": 3.0 - }, - "defaultValue": null - } - ], - "id": "5926f218d4c6ad51e5e44f47" - } - ---------- -Responses ---------- - -+---------+----------------------+---------------------------------------------------------------+ -|| Status || Location || Response Body | -+=========+======================+===============================================================+ -|| 200 | | See example above. | -+---------+----------------------+---------------------------------------------------------------+ -|| 400 | | .. code-block:: json | -|| | | | -|| | | {"errorCode":"NO_SUCH_TENANT", "message":"No tenant with | -|| | | name \"sample-tenant\" found"} | -+---------+----------------------+---------------------------------------------------------------+ -|| 500 | | ``{ "message" : "Internal server error" }`` | -+---------+----------------------+---------------------------------------------------------------+ diff --git a/source/developers/projects/profile/api/tenant/verify_new_profiles.rst b/source/developers/projects/profile/api/tenant/verify_new_profiles.rst deleted file mode 100644 index ae4a701ee..000000000 --- a/source/developers/projects/profile/api/tenant/verify_new_profiles.rst +++ /dev/null @@ -1,142 +0,0 @@ -:is-up-to-date: True - -.. _crafter-profile-api-tenant-verifiy_new_profiles: - -=================== -Verify New Profiles -=================== - -Sets if new profiles for the specified tenant should be verified or not. - --------------------- -Resource Information --------------------- - -.. include:: /includes/profile-api-url-prefix.rst - -+----------------------------+-------------------------------------------------------------------+ -|| HTTP Verb || POST | -+----------------------------+-------------------------------------------------------------------+ -|| URL || ``/api/1/tenant/:name/verify_new_profiles`` | -+----------------------------+-------------------------------------------------------------------+ -|| Response Formats || ``JSON`` | -+----------------------------+-------------------------------------------------------------------+ - ----------- -Parameters ----------- - -+----------------+---------+--------------+------------------------------------------------------+ -|| Name || Type || Required || Description | -+================+=========+==============+======================================================+ -|| accessTokenId || String || |checkmark| || The access token ID of the application | -|| || || || making the call | -+----------------+---------+--------------+------------------------------------------------------+ -|| name || String || |checkmark| || The tenant's name | -+----------------+---------+--------------+------------------------------------------------------+ -|| verify || String || |checkmark| || True to verify new profiles through email, | -|| || || || false otherwise | -+----------------+---------+--------------+------------------------------------------------------+ - -------- -Example -------- - -^^^^^^^ -Request -^^^^^^^ - -.. code-block:: none - - POST .../api/1/tenant/sample-tenant/verify_new_profiles - -.. code-block:: none - - accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d - verify=true - - -^^^^^^^^ -Response -^^^^^^^^ - -``Status 200 OK`` - -.. code-block:: json - :linenos: - - { - "name": "sample-tenant", - "verifyNewProfiles": true, - "availableRoles": [ - "APP_ADMIN", - "APP_USER" - ], - "ssoEnabled": false, - "attributeDefinitions": [ - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "firstName", - "metadata": { - "label": "First Name", - "type": "TEXT", - "displayOrder": 0.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "lastName", - "metadata": { - "label": "Last Name", - "type": "TEXT", - "displayOrder": 1.0 - }, - "defaultValue": null - }, - { - "permissions": [ - { - "allowedActions": [ - "*" - ], - "application": "*" - } - ], - "name": "avatarLink", - "metadata": { - "label": "Avatar Link", - "type": "TEXT", - "displayOrder": 3.0 - }, - "defaultValue": null - } - ], - "id": "5926f6d9d4c650e226b03b61" - } - ---------- -Responses ---------- - -+---------+---------------------------------+----------------------------------------------------+ -|| Status || Location || Response Body | -+=========+=================================+====================================================+ -|| 200 || || See example above. | -+---------+---------------------------------+----------------------------------------------------+ -|| 500 || || ``{ "message" : "Internal server error" }`` | -+---------+---------------------------------+----------------------------------------------------+ diff --git a/source/developers/projects/profile/index.rst b/source/developers/projects/profile/index.rst index a6e22c546..538ed9e16 100644 --- a/source/developers/projects/profile/index.rst +++ b/source/developers/projects/profile/index.rst @@ -32,17 +32,28 @@ Java Doc -------- Crafter Profile's Java Doc is here: - - :javadoc_base_url:`profile/index.html` + +- :javadoc_base_url:`profile/index.html` + +.. _crafter-profile-api: -------- ReST API -------- +To view the Crafter Profile REST APIs: + +.. open_iframe_modal_button:: + :label: Open here + :url: ../../../_static/api/profile.html + :title: Engine API + +.. raw:: html -.. toctree:: - :maxdepth: 1 - :titlesonly: + or in a new tab + +| +| - api/index ------------- Configuration