2. TinyMessages API specifics - ntlm-technologies/ntlm.TinyMessages.doc GitHub Wiki

Introduction

See NTLM API conventions.

These conventions apply to these collections :

  • Solutions
  • Services
  • Collections
  • Registrations
  • Subscriptions

ie : https://test-admin-ms-tm.ntlm.tech/solutions

Authentication

We created a testing account for you and granted all permissions :

UserName = Chewbacca
Password = wookie

Model

Solution

Represents a solution delivered to a client and contains multiple services that are hosted on various location. For instance a solution for a shop could contain a catalog service, a billing service and a customer service.

{
  "id": 0,
  "name": "starwars",
  "registrations": [],
  "collections": [],
  "designation": "Star Wars",
  "description": "Fun with Star Wars, all episodes (except Ewoks).",
  "created": "0001-01-01T00:00:00",
  "modified": "0001-01-01T00:00:00"
}

Service

Represents a service, or a "microservice". For instance the customer service manages customers, their addresses, etc.

{
  "registrations": [],
  "subscriptions": [],
  "id": 0,
  "name": "weaponsService",
  "solution": {},
  "baseUrl": "https://weapons-starwars-tm-ms.ntlm.tech",
  "designation": "Service managing weapons",
  "description": null,
  "created": "0001-01-01T00:00:00",
  "modified": "0001-01-01T00:00:00",
  "publications": []
}

Collection

Represents a list of objects maintained by a service. The service publishes entities to the collection. For instance a catalog service could contain a products collection and a categories collection ; the customer service could countain a customer collection.

{
  "id": 0,
  "name": "spaceships",
  "publisher": {},
  "subscriptions": [],
  "solution": {},
  "solution_Id": null,
  "designation": null,
  "description": null,
  "created": "0001-01-01T00:00:00",
  "modified": "0001-01-01T00:00:00",
  "publisher_Id": null
}

Registration

Represents a registration of a service to the solution. For instance the product service registers to the shop service. Security is not paramount for now so the registration of a service to a solution only generates a simple public key.

{
  "id": 0,
  "solution": {},
  "service": {},
  "key": "-492571234",
  "solution_Id": null,
  "service_Id": null
}

Subscription

Represents the subscription of a service to a collection. For instance the billing service subscribes to the customer collection. So whenever a customer is modified the billing service is notified.

{
  "id": 0,
  "collection": {},
  "subscriber": {},
  "subscriber_Id": null,
  "collection_Id": null,
  "resources": "externals/spaceships"
}

Authorizations

See the Authorization Service documentation

These are the various activities that are checked server side and that should be checked client side aswell:

tm-add-collection	               	Add a TinyMessages collection
tm-add-service	               	Add a TinyMessages service
tm-add-solution	               	Add a TinyMessages solution
tm-edit-collection	               	Edit a TinyMessages collection
tm-edit-service	               	Edit a TinyMessages service
tm-edit-solution	               	Edit a TinyMessages solution
tm-register	               	Register a service to a solution
tm-remove-collection	               	Remove a TinyMessages collection
tm-remove-service	               	Remove a TinyMessages service
tm-remove-solution	               	Remove a TinyMessages solution
tm-search-collections	               	Search for TinyMessages collections
tm-search-services	               	Search for TinyMessages services
tm-search-solutions	               	Search for TinyMessages solutions
tm-subscribe	               	Subscribe a service to a collection
tm-unregister	               	Unregister a service from a solution
tm-unsubscribe	               	Unsubscribe a service from a collection
tm-view-collection	               	View a TinyMessages service
tm-view-service	               	View a TinyMessages service
tm-view-solution	               	View a TinyMessages solution