-
Notifications
You must be signed in to change notification settings - Fork 0
MVC Metadata Service URLs
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)
-
/composite/api/agent/{agentSystemName}, throws an
AgentNotFoundException
if the specified agentSystemName isnt' registered with the composite -
/composite/api/read-model/{agentSystemName}/{readModelName}, throws an
AgentNotFoundException
if the specified agentSystemName isnt' registered with the composite; throws anReadModelNotFoundException
if the read model name is not present in the agent. -
/composite/api/input-model/{inputModelName}, throws
CannotRetrieveInputModelException
if the input model can't be found in the composite app -
/composite/api/command-is-supported/{commandName}, throws
CommandNotFoundInCompositeException
if the commands isn't mapped to an input model -
/composite/api/command-metadata/{commandName}, throws
CommandNotFoundInAgentException
if the command name does not exist in any of the loaded agents
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.
- [AgentSystemName] (https://github.com/smhinsey/Euclid/wiki/Agent-SDK)
- PartName - CommandType.Name (this property is implemented by DefaultInputModel)
- redirectUrl - optional if specified, the composite inspector will respond with HTTP303 with the specified value.
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
- /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}
- /composite/api/agents/(agent_slug)/queries/(query_method_slug){.json|.xml|.html}(?paramName=paramValue&anotherParamName=anotherValue)
- /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} ...
- /composite/api/publish