Skip to content

MVC Metadata Service URLs

logicbomb edited this page Mar 1, 2012 · 52 revisions

The MVC Composite's Metadata Service is the method by which a composite app developer can explore the agents which have been installed into their composite, including the commands, read models, and queries offered by each agent. Additionally, the non-HTML formats offered by the Service are intended to be useful for composite application developers to consume as an API from jQuery or other tools.

It is implied that, where appropriate, links between the below URLs will exist. The following URLs should exist at a minimum, although it is not necessarily an exhaustive list. When URLs which are not specified become necessary, they should follow the patterns laid out below.

The resources returned for a GET request to any of the URLs below can be formatted as either XML or JSON. The composite inspector will format the requested resource based on the 'accept headers' set in the request (application/json, application/xml or text/xml) or an extension appended to the end of the URL (.json or .xml). If no suitable format can be determined, the composite inspector will return HTTP403 (Forbidden)

A composite can POST data that represents an Euclid.Framework.Models.IInputModel to the URL /composite/api/publish. The following name-value pairs are expected in addition to the properties specific to the instance being posted.

All files posted to this URL will be stored as a resource, and the URL used to fetch it is set on the input model object.

TO DO Add extensibility point for providing metadata representation of objects


Proposed New API

GET API

Metadata API

  • /composite/api{.json|.xml|.html}
  • /composite/api/agents{.json|.xml|.html}
  • /composite/api/agents/(agent_slug){.json|.xml|.html}
  • /composite/api/agents/(agent_slug)/queries{.json|.xml|.html}
  • /composite/api/agents/(agent_slug)/queries/(query_method_slug){.json|.xml|.html} We need a better name for "query method"
  • /composite/api/agents/(agent_slug)/readModels{.json|.xml|.html}
  • /composite/api/agents/(agent_slug)/readModels/(readModel_slug){.json|.xml|.html}
  • /composite/api/agents/(agent_slug)/commands{.json|.xml|.html}
  • /composite/api/agents/(agent_slug)/commands/(command_slug){.json|.xml|.html}
  • /composite/api/composite{.json|.xml|.html}
  • /composite/api/composite/inputmodels{.json|.xml|.html}
  • /composite/api/composite/inputmodels/(inputModel_slug){.json|.xml|.html}
  • /composite/api/composite/viewmodels{.json|.xml|.html}
  • /composite/api/composite/viewmodels/(viewModel_slug){.json|.xml|.html}

Query API

  • /composite/api/agents/(agent_slug)/queries/(query_method_slug){.json|.xml|.html}(?paramName=paramValue&anotherParamName=anotherValue)

Registry API

  • /composite/api/registry/(registry_type).{.json|.xml|.html}
  • /composite/api/registry/(registry_type)/pendingRecords{.json|.xml|.html}
  • /composite/api/registry/(registry_type)/pendingRecords/(pendingRecord_slug){.json|.xml|.html} ...

POST API

  • /composite/api/publish