Application
Get Applications for Current User#
Endpoint#
GET /passportsvc/api/v1/appsRequest#
Query parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
_name | String | Filter by name of the application | Optional |
_userType | String | Filter by user type | Optional |
_shortName | String | Filter by short name | Optional |
query | String | Wild card search on name, short name and description(For ex: ?query=xyz) | Optional |
_offset | Number | Enter an offset value for the pagination response. | Optional |
_pageSize | Number | Enter a number for the ammount of applications you want to return per page. | Optional |
_orgId | String | Filter by Organization id | Optional |
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#
| Parameter | Type | Description | Required |
|---|---|---|---|
withConfigs | String | Return Application Config withConfigs or not | Optional |
Path parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | The application's id. | Required |
Response#
Response codes#
| Code | Description |
|---|---|
200 | Success |
404 | Not 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#
| Parameter | Type | Description | Required |
|---|---|---|---|
_name | Number | Pass the application's name. | Required |
_appOwner | String | Pass 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 |
_redirectUris | String | Pass a comma separated string with redirect URIs to receive the access_token after a successful authentication. | Required |
_userType | String | Pass a string that defines the application's type. Use this label to identify resources of the same type. | Optional |
_shortName | String | Give 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 default | Optional |
_whitelistedApps | Array <String> | Pass an array of app ids for the apps you want to whitelist for your application. | Optional |
_orgId | String | Organization Id | Required |
Body example#
{ "_name": "DigitalTwinCopy", "_appOwner": "[email protected]", "_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#
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | The application's id | Required |
Body parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
_name | Number | Pass a new name for the application. | Required |
_userType | String | Pass a new userType, which defines the application's type. Use this label to identify resources of the same type. | Optional |
_authorizedOrigins | String | Replace the _authorizedOrigins value with a new comma separated string with the authorized origin URLs you want. | Required |
_redirectUris | String | Replace the _redirectUris value with a new comma separated string with the redirect URIs. | Required |
_whitelistedApps | Array<String> | Replace the _whitelistedApps array with an updated array of app ids for the apps you want to whitelist. | Optional |
_loginTheme | String | Replace the _loginTheme. The user interface of login page can be switched. Please ensure theme name is deployed before the switch. | Optional |
_home | String | Application home page url | Optional |
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#
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
404 | Not 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#
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | The application's id | Required |
Response#
Response codes#
| Code | Description |
|---|---|
204 | No Content |
404 | Not Found |