Architecture Management Resource Source Factory REST API
1.0 SPECIFICATION DRAFT
Introduction
The Architecture Management Resource Factory URI
{AMR Source Factory URI}
is a discoverable URI that specifies where to POST non-OSLC formatted resources. Not all formats are supported by the server. Each service provide can reject for any reason a request to create a new AM resource, including user privleges, content type, or invalid content.
GET {AMR Factory URI}
Not supported. The Service Provider MUST return a 405 Method Not Allowed response. The response MUST include an Allow header containing a list of valid methods for the requested resource.
POST {AMR Source Factory URI}
Creates a new model element from the content body of the request. The Content-Type header MUST be specified. The server MAY support the creation of the element. The content body of the request MUST contain the full content required for an element of the specified type.
A service provider MUST support at least the following HTTP response status codes:
Status Code |
Response Content |
Response Headers |
Description |
200 OK |
AM Resource content (including server generated elements) |
ETag : {the current ETag value for this resource} Location : {AM Resource Web URI} |
The request was sucessful and the server has created the new resource. |
400 Bad Request |
Error message |
|
This response can be returned when any of the parameters or content is not properly structured. |
415 Unsupported Media Type |
Error message |
|
The Content-Type header does not specify a content type that the server can create a model element for. |
Examples
Example 1. Client sucessfully POSTs a new binary AM Resource
The service provider permits AM resource creation and is familiar with and supports the creation of resources of this MIME type.
The client POSTs a new binary resource to the AMR source Factory URI, which is specified in the
Service Description Document. Upon successful creation the service provider returns a 201 Created response with a Location and ETag header that the client can use to manage the newly created resource.
Request:
POST http://am.acme.com/resources
Content-Type: application/x-some-binary-model-format
Body:
(binary stream)
Response:
201 Created
Location: http://am.acme.com/resources/res55
ETag: "_3928jd7sh722js7a7a7a233A"
Example 2. Client un-sucessfully POSTs a new AM Resource
The service provider denies the AM resource creation for the given content type.
The client POSTs a new resource to the AMR Factory URI, which is specified in the
Service Description Document. The service does not support this content type, or does not support the creation of new elements of this type.
The service returns a
415 Media Unsupported
response.
Request:
POST http://am.acme.com/resources
Content-Type: application/x-uml+xml
Body:
<uml:Class xmlns:uml="http://open-services.net/am/uml/1.0#">
<uml:name>Class1</uml:name>
<uml:abstract>true</uml:abstract>
</uml:Class>
Response:
415 Media Unsupported
PUT {AMR Source Factory URI}
Not supported. The Service Provider MUST return a 405 Method Not Allowed response. The response MUST include an Allow header containing a list of valid methods for the requested resource.
DELETE {AMR Source Factory URI}
Not supported. The Service Provider MUST return a 405 Method Not Allowed response. The response MUST include an Allow header containing a list of valid methods for the requested resource.
Back to
Architecture Management REST API 1.0 Home
--
JimConallen - 01 Sep 2009