Skip to content

Service Catalog API

Alexandr Krylovskiy edited this page Aug 19, 2014 · 20 revisions

Overview

Service Catalog provides a REST(ish) API to publish and discover various services (e.g., Device Catalog, MQTT Broker).

Data Format

Registration

Each service is represented in the Service Catalog by a registration, which has the following format:

	{
	id: <string>  
	type: "Service",  
	name: <string>,
	description: <string>,
	meta: {},
	protocols: [
		{
			type: <string>,
			endpoint: {},
			methods: [],
			content-types: [ ]
		}
	],
	representation: { },
	ttl: <int>,
	created: <timestamp>,
	updated: <timestamp>,
	expires: <timestamp>
	}

Fields created, updated, and expires are generated by the Service Catalog. The field id needs to uniquely identify the service in the Service Catalog and the agreement is to construct it as hostname/servicename

Collection

The entry point of the Service Catalog returns a collection of Registrations in the format inspired by Hydra Collection:

    {
      @context: "/static/ctx/catalog.jsonld",
      id: "/sc",
      type: "Collection",
      services: []
    }

The services array holds an array of Registrations

Example

For example, a registration describing the Device Catalog looks as follows: TODO

REST API

CRUD

Service Catalog provides a CRUD for registrations:

Filtering

Clone this wiki locally