Skip to Content

Application Enablement: set thing customer detail

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 27 at 01:23 PM

    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

    Add comment
    10|10000 characters needed characters exceeded