Person
A Person represents a business partner of type person that is assigned to one tenant.
Persons are used to model representations of human beings who are involved in designing, operating, or monitoring an IoT services infrastructure. For persons, SAP provides the following predefined roles:
-
Employee
-
Contact person
It is obvious that these predefined roles are very abstract and generic. For productive use, it might be recommendable to define additional roles that describe the responsibilities of a particular person more precisely. Here is a list of some examples of potential roles for persons involved in an IoT scenario:
-
System administrator
-
Machine operator
-
Quality manager
-
Service technician
The tenant is an attribute of the person that must be provided upon creation of a person. That is, to create a person with a reference to a given tenant, the tenant name must be valid, and the tenant must already exist in the system.
To identify a person, the familyName, the givenName, and the emailAddress attributes are required. For the name fields, it is obvious that there can be no unique values required, since people with the same name are a normal everyday phenomenon. Given that, of the three required fields only the emailAddress attribute must be unique within the scope of the tenant to which the person belongs.
If a person is deleted, the system automatically deletes all assigned relationships between that person and other objects.
Prerequisites
-
Formal description: https://<server address>[:<port number>][/path]/Persons
- Example for a base URI in a cloud foundry environment: https://business-partner.cfapps.eu10.hana.ondemand.com/Persons
Methods
| HTTP Method | Action | URI | Scopes |
|---|---|---|---|
| POST | Create a Person | /Persons |
<bp>.c <bp>.tenant.r |
| GET | Read a Person | /Persons('<ID>') |
<bp>.c <bp>.tenant.r |
| GET | Read all Persons | /Persons |
<bp>.r <bp>.tenant.r |
| GET | Read all Matching Persons | /Persons |
<bp>.r <bp>.tenant.r |
| PUT | Update a Person | /Persons('<ID>') |
<bp>.u <bp>.r <bp>.tenant.r |
| DELETE | Delete a Person | /Persons('<ID>') |
<bp>.r <bp>.d <bp>.tenant.r |
Payload
Format: JSON
For PUT, POST, and GET requests, only the media type JSON is supported. The JSON for these methods has the following structure:
{"basicData" : {
"businessPartnerID": { "type": "string", "maxLength": 32 },
"tenant" : { "type": "string", "maxLength": 36, "required": true },
"etag" : { "type": "string" }
},
"personName": {
"formOfAddress" : { "type": "string", "maxLength": 10 },
"formOfAddressDescription": { "type": "string", "maxLength": 30, "readOnly" : true },
"familyName" : { "type": "string", "maxLength": 255, "required": true },
"additionalFamilyName": { "type": "string", "maxLength": 255 },
"familyNamePrefix": { "type": "string", "maxLength": 10 },
"middleName": { "type": "string", "maxLength": 255 },
"givenName": { "type": "string", "maxLength": 255, "required": true },
"initials": { "type": "string", "maxLength": 10 },
"academicTitle": { "type": "string", "maxLength": 4 },
"academicTitleDescription": { "type": "string", "maxLength": 60, "readOnly" : true },
"additionalAcademicTitle": { "type": "string", "maxLength": 4 },
"additionalAcademicTitleDescription" : { "type": "string", "maxLength": 60, "readOnly" : true }
},
"communicationData" : {
"emailAddress": { "type": "string", "maxLength": 255, "required": true },
"mobileDestinationLocation": { "type": "string", "maxLength": 2 },
"mobilePhoneNumber": { "type": "string", "maxLength": 127 },
"landlineDestinationLocation": { "type": "string", "maxLength": 2 },
"landlinePhoneNumber": { "type": "string", "maxLength": 127 },
"landlinePhoneNumberExtension": { "type": "string", "maxLength": 127 },
"streetName": { "type": "string", "maxLength": 255 },
"houseNumber": { "type": "string", "maxLength": 10 },
"cityName": { "type": "string", "maxLength": 255 },
"postalCode": { "type": "string", "maxLength": 10 },
"country": { "type": "string", "maxLength": 2 },
"countryDescription": { "type": "string", "maxLength": 60, "readOnly" : true },
"region": { "type": "string", "maxLength": 3 },
"regionDescription": { "type": "string", "maxLength": 60, "readOnly" : true }
},
"objectGroup": { "type": "string", "maxLength": 32, "required": "true" },
"externalIDs": {
value: [{ "type": "string", "maxLength": 60, "required": "false"}]
}
}
External ID
In the payload, there is a special field that needs some additional explanation: externalID. This field is intended to hold an identifying string other than the purely technical businessPartnerID field, which the system needs for reasons of database consistency. In contrast to that, the externalID field can be used for providing an additional semantic identifier that users may be accustomed to from their daily business experience. For a person, this field could be used to hold the employee ID that a company has assigned to that person during the hiring process.
Access Authorization for Persons
Objects of type Person are subject to the instance-based authorization concept that is implemented in SAP IoT. For more information, see Object Instance-Based Authorization. To grant access to a Person instance, a capability has to be derived from the predefined CapabilityType object for persons. For more information on the CapabilityType payload needed for this purpose, see Payload of CapabilityType "Person".