stoney core: Customers Resource Mapping (REST - LDAP)

From stoney cloud
Jump to: navigation, search

Overview

The customers resource mapping describes the business logic behind the LDAP to JSON transformation and visa versa for the request and response objects. The actual customers resource REST API is located in the REST API category and is named stoney core: Customers Resource - REST API.

Principles:

  • for the resource objects there is most of the time a one-to-one mapping between LDAP attributes and JSON object
  • for collections only a subset of the resource object attributes will be returned which may be also be merged or otherwise mangled

This specification puts together the Customers frontend API (stoney core: Customers Resource - REST API) and the LDAP Data Backend (stoney core: OpenLDAP directory data organisation).

If nothing else is defined, address related information is always taken out of the billing address (ou=address,uid=<UID>,ou=customers,dn=stoney-cloud,dc=org).

Customer retrieval (GET)

Customer collection retrieval (GET)

Customer collection retrieval (GET) Mapping

Customer element retrieval (GET)

The following sequence describes the customer element retrieval:

  1. Look-up the reseller in the OpenLDAP directory in the ou=customers,dc=stoney-cloud,dc=org sub tree (with a configurable LDAP service user): ...
  2. Billing address ou=address,uid=<UID>,ou=customers,dc=stoney-cloud,dc=org (mandatory)
  3. Shipping ou=shipping,uid=4000000,ou=customers,dc=stoney-cloud,dc=org contains the shipping address and is optional (it is only needed, if the shipping address differs from the billing Address).

Customer element retrieval (GET) Mapping

API Attribute LDAP Attribute
id uid