Enricher Authorization

Overview

The Enricher Authorization service provides a REST interface that allows you to manage the metamodel, and support both enricher and adapter registration.

The service helps you to:

  • Register new enrichers and adapters
  • Validate enricher permissions
  • Manage tenant registration and permissions for SAP Hybris Profile components

For more information about the full scope of the service actions, see the Enricher Authorization API Console.

Currently, external developers are not authorized to call enricher registration endpoints. To register a new enricher, request permission from a system administrator, or create a support request that includes the enricher's ID and the payload in the form of a JSON file. When you submit the request, a system administrator registers your enricher. For more details about the registration JSON format, see Enricher registration.


API Reference

/tenants/{tenant}/schemas

/tenants/{tenant}/schemas

get

Returns schemas of enrichers to which given tenant is subscribed. Requires a hybris.profile_metamodel_view scope

/schemas

/schemas

get

Returns all schemas defined in metamodel database. Requires a hybris.profile_metamodel_view scope

/schemas/{schema}

get

Returns schema details. Requires a hybris.profile_metamodel_view scope

/extensions

/extensions/contextAdapters

Context adapter management endpoint

get

Returns context adapters owned by tenant that makes an api call and all public context adapters. Requires a hybris.profile_metamodel_view scope

/extensions/contextAdapters/{adapterId}/{version}

get

Returns information about registered context adapter. Requires a hybris.profile_metamodel_view scope

delete

Unregisters context adapter in Profile system. Requires a hybris.profile_metamodel_manage scope.

put

Register context adapter in Profile system. The registration updates metamodel database. Requires a hybris.profile_metamodel_manage scope.

/extensions/contextAdapters/{adapterId}/{version}/subscribedBy/{tenant}

Management of context adapters subscriptions

put

Links context adapter to the specified tenant. Header hybris-client must match adapterId. Requires a hybris.profile_metamodel_manage scope.

delete

Disables context adapter for the specified tenant. Header hybris-client must match adapterId. Requires a hybris.profile_metamodel_manage scope.

/extensions/enrichers

Enricher management endpoint

get

Returns enrichers owned by tenant that makes an api call and all public enrichers. Requires a hybris.profile_metamodel_view scope

/extensions/enrichers/{enricherId}/{version}

get

Returns information about registered enricher. Requires a hybris.profile_metamodel_view scope

delete

Unregister enricher in Profile system. Requires a hybris.profile_metamodel_manage scope.

put

Register enricher in Profile system. The registration updates metamodel database and creates single topic with name "stork.dispatcher." + enricherId. Requires a hybris.profile_metamodel_manage scope.

/extensions/enrichers/{enricherId}/{version}/subscribedBy/{tenant}

Management of enricher subscriptions

put

Enables enricher for the specified tenant. Header hybris-client must match enricherId. Requires a hybris.profile_metamodel_manage scope.

delete

Disables enricher for the specified tenant. Header hybris-client must match enricherId. Requires a hybris.profile_metamodel_manage scope.


Useful information

The following topics are helpful for registering a new enricher with SAP Hybris Profile.


Schema parts description

Schema parts

A schema is a definition that describes the data stored in SAP Hybris Profile. Events stored under specific schemas can trigger enrichers, which introduce changes to the Profile graph, for example by creating, updating, or deleting nodes or relations. Schemas describe the nodes and relations to which enrichers write. During the enricher registration process, you must define the schemas to which your enricher writes.

The following sections describe how schemas are built.

Glossary

  • messageClass - Defines the type of message, which you can associate with a node, relation, context, or profile document.
  • start_nodetype - An entity that represents the start node (used to create a relation schema).
  • end_nodetype - An entity that represents the end node (used to create a relation schema).
  • relationshipType - A placeholder in the Secured Graph API.
  • namespace - A placeholder in the Secured Graph API.
  • nodeType - A placeholder in the Secured Graph API.

Global prefix

The schema is built as a URI. It consists of a global prefix, which you can omit, and the metamodel destination. For example: https://api.beta.yaas.io/metamodel/v1/nodes/commerce/Session.

The global prefix is the address of the service to which a particular schema belongs, for example: https://api.beta.yaas.io/metamodel/v1.

The service accepts schemas with and without a global prefix, but it always returns schemas with a global prefix.

Example of a node schema

  • nodes/commerce/Product

Parts of a graph node schema

messageClassnamespacenodeType
nodescommerceProduct

Example of a node property schema

  • nodes/commerce/Product/name

Parts of a graph node property schema

messageClassnamespacenodeTypepropertyName
nodescommerceProductname

Example of a relation schema

  • relations/commerce/Session/commerce/Product/commerce/VIEWED

Parts of a graph relation schema

messageClassnamespacestart_nodetypenamespaceend_nodetyperelationship_namespacerelationshipType
relationscommerceSessioncommerceProductcommerceVIEWED

Example of a relation property schema

  • relations/commerce/Session/commerce/Product/commerce/VIEWED/count

Parts of a graph relation property schema

messageClassnamespacestart_nodetypenamespaceend_nodetyperelationship_namespacerelationshipTypepropertyName
relationscommerceSessioncommerceProductcommerceVIEWEDcount

Example of a context schema

Context schemas define the data that enters SAP Hybris Profile from a storefront and is stored in the Context service.

  • context/commerce/AddedToCart

Parts of a context schema

messageClassnamespacecontextType
contextcommerceAddedToCart

Examples of profile document schemas

Profile document schemas reflect the structure of the profile document.

Sample profile document

{
  "insights": {
    "lastFunnelLevel": 6
  }
}

For the preceding document, you can create the following schemas:

  • profiles/insights
  • profiles/insights/lastFunnelLevel


Naming Conventions

The naming conventions described in this section were introduced to maintain conformity and stability in the graph data:

Having a pre-defined structure, all schemas consist of specific parts discussed in the Schema parts description section. Three schema parts that are always required, per the standard schema structure, are messageClass, namespace, and nodeType. For example, nodes, core, and Product, respectively.

Naming of message classes:

The messageClass is the first schema part that comes after the global prefix. There are three available message classes that define the message type described by a given schema: nodes, relations, and context.

Naming of namespaces

The namespace appears in the schema name before the node or relationship type and reflects the general area from which the node or relationship originates. In the schema fragments commerce/Interest and marketing/Interest, the node type is Interest and the namespaces that precede the Interest node, commerce and marketing, identify the originating context for the Interest node type.

Requirements:

  • American English
  • lowercase
  • Alphanumeric characters
  • Underscore character (_) as a delimiter
  • Example: name_space

Naming of node types

The nodeType schema part defines the type of a given node.

Requirements:

  • American English nouns
  • PascalCase
  • Alphanumeric characters, special characters not allowed
  • Examples: Product, BrandAffinity, LoyaltyStatistics

Naming of relationship types

The relationshipType schema part defines the type of a given relationship.

Requirements:

  • American English verbs
  • UPPERCASE
  • Alphanumeric characters
  • Underscore character (_) as a delimiter
  • Examples: VIEWED, HAS, IS_IN, BELONGS_TO

Naming of context types

The contextType schema part defines the type of context.

Requirements:

  • American English
  • PascalCase
  • Alphanumeric characters, special characters not allowed
  • Example: AddedToCart

Naming of property names

The propertyName schema part defines the name of the node or relationship property.

Requirements:

  • American English
  • camelCase
  • Alphanumeric characters
  • Examples: score, weight, viewCount

Reserved property names

The system ignores your enricher's attempts to write the reserved properties. However, your enricher can read these properties.

Do not create properties with any of these names:

  • created: The Unix timestamp that indicates when the node or relationship was initially created
  • consentreference: The consent reference of the user who triggers the creation of the relationship or node
  • fid: The "from ID", or the internal ID of the relationship's start node, reserved for relationships only
  • id: The unique identifier of the node or relationship that the system automatically creates and assigns
  • label: The node type
  • relationType: The relationship type
  • schema: The schema of the node or relationship
  • tenant: The identifier of the tenant on behalf of which the node or relationship was created
  • tid: The "to ID", or the internal ID of the relationship's destination node, reserved for relationships only

Naming of property values

Requirements:

  • UTF-8 encoded unicode
  • Supported JSON types such as integer, string, and date
  • Examples: 3.98, info%4sap.com, %E7%94%B7%E8%A3%85 (the url-encoded version of simplified Chinese for "menswear")

You can retrieve the list of all available consent classes using the Consent service API console. To define a new consent class, submit a support request to a system administrator. For more details, see the Consent classes documentation.

Requirements:

  • American English nouns
  • PascalCase
  • Alphanumeric characters, special characters not allowed
  • Specifies the consent class that grants permission to write the data
  • Valid values: KeywordSearch, PageView, HTTPAcceptHeader
  • Invalid values: PromotionClass, SessionConsentClass

Naming of schemas

To name a given schema, you must define the schemaTitle.

Requirements:

  • American English
  • Alphanumeric characters, including spaces
  • Natural-language English grammar and syntax

Naming of schema descriptions

The schemaDescription briefly explains what data a given schema defines.

Requirements:

  • American English
  • Alphanumeric characters, including spaces
  • Natural-language English grammar and syntax


Schema management

Create and modify schemas

Schemas are created as a result of enricher and context adapter registration.

Multiple enrichers and context adapters can share schemas, as long as the enrichers and context adapters manage the same type of data that the shared schemas define. To remove a schema, all enrichers and context adapters that use that schema must be unregistered.

These are some actions that you can perform on schemas, schema parts, and schema attributes, and the related effects:

  • Changing the ID of a schema creates a new schema under the new ID. This action results in the removal of the original schema.
  • Modifying schema parts, such as ENTITY TYPE, NAMESPACE and NODETYPE, creates a new schema.
  • Changing the encryption type of the schema renders the existing data defined by that schema inaccessible and unreadable.
    You can alter other schema attributes, such as consent class, schema description, and schema title, according to your needs. However, the implementation of such changes requires manual governance process to be applied.
  • Newly-defined schemas might not fit into existing consent classes. New consent classes cannot be randomly defined. All available consent classes are defined in the consent class dictionary, which you can retrieve using the Consent service.
    Only a system administrator can define new consent classes and add them to the consent class dictionary.
  • Both adding schemas to the metamodel and removing schemas affect user and TENANT consent. For details about how the creation and removal of schemas can modify consent, see Consent reference lifecycle section of the Consent service document.


Enricher and context adapter configuration

Register enrichers and context adapters

Both enrichers and context adapters register metadata in the metamodel.

To use a given enricher or context adapter, you must subscribe to the package that contains the desired enricher or context adapter. To use a Profile service enricher or context adapter in your project, you must subscribe your project to the Profile Core Services package. To learn how to subscribe your project to a package, see the Submit Data section.

By default, when a tenant subscribes to a Builder package configured in the Extension Subscription service, the system automatically enables the public enrichers and contexts adapters contained in the package for that tenant. You can disable the unwanted enrichers and context adapters according to your needs at any time. You can also register your own enrichers and context adapters in the metamodel.

Tenants other than your own can view and subscribe to only your public enrichers and context adapters.

For more details about how to register an enricher and context adapter, see the Tutorial section.

Disable and re-enable enrichers and context adapters

You can disable an enricher or context adapter that you no longer need. Disabling an enricher or context adapter does not result in the removal of the schemas used by that enricher or context adapter. The data defined by those schemas remains accessible. However, the the system no longer notifies the disabled enricher or context adapter when an event associated with those schemas takes place.

You can re-enable a formerly-disabled enricher or context adapter at any time, as long as your subscription to the containing package is still valid. Because the data which existed prior to disabling that enricher or context adapter was not removed, it continues to be accessible after you re-enable that enricher or context adapter.

For more details about how to enable or disable an enricher or context adapter, see Register a tenant in SAP Hybris Profile.


Enricher registration vs package subscription

Enable an enricher in an unsubscribed package

If you enable an enricher in a package that you have no subscription to, the enricher does not process your tenant's requests. Because of a missing subscription to the package, the enricher is unable to retrieve a token for your tenant.

Expired subscription

When a tenant's subscription to a given package expires, the enrichers included in that package remain registered in the metamodel. However, the enrichers are unable to process the tenant's requests. When you renew your subscription to the package, the system automatically re-enables the enrichers associated with that package. You can renew your subscription at any time.

Create a single-tenant enricher

A single-tenant enricher is an enricher that only the owner tenant can use. To create such an enricher, subscribe your tenant to the Profile Core Services package, then create an enricher and ask a data administrator to register it for you in the metamodel. The enricher only processes requests that your tenant sends. You do not need to add that enricher to a package, because no other tenant can use such an enricher, even after subscribing to a package that contains that enricher.


Data flow cycles

Enrichers communicate by triggering one another. There is a continuous data flow in the system, and because the system can be freely extended, the data-flow pathways can be modified as a result of the addition or removal of particular enrichers.

An enricher might write data to the graph that triggers a second enricher, which in turn, writes data triggering the first enricher. This can result in a flow cycle wherein data is perpetually transferred back and forth among enrichers. Because the system currently cannot recognize flow cycles automatically, new enrichers are manually registered in the metamodel.

The following diagram illustrates a simple data flow cycle:

graph LR A((Context Adapter)) --> B((Enricher 1)) B ==> C((Enricher 2)) C ==> E((Enricher 3)) E ==> B


Introduction to Tutorial

These tutorials show you how to:

  • register a new enricher in SAP Hybris Profile
  • register a new context adapter in SAP Hybris Profile
  • register a new tenant in SAP Hybris Profile

Prerequisites

Before starting this tutorial, you must have:


Enricher registration

You must register enrichers in SAP Hybris Profile so that they can perform specific actions.

These are the results of enricher registration:

  • Registration adds the enricher to the metamodel.
  • Registration authorizes the enricher to access and modify the profile document.
  • Registration creates a PubSub topic for the enricher.
  • If it is a new registration, only the owner tenant, used for registration, automatically subscribes to the enricher. For more information about how to subscribe a tenant to an enricher, see Register a tenant in SAP Hybris Profile.
Currently, external developers are not authorized to call enricher registration endpoints. To register a new enricher, request permission from a system administrator, or create a support request that includes the enricher's ID and the payload in the form of a JSON file. When you submit the request, a system administrator registers your enricher.

Register enrichers

To register an enricher in SAP Hybris Profile, use the command in the example.

You must have a valid bearer access token. For details on how to get an access token, see the /token endpoint section of the OAuth2 service documentation.

Example

curl -X PUT -H "Authorization: Bearer 001-daa5794a-aecc-4e85-abab-8c744f17bf1a" -d '{
  "name": "myComicsshop.comicbookview",
  "hierarchical": true,
  "public": true,
  "package": "7811daece5e1225000zz0l52o",
  "triggeredBy": [
     "https://api.beta.yaas.io/metamodel/v1/context/commerce/seeComicBook"
  ],
  "writesTo": [
    {
      "schema": "https://api.beta.yaas.io/metamodel/v1/relations/commerce/Session/commerce/Product/commerce/COMIC_BOOK_VIEW",
      "schemaTitle": "View Comic Book",
      "schemaDescription": "Customer viewed Comic Book",
      "consentClass": "ClickStream",
      "encryptionType:" "user"
    },
    {
      "schema": "https://api.beta.yaas.io/metamodel/v1/relations/commerce/Session/commerce/Product/commerce/COMIC_BOOK_VIEW/viewComicsBooksCount",
      "schemaTitle": "Count of viewed Comic Books",
      "schemaDescription": "Count of viewed Comic Books",
      "consentClass": "ClickStream",
      "encryptionType": "user"
    }
  ]
}' 'https://api.beta.yaas.io/hybris/profile-enr-auth/v1/extensions/enrichers/comicbookview/1'
  1. Headers:
    • Authorization - A valid bearer access token
  2. URI parameters:
    • enricherId - The "hybris-client" service name from the Builder
    • version - The version of the enricher. Currently, versioning is not supported, so the version number is 1.
  3. Content:
    • body - Place the content for the PUT command between braces {}.
    • name - The name of the enricher that you want to register. Make sure the name is short and user-friendly.
    • hierarchical - A flag determining whether a node of a lower level communicates with a node of a higher level. Upon a lambda enricher registration, the system sets the value of this flag as true, which indicates that this enricher reacts not only to the triggering schema, but also to its properties nested on lower levels. When you set this flag to false, the enricher does not respond to any properties of its triggering schema.
    • public - Either true or false. Set this parameter to true if you want tenants other than your own to view or subscribe to your enricher.
    • package - The package that contains the enricher that you want to register
    • triggeredBy - The schema that triggers a given enricher. Make sure to choose a proper schema. Some schemas define data, and their properties, generated by the changes in the profile database. Other schemas come from outside of the system and are generated by context adapters. For more information about how to check all available schemas, see Find useful data for enricher registration.
    • writesTo - The schemas of nodes, relationships, and their properties that the enricher can store in the SAP Hybris Profile database
    • schema - The link to a schema of a given consent class. For more information about schema parts, see the Schema parts description.
    • schemaTitle - The name of a given schema
    • schemaDescription - The description of the scope for a given schema
    • consentClass - The consent class name. For more information about how to check consent classes, see Check consent classes.
    • encryptionType - The type of encryption used to encrypt data, either tenant or user. Define encryption only for properties. For more information about encryption types, see Types of consent references.

Get enricher details

To see if an enricher is registered, and to get its details, run the command in the example.

Example

curl -X GET -H "Authorization: Bearer 001-65115c05-f2a2-4413-8d60-45349d103208" 'https://api.beta.yaas.io/hybris/profile-enr-auth/v1/extensions/enrichers/{enricherId}/{version}'
  1. Headers:
    • Authorization - A valid bearer access token
  2. URI parameters:
    • enricherId - SAP Hybris client service name from the Builder
    • version - The version of the enricher

Response

A successful response returns the details of a given enricher:

{
    "id": "hybris.enricherId",
    "topic": "enricherId",
    "topicOwner": "profile.dispatcher",
    "version": "1.0",
    "channelType": "PSH",
    "name": "Test enricher",
    "hierarchical": true,
    "public": true,
    "package": "7811daece5e1225000zz0l52o",
    "ownerTenant": "profile",
    "triggeredBy": [
        "https://api.beta.yaas.io/metamodel/v1/context/commerce/ProductView"
    ],
    "writesTo": [
        {
            "schema": "https://api.beta.yaas.io/metamodel/v1/relations/commerce/Session/commerce/Product/commerce/VIEWED",
            "schemaTitle": "Product View",
            "schemaDescription": "Product viewed action",
            "consentClass": "ClickStream",
            "encryptionType": "user",
            "searchable": false
        },
        {
            "schema": "https://api.beta.yaas.io/metamodel/v1/nodes/commerce/Product/name",
            "schemaTitle": "Product name",
            "schemaDescription": "Product name",
            "consentClass": "ClickStream",
            "encryptionType": "user",
            "searchable": true
        }
    ],
    "subscribedBy": [
        "tenant1",
        "tenant2"
    ]
}

You do not need to provide all these details when registering an enricher. These are the additional enricher details that the GET command returns:

  • id - The unique identifier of the enricher defined in the Builder. It is equal to the enricherId value defined during enricher registration.
  • topic - The messaging channel, separate for each enricher, created in the PubSub service. For more details about topics, see Enricher registration and Enricher integration with PubSub.
  • topicOwner - The owner of the topic
  • channelType - The type of the channel through which the data is transferred, such as the PubSub service
  • ownerTenant - The enricher owner tenant
  • subscribedBy - Optional list of tenants that are subscribed to a given enricher. This information is available only to the authorized clients and to the owner of the enricher.

Enricher graph view

A registered enricher can be presented in the metamodel:

Node description:

  • Blue node - represents the tenants that are subscribed to the enricher
  • Red node - represents the property to which the enricher writes
  • Pink node - represents the schema that triggers the enricher
  • Yellow node - represents the enricher


Context adapter registration

Context adapters are web services that transform heterogenous input into the format that SAP Hybris Profile expects. All data that context adapters capture is stored in the Context service if the proper consents are granted.

Context adapters must be registered in SAP Hybris Profile and assigned to the proper project/tenant in the Builder to perform their designated actions.

If it is a new registration, the system automatically subscribes only owner tenant (used for registration) to the context adapter.

Currently, external developers are not authorized to call context adapter registration endpoints. To register a new context adapter, request permission from a system administrator, or create a support request that includes the context adapter's ID and the payload in the form of a JSON file. When you submit the request, a system administrator registers your context adapter.

Register context adapters

To register a context adapter in SAP Hybris Profile, you can use the Enricher Authorization API Console or you can use the command in the example.

Example

curl -X PUT -H "Authorization: {Bearer Access_token}" -H -d '{
  "name": "{adapter's name}",
  "public": "{flag that specifies if other tenants should be allowed to view or subscribe to this adapter}",  
  "package": "{package of this adapter}",
  "writesTo": [  
    {
      "schema": "{schema URI}",
      "schemaTitle": "{schema title}",
      "schemaDescription": "{schema's short description}",
      "consentClass": "{consent class to which schema belongs}",
      "encryptionType:" "{encryption type user/tenant}"
    }
  ]
}' 'https://api.beta.yaas.io/hybris/profile-enr-auth/v1/extensions/contextAdapters/{adapterId}/{version}'
  1. HEADERS:
    • Authorization - A valid Bearer access_token.
  2. URI PARAMETERS:
    • adapterID - The ID of a given context adapter.
    • version - The version of the context adapter. Currently, versioning is not supported, so set the version number to 1.
  3. CONTENT:
    • body - Place the content for the PUT command between braces {}.
    • name - The name of the adapter that you want to register. The adapter name must be a service name from the Builder that matches the YaaS client value.
    • public - Either true or false. Set this parameter to true if you want tenants other than your own to view or subscribe to your adapter.
    • package - The package that contains the adapter that you want to register.
    • writesTo - The schema of nodes, relations, and their properties, which the context adapter can store in the Context repository.
    • schema - The link to a schema of a given consent class. For details about schema parts, see the Schema parts description.
    • schemaTitle - The name of a given schema.
    • schemaDescription - The description of the scope for a given schema.
    • consentClass - The consent class name. For more information about how to check consent classes, see Check consent classes in the Consent service documentation.
    • encryptionType - The type of encryption used to encrypt data (tenant or user) should be defined only for properties.

Example of a PUT request with real data

curl -X PUT -H "Authorization: Bearer 001-daa5794a-aecc-4e85-abab-8c744f17bf1a" -H -d '{
  "name": "myComicsshop.profile-clicky",
  "public": true,
  "package": "7811daece5e1225000zz0l52o",
  "writesTo": [
    {
      "schema": "https://api.beta.yaas.io/metamodel/v1/context/commerce/ProductViewed",
      "schemaTitle": "ProductViewed",
      "schemaDescription": "Customer viewed product",
      "consentClass": "ClickStream",
      "encryptionType:" "tenant"
    }
  ]
}' 'https://api.beta.yaas.io/hybris/profile-enr-auth/v1/extenstions/contextAdapters/myComicsshop.profile-clicky/1'


Register a tenant in SAP Hybris Profile

Register a tenant

This section describes how to register a new tenant in SAP Hybris Profile, and how to subscribe a tenant to an enricher, as well as how to unsubscribe a tenant from a given enricher.

You must have a valid Bearer access_token. For more information about how to get an access token, see the /token endpoint section of the OAuth2 service documentation.

To use SAP Hybris Profile enrichers and context adapters, register your tenant. You can register your tenant by subscribing it to the SAP Hybris Profile Core package.

For more information about how to subscribe your project to a package, see the Submit Data section in the Solutions documentation.

Subscribe a tenant to a new or a previously-disabled enricher

When a tenant subscribes to a package, the Extension Subscription service receives a notification of this fact. The Extension Subscription service then triggers the Enricher Authorization service and subscribes the tenant to every extension defined in this package. The system does not automatically subscribe the tenant to any public extensions which are not a part of the subscribed package. If the tenant recreates the subscription to the package, the system activates all extensions from this package for that tenant again.

You can also use the PUT request shown in the example to subscribe a registered tenant to a new or a previously-disabled enricher.

Example

curl -X PUT -H "Authorization: bearer 001-65115c05-f2a2-4413-8d60-45349d103208" 'https://api.beta.yaas.io/hybris/profile-enr-auth/v1/extensions/enrichers/comicbookview/1/subscribedBy/mycomicsshop'

Command parameters

  1. HEADERS:
    • Authorization - A valid Bearer access_token.
  2. URI parameters:
    • enricherId - The YaaS client service name from the Builder.
    • version - The version of the enricher.
    • tenant - The name of your tenant.

Get all enrichers

To get a list of all enrichers registered in SAP Hybris Profile, use the command shown in the example.

Example

curl -X GET -H "Authorization: bearer 001-65115c05-f2a2-4413-8d60-45349d103208" 'https://api.beta.yaas.io/hybris/profile-enr-auth/v1/extensions/enrichers'

Command parameters

  1. Headers:
    • Authorization - A valid Bearer access_token.

Response

The response includes a list of all registered enrichers.

Unsubscribe a tenant from an unwanted enricher

If you do not wish to use all of the enrichers registered in SAP Hybris Profile, you can unsubscribe your tenant from the unwanted enrichers. To unsubscribe your tenant from specific enrichers, run the command in the example.

Example

curl -X DELETE -H "Authorization: bearer 001-65115c05-f2a2-4413-8d60-45349d103208" 'https://api.beta.yaas.io/hybris/profile-enr-auth/v1/extensions/enrichers/comicbookview/1/subscribedBy/mycomicsshop'

Command parameters

  1. Headers:
    • Authorization - A valid Bearer access_token.
  2. URI parameters:
    • enricherId - The YaaS client service name from the Builder.
    • version - The version of the enricher. Currently, versioning is not supported, so set the version number to 1.
    • tenant - The name of your tenant.


Find useful data for enricher registration

During enricher registration, provide a triggering schema. A triggering schema informs an enricher about an event, such as a created node, or an external, incoming event, such as an event coming from a storefront.

Get all schemas

You can use the command in the example to list the existing schemas defined in the metamodel.

You must have a valid Bearer access_token. For more information about how to get an access token, see the /token endpoint section of the OAuth2 service documentation.

Example

curl -X GET -H "Authorization: Bearer 000-a20ba3b3-b319-4c42-9af9-15699bc6e9da" 'https://api.beta.yaas.io/hybris/profile-enr-auth/v1/schemas'

Command parameters

  1. HEADERS:
    • Authorization - A valid Bearer access_token.

Response

The response displays the list of schemas.


[{
 "schema" : "<a href="https://api.beta.yaas.io/metamodel/v1/context/core/AddIdentity">https://api.beta.yaas.io/metamodel/v1/context/core/AddIdentity”</a>
 }, {
 "schema" : "<a href="https://api.beta.yaas.io/metamodel/v1/context/commerce/AddedToCart”">https://api.beta.yaas.io/metamodel/v1/context/commerce/AddedToCart”</a>
 }, {
 "schema" : "<a href="https://api.beta.yaas.io/metamodel/v1/context/commerce/BounceRate">https://api.beta.yaas.io/metamodel/v1/context/commerce/BounceRate”</a>
 }, {
 "schema" : "<a href="https://api.beta.yaas.io/metamodel/v1/context/commerce/CategoryView”">https://api.beta.yaas.io/metamodel/v1/context/commerce/CategoryView”</a>
 }, {
 "schema" : "<a href="https://api.beta.yaas.io/metamodel/v1/context/commerce/FacebookData">https://api.beta.yaas.io/metamodel/v1/context/commerce/FacebookData”</a>
 }, {
 "schema" : "<a href="https://api.beta.yaas.io/metamodel/v1/context/commerce/FacebookLogin”">https://api.beta.yaas.io/metamodel/v1/context/commerce/FacebookLogin”</a>
 }, {
 "schema" : "<a href="https://api.beta.yaas.io/metamodel/v1/context/commerce/FrontendEntered">https://api.beta.yaas.io/metamodel/v1/context/commerce/FrontendEntered”</a>
 }, {
 "schema" : "<a href="https://api.beta.yaas.io/metamodel/v1/context/commerce/KeywordSearch”">https://api.beta.yaas.io/metamodel/v1/context/commerce/KeywordSearch”</a>
 }, {
 "schema" : "<a href="https://api.beta.yaas.io/metamodel/v1/context/core/LoggedIn">https://api.beta.yaas.io/metamodel/v1/context/core/LoggedIn”</a>
 }, {
 "schema" : "<a href="https://api.beta.yaas.io/metamodel/v1/context/commerce/ProductView”">https://api.beta.yaas.io/metamodel/v1/context/commerce/ProductView”</a>
 }, {
 "schema" : "<a href="https://api.beta.yaas.io/metamodel/v1/context/commerce/TestSchema">https://api.beta.yaas.io/metamodel/v1/context/commerce/TestSchema”</a>
 }, {
 "schema" : "<a href="https://api.beta.yaas.io/metamodel/v1/context/commerce/TwitterData”">https://api.beta.yaas.io/metamodel/v1/context/commerce/TwitterData”</a>
 }]
This example shows only a sample section of the list of all schemas that exist in the metamodel.


Glossary

TermDescription
authorizationThe process of determining whether a given microservice has permission to gain consent.
consentPermission to access (read, write) specific profile data, for example, permission to read/write age estimation or physical address. A consumer and a tenant can grant and revoke consent for subsets of their respective data.
consent classA string alias, defined by developers, that references a set of profile data (also called "schemas") for which consent can be granted and revoked. This string is exposed to users (consumers and tenants) as a reference through which they control consent. For example, the consent class "Purchases" might reference a set of data that includes items purchased, purchase dates, and purchase prices. Toggling consent for "Purchase" would enable and disable consent for that entire set of data.
consent referenceA unique, randomized string that serves as a passcode to decrypt data associated with one or more schemas. Various service calls require a consent reference.
consumerThe end user whose actions yield profile data in the graph. A profile describes a single consumer.
contextData that affects the state of the graph. This data can be collected from consumer-triggered events or from third-party sources such as weather stations.
Context AdapterA microservice that receives data and, optionally, adapts it for entry into the graph. For example, a context adapter can adapt address data by adding a ZIP code and normalizing the street labels (for example, changing "St" to "Street"). The context adapter then passes the data through the Context service, which caches it so that enrichers can subsequently persist the data in the graph.
context repositoryA temporary cache for adapted context data, before it is further processed by enrichers and persisted in the graph.
context serviceAn internal microservice that manages the insertion of, and the retrieval of, context data in the Context Repository.
encryption keyA unique, randomized string used to encrypt and decrypt specific data in the graph. Each data element is encrypted with a different encryption key. Decryption, using this key, is required to access, view, and alter the data.
enricherA microservice that retrieves data from the Context Repository and/or Graph, possibly alters or extends it, and then persists data in the graph. An enricher can interpret data points, or sets of data points, to yield new data to persist. For example, an enricher can interpret purchasing data and contemporaneous weather station data to yield new data indicating that the consumer is a rainy-day shopper.
graphThe database that stores profile data as nodes, edges, and properties, and allows semantic queries.
identityOne of many independent units of data used to identify a unique profile, such as an email address, browser type, or version.
profileData about a single consumer, collected and derived from events that are triggered by, or are logically associated, with that consumer.
schemaA string representation of a path in the graph that represents an abstraction, rather than a concrete instance, of a particular data structure.
tenantA registered entity with a shared commercial goal that subscribes to SAP Hybris Profile services and packages to reach that goal. A tenant can also develop and contribute enrichers and context adapters to the SAP Hybris Profile suite. Within YaaS, a tenant is a project.


  • Send feedback

    If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.

  • Get Help

    Use our private help channel. Receive updates over email and contact our specialists directly.

  • hybris Experts

    If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.