CapabilityType

A CapabilityType serves as a template for a Capability.

CapabilityType objects provide the definition of a certain capability that can be granted to a user with respect to certain objects. The relation between a CapabilityType and a Capability is similar to the relation between a class and an object instance in object-oriented programming languages. That is, the essential properties of a given Capability are defined by the CapabilityType from which it is derived.

In SAP IoT, CapabilityTypes are treated as a very low-level kind of business content. That is, there are hard-coded, predefined CapabilityTypes available that are delivered by SAP and that can neither be changed nor extended by customers. However, the number of CapabiiltyTypes may grow in future releases. The following CapabilityTypes are currently available:

  • Thing
  • Organization
  • Person

Base URI:

  • Formal description: http://<server address>[:<port number>][/path]/CapabilityTypes
  • Example for a base URI in a cloud foundry environment: http://authorizations.cfapps.eu10.hana.ondemand.com/CapabilityTypes

Permissions: <auth>.r

Methods

HTTP Method Action URI Scopes
GET Read a CapabilityType /CapabilityTypes('<ctID>') <auth>.r
GET Read all CapabilityTypes /CapabilityTypes <auth>.r

Structure

Unlike almost all of the other services in SAP IoT, CapabilityTypes do not appear in the persistence layer. This is due to their hardcoded nature, which leads to a mere transient usage with no representation in the database.

However, the hardcoded internal structure of the service can of course be described. It consists of the following parts:

Field Explanation
Name Description
ID Unique identifier for the capability type. It matches the following pattern: FFFFFFFFFF********FFFFFFFFFF****. Here, the asterisks used as placeholder elements ("*") are to be replaced by a unique hexadecimal code, and they are reserved for capability types shipped by SAP. The values for these predefined capability types are as follows:
  • Person:

    FFFFFFFFFF00000000FFFFFFFFFF0001

  • Organization:

    FFFFFFFFFF00000000FFFFFFFFFF0002

  • Thing:

    FFFFFFFFFF00000000FFFFFFFFFF0003

Name

Semantic identifier for the capability type. These names are:

  • thing:thing
  • bp:organization
  • bp:person
Actions

A set of actions that are available for a particular type. Currently the following actions are supported:

  • Read
  • Write
  • Delete
Vocabulary The set of available fields and their respective database entity. Only fields with a 1:1 relationship are allowed. The main source is the respective Databasetable or View underlying the "Get all" REST service. The Vocabulary has its own package were the respective classes with all needed methods are implemented.

With the field structure given above, the payload structure of CapabilityType service varies depending on the particular type in question. Here, not only the predefined field values for ID and Name are different. In addition, the structure of the Vocabulary field is type-specific and results in a very complex payload structure. Because of that, we have outsourced the payload into three separate topics. For more information, see the Related Information section at the bottom of this topic.