Skip to main content

πŸ’» Your Apps settings for a perfect fit

The term Application in Cryptr is for a single-page application that executes on a browser. It could be scoped globally to your own domain, or to a specific Organization.

note

When you create a new application, Cryptr generate for you a client_id. This is for security reasons, a unique identifier for your end users authentication via this specific authentification.

The Application type​

Each new application is by default globally accessible from all you organization users directories. However you can scope the access to a specific organization with the organization_domain_scope. To do that, you need to specify an Organization domain which is generated from its name during its creation. Each authentication of end users from this dedicated application will be limited to its specific organization.

ATTRIBUTES​

__domain__ STRING​

__database__ STRING​

__managed_by__ STRING​

__access__ STRING​

__type__ STRING​

name STRING​

The name of your application, a label to help you to understand which application is about.


description STRING​

Your own custom information about the app.


allowed_redirect_urls ARRAY:URL​

allowed_origins_cors ARRAY:URL​

allowed_logout_urls ARRAY:URL​

application_type ENUM​

default_web_origin STRING​

default_origin_cors STRING​

default_logout_url STRING​

default_redirect_uri_after_login STRING​

default_redirect_uri_after_logout STRING​

client_id UUID​

Alias for the id. Usefull for authentication.


id UUID​

Immutable identifier in the Universal Unique Identifier (UUID) format.


inserted_at STRING​

Insertion date time


updated_at STRING​

Updated date time


EXAMPLE​
An Application type

{
"__domain__": "misapret",
"__database__": "sandbox",
"__managed_by__": "misapret",
"__access__": "all_organizations_of:misapret",
"__type__": "Application",
"allowed_origins_cors": ["https://app.misapret.com/"],
"allowed_redirect_urls": ["https://app.misapret.com/account", "https://app.misapret.com/welcome"],
"allowed_logout_urls": ["https://app.misapret.com/bye"],
"application_type": "react",
"client_id": "misapret.misapret.sandbox:d6fce3c1-5d21-4643-ac1e-8bc991c08c49",
"default_logout_url": "https://app.misapret.com/bye",
"default_origin_cors": "https://app.misapret.com/",
"default_redirect_uri_after_login": "https://app.misapret.com/account",
"default_redirect_uri_after_logout": "https://app.misapret.com/bye",
"default_web_origin": "https://app.misapret.com/account",

"description": "Everything to deal with bank",
"name": "App of Misapret"
}

Create an Application​

Creates a new Application type with a name, then get locality.

Query

curl --request POST 'https://${YOUR_CRYPTR_SERVICE_URL}/api/v2/org/:domain/applications' \
--header 'Authorization: Bearer your_api_key_generated_token' \
--header 'Content-Type: application/json' \
--data-raw '{
"allowed_logout_urls": ["http://localhost:3000"],
"allowed_origins_cors": ["http://localhost:3000"],
"allowed_redirect_urls": ["http://localhost:3000"],
"allowed_web_origins": ["http://localhost:3000"],
"application_type": "react",
"name": "My front app name"
}'

PARAMETERS​

allowed_origins_cors []URL REQUIRED​

allowed_redirect_urls []URL REQUIRED​

allowed_logout_urls []URL REQUIRED​

application_type ENUM REQUIRED​

description STRING OPTIONAL​

name STRING REQUIRED​

default_origin_cors STRING OPTIONAL​

default_web_origin STRING OPTIONAL​

default_logout_url STRING OPTIONAL​

RETURNS​

Returns an Application if the creation succeeded. Returns an error if create parameters are invalid (e.g. specifying an invalid code or an invalid source).

Retrieve an Application​

Fetch an Application by its given id.

note

When you fetch an Application, the environment of your API key determine where is stored your application. For exemple your application in sandbox is fetched if and only if this resource is stored in sandbox. You can't fetch an Application from the Production environment with this API KEY, you need an API KEY dedicated to this environment.

Query

curl https://${YOUR_CRYPTR_SERVICE_URL}/api/v2/org/:domain/applications/:client_id

PARAMETERS​

No parameters.

RETURNS​

Returns the Application for a valid identifier. If it’s for a deleted Application, a subset of the Application’s information is returned, including a deleted property that’s set to true.

Update an Application​

Fetch an Application by its given id.

note

When you fetch an Application, the environment of your API key determine where is stored your application. For exemple your application in sandbox is fetched if and only if this resource is stored in sandbox. You can't fetch an Application from the Production environment with this API KEY, you need an API KEY dedicated to this environment.

Query

curl 'https://${YOUR_CRYPTR_SERVICE_URL}/api/v2/org/:domain/applications/:client_id' \
--request PUT \
--data-raw '{
"application_type": "angular"
}'

PARAMETERS​

No parameters.

RETURNS​

Returns the Application updated for a valid identifier.

List all Applications​

Returns a list of your Applications. The Applications are returned sorted by creation date, with the most recent applications appearing first.

Query

curl https://${YOUR_CRYPTR_SERVICE_URL}/api/v2/org/:domain/applications

PARAMETERS​

page INTEGER​

Precise the page of your listing, see how to paginate the Cryptr API.


per_page INTEGER​

Precise the size of the pages of the pagination of the list. See how to paginate the Cryptr API.


RETURNS​

A dictionary with a data property that contains an array of up to limit Applications. Each entry in the array is a separate Application type. If no Applications are available, the resulting array will be empty. This request should never return an error.