Skip to Content
0

Application Enablement: set thing customer detail

Mar 27 at 10:58 AM

25

avatar image

Working with Object Authorization I found that I can define a capability to filter things by Customer; in the thing model there is no customer field, how can I define the customer related to a thing?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Christian Schuerings
Mar 27 at 01:23 PM
0

Hi Luca,

one can assign a customer to a thing via an API call. Prerequisite is that you already created a person (again via api).

First, fetch the current metadata for a thing /Things('<thingID>'), then add the _customer property with the id of the person and update the thing with a POST.

{
    "_externalId": "ABCXSeries001",
    "_name": "ABCXSeries",
    "_description": {
        "en": "Car Model ABC  xSeries 001"
    },
    "_thingType": [
        "core.automobiles:ABCXSeries"
    ],
    "_location": "BD622E3DA6A14C4D87CDEC935B000001",
    "_customer": "4D622E3DA6A14C4D87CDEC935B000001",    
    "_objectGroup": "473BB1AFC4A4415791543C3F2CFDD295"
}

See:
https://help.sap.com/viewer/350cb3262cb8496b9f5e9e8b039b52db/latest/en-US/ba9aa876c403455c834b016d701e05a4.html

Regards

Christian

Share
10 |10000 characters needed characters left characters exceeded