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
>
AmRestModelResourceLinksV1
(27 Oct 2009,
JimConallen
)
(raw view)
---+ Architecture Management Link Collection REST API _1.0 SPECIFICATION DRAFT_ %TOC% ---++ Introduction The Architecture Management Resource Link Collection URI {Link Collection URI} is a URI obtained from a resource's data (application/x-oslc-am-resource+xml). It specifies where a POST requests can be made to create new link resource from the AM resource to another CALM resource. ---++ GET {Link Collection URI}?type={URL encoded Link Type URI} Returns the collection of link resources of a specific type (link type URI) that the AMR participates in as the subject. ---+++ *Example* <verbatim>GET http://example.com/resource1/links?type=http%3A%2F%2Fexample.com%2Ftypes%2Fmodels Content-Type: application/xml</verbatim> *Request Body* <pre><verbatim><?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:oslc="http://open-services.net/xmlns/common/1.0/" xmlns:dc="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" <oslc:Link rdf:about="http://example.com/links/fab328s9ed7ad"> <rdf:subject rdf:resource="http://example.com/resources/amresource15"/> <rdf:object rdf:resource="http://example2.com/resources/workitem24"/> <rdf:predicate rdf:resource="http://example.com/types/models"/> <dc:description>This link just covers the behavioral modeling aspect.</dc:description> <dc:creator rdf:resource="http://example.com/users/developer1" /> <dc:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"> 2009-10-20T19:49:47-04:00 </dc:created> <dc:contributor rdf:resource="http://example.com/users/admin1" /> <dc:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"> 2009-10-20T19:49:47-04:00 </dc:modified> </oslc:Link> <oslc:Link rdf:about="http://example.com/links/93827s9ed7ad"> <rdf:subject rdf:resource="http://example.com/resources/amresource15"/> <rdf:object rdf:resource="http://rdmserver/requirements/req73"/> <rdf:predicate rdf:resource="http://example.com/types/models"/> <dc:description>This covers only the structural model.</dc:description> <dc:creator rdf:resource="http://example.com/users/developer2" /> <dc:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"> 2009-10-20T19:49:47-04:00 </dc:created> </oslc:Link> </rdf:RDF> </verbatim></pre> ---++ GET {Link Collection URI} Returns the collection of link resources that the AMR participates on the subject end. ---+++ *Example* <verbatim>GET http://example.com/resource1/links Content-Type: application/xml</verbatim> *Request Body* <pre><verbatim><?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:oslc="http://open-services.net/xmlns/common/1.0/" xmlns:dc="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" <oslc:Link rdf:about="http://example.com/links/fab328s9ed7ad"> <rdf:subject rdf:resource="http://example.com/resources/amresource15"/> <rdf:object rdf:resource="http://example2.com/resources/workitem24"/> <rdf:predicate rdf:resource="http://example.com/types/models"/> <dc:description>This link just covers the behavioral modeling aspect.</dc:description> <dc:creator rdf:resource="http://example.com/users/developer1" /> <dc:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"> 2009-10-20T19:49:47-04:00 </dc:created> <dc:contributor rdf:resource="http://example.com/users/admin1" /> <dc:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"> 2009-10-20T19:49:47-04:00 </dc:modified> </oslc:Link> <oslc:Link rdf:about="http://example.com/links/93827s9ed7ad"> <rdf:subject rdf:resource="http://example.com/resources/amresource15"/> <rdf:object rdf:resource="http://rdmserver/requirements/req73"/> <rdf:predicate rdf:resource="http://open-services.net/xmlns/common/1.0/linktype/satisfies"/> <dc:title>Uniquely satisfies</dc:title> <dc:description>This link just covers the behavioral modeling aspect.</dc:description> <dc:creator rdf:resource="http://example.com/users/developer2" /> <dc:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"> 2009-10-20T19:49:47-04:00 </dc:created> </oslc:Link> <oslc:Link rdf:about="http://example.com/links/7a2817f9ed7ad"> <rdf:subject rdf:resource="http://example.com/resources/amresource15"/> <rdf:object rdf:resource="http://example.com/resources/amresource99"/> <rdf:predicate rdf:resource="http://purl.org/dc/terms/isReplacedBy"/> </oslc:Link> </rdf:RDF> </verbatim></pre> ---++ POST {Link Collection 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 | Link content | ETag: {Current ETag}<br />Content-Type: application/x-oslc-common-link+xml<br />Location: {Link URI} | The request was successful and the server has created a new AM resource link. | | 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 valid content type. | ---+++ Example *Request* <br /><verbatim>POST http://example.com/resource1/links Content-Type: application/X-oslc-common-link+xml</verbatim><pre><verbatim><?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:oslc="http://open-services.net/xmlns/common/1.0/" xmlns:dc="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" <oslc:Link> <rdf:subject rdf:resource="http://example.com/resources/amresource15"/> <rdf:object rdf:resource="http://example2.com/resources/workitem24"/> <rdf:predicate rdf:resource="http://example.com/types/models"/> <dc:description>Just covers the behavioral modeling aspect.</dc:description> </oslc:Link> </rdf:RDF> </verbatim></pre> *Response* <verbatim>201 Created Location: http://example.com/links/fab328s9ed7ad ETag: "_3Z3mxMD_Ed6YkqfTZH8hGg"</verbatim> ---++ PUT {Link Collection 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 {Link Collection 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
: r7
<
r6
<
r5
<
r4
<
r3
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r7 - 27 Oct 2009 - 16:54:50 -
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