Accessing APIs of SAP Intelligent Asset Management Solutions

Prerequisites

  • You have administrative privileges at the global account and the subaccount level.

  • You have subscribed to the SAP Intelligent Asset Management solution to be used within the subaccount.

Context

You need credentials to access APIs of the solution that you have subscribed. To obtain these credentials, you need to perform the following tasks:
  • Create an Organization : To use the subaccout, you must create an organization.

  • Allocate quota for business application: Before you can start using your application runtime, you need to manage your entitlements and add quotas to your subaccount. As a global account administrator, you have the privileges to allocate the required business application quota for the subaccount. Quota allocation enables distribution of the solution across subaccounts according to the project requirements.

  • Create a Space: A space is required to provide users with shared access to the solution.

  • Create a service instance and service key:

    Create a service instance to retrieve the credentials required to access APIs of the business application. After the service instance is created, generate the service key to get the client credentials.

    The following credential types are supported for all the SAP Asset Intelligent Network instances:
    • instance-secret: As the UAA only supports two secrets for one OAuth client, the secret is set during instance creation. This leads to using the same credential (the instance-credential) for all bindings. The secret is valid as long as the instance exists and can not be rotated.

    • binding-secret: The XSUAA is enhanced to support multiple secrets for the same OAuth client. These are referred as binding credentials. The secrets are structured as <bindingId>$<secret>. The secret is valid as long as the binding (or service key) exists. When it is deleted, the secret becomes invalid. This is the recommended approach for secret rotation.

    • x509: Service bindings with certificates.

By default all bindings have instance-secret as the credential types. However, if you want to change the credential type, you can provide the relevant parameters during binding creation. For example, for X509 credential-type, the following parameters can be provided during binding in json format:

Procedure

  1. Create an Organization using the substeps below:
    1. Open your global account in SAP BTP cockpit.
    2. Choose the required subaccount.

      The Overview page appears.

    3. Choose Enable Cloud Foundry in the Cloud Foundry block.

      The Create Cloud Foundry Organization screen appears with the recommended organization name.

    4. Use the recommended name or enter a new name for your organization.
    5. Choose Create.
  2. Allocate quota for business application using the substeps below:
    1. Open your global account in SAP BTP cockpit.
    2. In the navigation area, choose Entitlements and Entity Assignments.

      The entitlements page appears with the Subaccounts mode selected by default.

    3. From the dropdown box, select the subaccount.
    4. Choose Go.

      The solutions entitled for the subaccount is listed in a tabular format.

    5. Choose Entitlements at the global account level and assign it to respective sub-accounts.
      You can make the following updates:
      Action Steps
      Edit quota for a service plan Choose plus or minus to increase or decrease the service plan quota.
    6. Choose Save to update the changes and exit the edit mode.
  3. Create a space using the substeps below:
    1. Navigate to the subaccount.
    2. In the navigation area, choose Spaces.
    3. In the Spaces page, choose New Space.

      The New Space screen appears.

    4. Enter a name for the space.
    5. Choose Save.
      The space is listed in the subaccount.
    6. Choose the new space tile to access the space.
  4. Create a service instance and service key using the substeps below:
    1. In the navigation area, choose Service Marketplace.

      Based on the solutions that you have purchased, you can view one or more of the SAP Intelligent Asset Management tiles, for example, SAP Asset Intelligence Network, and so on.

    2. Choose the tile to access the Overview page of the solution.
    3. In the navigation area, choose Instances.
    4. In the instances page, choose New Instance.

      The instance creation wizard appears.

    5. Choose the service plan applicable for the subscribed solution.
    6. Choose Next to proceed without entering any details to the optional wizard screens Specify Parameters and Assign Application.
    7. On the Confirm screen, enter a name for the instance.
    8. Choose Finish.
    9. Choose the new instance.

      The service instance page appears.

    10. In the navigation area, choose Service Keys.
    11. In the service keys page, choose Create Service Key.
    12. In the Create Service Key screen, enter a name for the service key.
    13. Choose Save.
      A service key is generated. The client credentials required are mentioned in the table below:
      Client Credentials Parameters
      Client ID uaa.clientid
      Client Secret uaa.clientsecret
      Token URL uaa.url + ‘/oauth/token’
      Application URL endpoints.<application>-service.