This wiki is locked. Future workgroup activity and specification development must take place at
our new wiki
. For more information, see
this blog post about the new governance model
and
this post about changes to the website
.
TWiki
>
Main Web
>
AmHome
>
AMRestApiV1
>
AmRestModelResourcesV1
(17 Jun 2010,
JimConallen
)
(raw view)
---+ Architecture Management Resource Factory REST API _1.0 SPECIFICATION DRAFT_ %TOC% ---++ Introduction The Architecture Management Resource Factory URI ={AMR Factory URI}= is a discoverable URI that specifies where to POST a request to create new AM resource. Not all model element types are supported by the server. Requests can denied based on user privlege, 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 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}<br /> =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 AM Resource (OSLC AM Resource Format) 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 resource to the AMR Factory URI, which is specified in the [[AMServiceDescriptionV1][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:* <verbatim>POST http://am.acme.com/resources Content-Type: application/rdf+xml</verbatim> *Body:* <verbatim><?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/terms/" xmlns:uml="http://uml/types/"> <rdf:Description rdf:about=""> <dc:title>ServiceInterface</dc:title> <dc:description>This is a sample UML interface</dc:description> <rdf:type rdf:resource="http://www.eclipse.org/uml2/3.0.0/UML/Interface" /> <uml:generalizes rdf:resource="http://am.acme.com/resources/res29"/> </rdf:Description> </rdf:RDF> </verbatim> *Response:* <verbatim>201 Created Location: http://am.acme.com/resources/res55 ETag: "_28ce9abbf723s7fac993"</verbatim> ---++++ 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 [[AMServiceDescriptionV1][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:* <verbatim>POST http://am.acme.com/resources Content-Type: application/x-uml+xml</verbatim> *Body:* <verbatim><uml:Class xmlns:uml="http://open-services.net/am/uml/1.0#"> <uml:name>Class1</uml:name> <uml:abstract>true</uml:abstract> </uml:Class> </verbatim> *Response:* <verbatim>415 Media Unsupported </verbatim> ---++++ Example 3. Client sucessfully POSTs a new AM Resource (binary) 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 resource to the AMR Factory URI, which is specified in the [[AMServiceDescriptionV1][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:* <verbatim>POST http://am.acme.com/resources Content-Type: application/x-model</verbatim> *Body:* <verbatim>(binary stream)</verbatim> *Response:* <verbatim>201 Created Location: http://am.acme.com/resources/res55 ETag: "_3928jd7sh722js7a7a7a233A"</verbatim> ---++ PUT {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. ---++ DELETE {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. Back to [[AMRestApiV1][Architecture Management REST API 1.0 Home ]] -- Main.JimConallen - 01 Sep 2009
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r13
<
r12
<
r11
<
r10
<
r9
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r13 - 17 Jun 2010 - 13:48:40 -
JimConallen
Main
Main Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
Webs
Main
Sandbox
TWiki
Български
Cesky
Dansk
Deutsch
English
Español
Français
Italiano
日本語
Nederlands
Polski
Português
Русский
Svenska
简体中文
簡體中文
Copyright � by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our
Terms of Use
Ideas, requests, problems regarding this site?
Send feedback