Skip to main content
Version: v5.0

Application

Get Applications for Current User

Endpoint

GET /passportsvc/api/v1/apps

Request

Query parameters

ParameterTypeDescriptionRequired
_nameStringFilter by name of the applicationOptional
_userTypeStringFilter by user typeOptional
_shortNameStringFilter by short nameOptional
queryStringWild card search on name, short name and description(For ex: ?query=xyz)Optional
_offsetNumberEnter an offset value for the pagination response.Optional
_pageSizeNumberEnter a number for the ammount of applications you want to return per page.Optional
_orgIdStringFilter by Organization idOptional

Response

Body

{
"_offset": 0,
"_pageSize": 1,
"_total": 1,
"_list": [
{
"_id": "0f02c817-8655-423e-9d22-5439187078f9",
"_authorizedGrantTypes": "implicit,authorization_code,refresh_token",
"_name": "digitaltwin",
"_shortName":"digitaltwin",
"_userType": "dt_app",
"_orgId": "e0c3e749-f625-4b5b-8145-df2d0a7c1e50",
"_redirectUris": "https://xxxxxxx.com/digitaltwin",
"_namespaces": [
"digitaltwin_1f387e6"
],
"_whitelistedApps":[
"917960ae-2b64-4344-868c-64ee88316688"
],
"_metadata": {
"_createdAt": 1624953531918
}
}
]
}

Get Application by Id

Endpoint

GET /passportsvc/api/v1/apps/{id}

Request

Query parameters

ParameterTypeDescriptionRequired
withConfigsStringReturn Application Config withConfigs or notOptional

Path parameters

ParameterTypeDescriptionRequired
idStringThe application's id.Required

Response

Response codes

CodeDescription
200Success
404Not Found

Body

{
"_id": "0f02c817-8655-423e-9d22-5439187078f9",
"_authorizedGrantTypes": "implicit,authorization_code,refresh_token",
"_name": "digitaltwin",
"_shortName":"digitaltwin",
"_userType": "company_app",
"_orgId": "e0c3e749-f625-4b5b-8145-df2d0a7c1e50",
"_redirectUris": "https://apps.xxxxx.com/digitaltwin",
"_namespaces": [
"digitaltwin_1f387e6"
],
"_whitelistedApps":[
"917960ae-2b64-4344-868c-64ee88316688"
],
"_metadata": {
"_createdAt": 1624953531918
},
"_configs": {
"usergroups.limit": "5",
"workspaces.limit": "3"
}
}

Create Application

Creates an application with the parameters you pass.

Endpoint

POST /passportsvc/api/v1/apps/

Authorization

For this request, get the access token using client_credentials authentication flow.

Request

Body parameters

ParameterTypeDescriptionRequired
_idApplication Id. UUID format, will be generated in the backend if not providedOptional
_nameNumberPass the application's name.Required
_appOwnerStringPass the email address of the user you want to have all permissions for the applications. The app owner can provide access to other users and specify the namespace for the application.Required
_redirectUrisStringPass a comma separated string with redirect URIs to receive the access_token after a successful authentication.Required
_userTypeStringPass a string that defines the application's type. Use this label to identify resources of the same type.Optional
_shortNameStringGive the application a shorter name that will be unique across the platform. If you do not pass a value, _name is the short name by defaultOptional
_whitelistedAppsArray <String>Pass an array of app ids for the apps you want to whitelist for your application.Optional
_orgIdStringOrganization IdRequired
_loginThemeStringLogin Theme supported by the platformOptional
Body example
{
"_name": "DigitalTwinCopy",
"_appOwner": "dev21@mailinator.com",
"_userType":"web_app",
"_shortName":"digitaltwin",
"_redirectUris": "https://apps.xxxxxx.com",
"_orgId": "e0c3e749-f625-4b5b-8145-df2d0a7c1e50",
"_whitelistedApps":[
"917960ae-2b64-4344-868c-64ee88316688"
],
"_configs": {
"usergroups.limit": "5",
"workspaces.limit": "3"
}
}

Response

Response data example

{
"_id": "0f02c817-8655-423e-9d22-5439187078f9",
"_authorizedGrantTypes": "implicit,authorization_code,refresh_token",
"_name": "digitaltwin",
"_shortName":"digitaltwin",
"_userType": "company_app",
"_redirectUris": "https://neo4j-dev.xxxxxx.com/digitaltwin",
"_secret": "jO2xWWeTd18BiLN7ly8ulhLgM42u4UKg6xpgBdoYzooX2XANVmjKBAOEIzP8TPU7",
"_orgId": "e0c3e749-f625-4b5b-8145-df2d0a7c1e50",
"_namespaces": [
"digitaltwin_1f387e6"
],
"_whitelistedApps":[
"917960ae-2b64-4344-868c-64ee88316688"
],
"_metadata": {
"_createdAt": 1624953531918
}
}

Edit Application

Endpoint

PUT /passportsvc/api/v1/apps/{id}

Request

Path parameters

ParameterTypeDescriptionRequired
idStringThe application's idRequired

Body parameters

ParameterTypeDescriptionRequired
_nameNumberPass a new name for the application.Required
_userTypeStringPass a new userType, which defines the application's type. Use this label to identify resources of the same type.Optional
_authorizedOriginsStringReplace the _authorizedOrigins value with a new comma separated string with the authorized origin URLs you want.Required
_redirectUrisStringReplace the _redirectUris value with a new comma separated string with the redirect URIs.Required
_whitelistedAppsArray<String>Replace the _whitelistedApps array with an updated array of app ids for the apps you want to whitelist.Optional
_loginThemeStringReplace the _loginTheme. The user interface of login page can be switched. Please ensure theme name is deployed before the switch.Optional
_homeStringApplication home page urlOptional
Body example
{
"_name": "DigitalTwinCopy",
"_userType":"web_app",
"_authorizedOrigins":"https://general-dev.xxxxxx.com,https://www.postman.com",
"_redirectUris":"https://general-dev.xxxxxx.com/digitaltwin,https://www.postman.com/oauth2/callback",
"_whitelistedApps":[
"917960ae-2b64-4344-868c-64ee88316688",
"4cf8754d-a5ea-4629-8c92-af73f8122583"
],
"_loginTheme":"reddish"
}

Response

Response codes

CodeDescription
200Success
400Bad Request
404Not Found

Body

{
"_id": "e177ec61-49da-415f-8b90-4104c2fd5efd",
"_authorizedGrantTypes": "implicit,authorization_code,refresh_token",
"_name": "DigitalTwinCopy",
"_shortName":"digitaltwin",
"_userType": "web_app",
"_redirectUris": "https://general-dev.xxxxxx.com/digitaltwin,https://www.postman.com/oauth2/callback",
"_authorizedOrigins": "https://general-dev.xxxxxx.com,https://www.postman.com",
"_namespaces": [
"DigitalTwinCopy_MUa4NhN7"
],
"_orgId": "e0c3e749-f625-4b5b-8145-df2d0a7c1e50",
"_whitelistedApps":[
"917960ae-2b64-4344-868c-64ee88316688",
"4cf8754d-a5ea-4629-8c92-af73f8122583"
],
"_metadata": {
"_createdAt": 1622731019804,
"_updatedAt": 1622731712559,
"_updatedById": "e0dbfe49-20e7-4d51-9a90-5d458bbd9630"
},
"_loginTheme":"reddish"
}

Delete App

DELETE /passportsvc/api/v1/apps/{id}

Request

Path parameters

ParameterTypeDescriptionRequired
idStringThe application's idRequired

Response

Response codes

CodeDescription
204No Content
404Not Found