Connector Services Response - Specification Version 1.0

Connector service responses must resolve at base_url/services/ (or be redirected to from there).

Example:
http://connector.jangle.org/services/

Methods allowed: GET, HEAD

Content-type required: application/json

JSON Schema:

{
"description":"Services available from this Jangle connector",
"type":"object",
"properties":{
  "type":{"type":"string","pattern":"/^services$/"},
  "version":{"type":"string","pattern":"/^1\.0$/"},
  "title":{"type":"string",},
  "request":{"type":"string"},
  "entities":{"type":"object",
  "properties:{
    "Actor:{"optional":true,"type":"object",
      "properties":{
        "title":{"type":"string"},
        "searchable":{"type":["boolean","string"],"format":"uri"},
        "path":{"type":"string"},
        "categories":{"optional":true,"type":"array"}          
    },
    "Collection:{"optional":true,"type":"object",
      "properties":{
        "title":{"type":"string"},
        "searchable":{"type":["boolean","string"],"format":"uri"},
        "path":{"type":"string"},
        "categories":{"optional":true,"type":"array"}
    },
    "Item:{"optional":true,"type":"object",
      "properties":{
        "title":{"type":"string"},
        "searchable":{"type":["boolean","string"],"format":"uri"},
        "path":{"type":"string"},
        "categories":{"optional":true,"type":"array"}
    },
    "Resource:{"optional":true,"type":"object",
      "properties":{
        "title":{"type":"string"},
        "searchable":{"type":["boolean","string"],"format":"uri"},
        "path":{"type":"string"},
        "categories":{"optional":true,"type":"array"}
    }
  },
  "categories":{"optional":true,"type":"object"}
}

Which, in real terms, would return a response that looks something like:

{
    "title": "openbiblio",
    "version" "1.0",
     "type": "services",
     "entities": 
    {
        "Resource": 
        {
            "searchable": "/resources/search/description",
             "title": "Bibliographic records",
             "path": "/resources/",
             "categories": ["opac"]
        },
         "Collection": 
        {
            "searchable": false,
             "title": "Categories",
             "path": "/collections/"
        },
         "Item": 
        {
             "searchable": false,
             "title": "Holdings records",
             "path": "/items/"
        },
         "Actor": 
        {
            "searchable": false,
             "title": "Borrowers",
             "path": "/actors/"
        }
    },
     "request": "/services/",
    "categories":{
      "opac":{
        "scheme": "http://jangle.org/vocab/terms#dlf-ilsdi-resource",
        "label": "Resources that are available for harvesting in a discovery interface"
      }
    }
     
}

The definitions of each field are:

type:
The type of API response. This must be "services".
version:
The version of the API response. This must be "1.0".
title:
The name of the service. Is used by the Jangle core to set the URI paths. Cannot contain spaces or any non-alphanumeric characters.
request:
The request URI echoed to the request client.
entities:
A hash of the entities available for requesting from this server. (possible values: Actors, Collections, Items, Resources)
categories:
A hash of the filters that can be applied to entities.

And the definitions of the fields for the entities are:

title:
A human readable string for the contents of the entity.
path:
The base path (from the connector base url) to the entity.
searchable:
The URI of the entity's explain response or a boolean false if search is not supported.
categories:
An array of the category label that can be used with this entity.

And the categories are defined like this:

term:
The string used to identify the category. Note these must be unique across a Jangle connector service. In the JSON output this is the key of the categories hash.
scheme:
This is optional, but could have the value of a URI that explicitly defines what the category is (i.e. http://jangle.org/vocab/terms#recall)
label:
An optional human readable string describing the category.