App Workflows

The HERE platform allows creating apps and managing them with other apps.

Apps access platform data or pipelines through the REST API, CLI, or one of the platform libraries.

For simple and secure authentication of your application with the platform, you can define two sets of credentials per app:

  • Access keys
  • API keys (recommended for web-based apps)

As an app manager, you can enable or disable the app, grant app manager access to other users, apps, and groups, control app credentials, and more.

For more information on apps, see Get Credentials and Manage Apps.

The OLP CLI provides tools for managing apps, such as:

For more information, see App Commands.

Create a New App

To create and manage apps through the OLP CLI, first allow your app to create new apps:

  • Go to the portal's Apps section, select your app, click More, click the Enable app creation button.

Follow the steps below to create two apps.

  1. Run the app create command to create first app.

    olp app create firstApp
    
  2. Create another app that will be granted manager permissions for the firstApp.

    olp app create managerApp
    

    To verify that the apps have been created successfully, use the app list command.

    olp app list
    

    The command displays the following results.

    
       HRN                                                                 name
       hrn:here:account::myrealm:app/manager-app-id                        managerApp
       hrn:here:account::myrealm:app/first-app-id                          firstApp
       

Note

myrealm is a placeholder for the ID of your organization.

Save these HRNs to use below.

Show Information about the App

To get information about the app, use app show.


olp app show hrn:here:account::myrealm:app/manager-app-id

The command displays the following results.


   id                       manager-app-id
   name                     managerApp
   description
   hrn                      hrn:here:account::myrealm/manager-app-id
   app creation             disabled
   status                   active

Save id to use bellow.

Add a Manager to the App

Run the app manager add command to allow managerApp to manage firstApp.


olp manager add hrn:here:account::myrealm:app/first-app-id --app manager-app-id

Note

manager-app-id is the ID we saved in the previous step.

The command displays the following results.


Granted manager access for the app manager-app-id to the application hrn:here:account::myrealm:app/first-app-id

Create an Access Key for the App

To create an access key for the app that will be used further in this workflow, use the app access key create command.

Linux
Windows
olp app key access create hrn:here:account::myrealm:app/manager-app-id > app-manager-credentials.properties
olp app key access create hrn:here:account::myrealm:app/manager-app-id 1> app-manager-credentials.properties

The app credentials will be stored in app-manager-credentials.properties file.

Show Information about the Access Key

To get information about the access key, use the access key list command.


olp app key access list hrn:here:account::myrealm:app/manager-app-id --json

The command displays the following results.


{"keys": [{
    "accessKeyId": "access-key-id",
    "clientId": "client-id",
    "accessKeyHrn": "hrn:here:account::myrealm:accesskey/access-key-id",
    "clientHrn": "hrn:here:account::myrealm:app/manager-app-id",
    "createdTime": 1595857224199,
    "enabled": true
}]}

Save accessKeyHrn to use bellow.

Update the App Using the Access Key

To update the details of the app, specify the app-manager-credentials.properties file from the previous chapter.

The command below shows how to change the description of the app through the manager app. To see the update immediately, use the --json flag.

Linux
Windows
olp app update hrn:here:account::myrealm:app/first-app-id \
    --credentials app-manager-credentials.properties \
    --description "Updated description for the first app" \
    --json
olp app update hrn:here:account::myrealm:app/first-app-id ^
    --credentials app-manager-credentials.properties ^
    --description "Updated description for the first app" ^
    --json

The command displays the following results.


{
    "appCreationEnabled": false,
    "hrn": "hrn:here:account::myrealm:app/first-app-id",
    "appId": "first-app-id",
    "name": "firstApp",
    "description": "Updated description for the first app",
    "status": "active"
}

Remove the Access Key

To remove the access key created above, use the access key remove command.

Linux
Windows
olp app key access delete hrn:here:account::myrealm:app/manager-app-id \
    hrn:here:account::myrealm:accesskey/access-key-id
olp app key access delete hrn:here:account::myrealm:app/manager-app-id ^
    hrn:here:account::myrealm:accesskey/access-key-id

Note

hrn:here:account::myrealm:accesskey/access-key-id is the access key HRN we saved in the previous step.

The command displays the following results.


Access key hrn:here:account::myrealm:accesskey/access-key-id has been deleted.

Remove the App Manager

To remove the manager from the app, use the manager remove command.


olp app manager remove hrn:here:account::myrealm:app/first-app-id  --app manager-app-id

The command displays the following results.


App hrn:here:account::myrealm:app/manager-app-id has been removed as a manager.

Delete the App

To delete the app, use the app delete command.


olp app delete hrn:here:account::myrealm:app/manager-app-id
olp app delete hrn:here:account::myrealm:app/first-app-id

The commands display the following results.


Application hrn:here:account::myrealm:app/manager-app-id has been deleted.
Application hrn:here:account::myrealm:app/first-app-id has been deleted.

To get a full list of available commands, enter olp app --help.

results matching ""

    No results matching ""