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
>
AmLinkTypeManagementV1
(17 Jun 2010,
JimConallen
)
(raw view)
---+ Architecture Management Link Type Management REST API _1.0 SPECIFICATION DRAFT_ %TOC% ---++ Introduction The Architecture Management Link Type Management {Link Type URI} is a discoverable URI that specifies how a client can determine the set of supported link types. This interface also defines how a server can optionally permit the dynamic creation, removal or updating of link type definitions. Requests can denied based on user privlege, content type, or invalid content. ---++ Link Type Factory URI<a name="LinkTypeFactoryURI" title="LinkTypeFactoryURI"></a> ---+++ GET {Link type 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 {Link Type Factory URI} If supported by the server allows the client to register new link types with the server. The content body of the request MUST contain the full content of a link type resource. A service provider MUST support at least the following HTTP response status codes: | *Status Code* | *Response Content* | *Response Headers* | *Description* | | 201 Created | | ETag: {the current ETag value for this resource}<br />Location: {The URI of the link type registration} | The request was sucessful, the new link type was registered. The returned document represents the definition of the link type | | 400 Bad Request | Error message | | This response can be returned when any of the parameters or content is not properly structured | ---++++ *Example* POST http://example.com/linkTypeFactory <verbatim>Content-Type: application/x-oslc-am-linktype+xml</verbatim> *Request Body* <pre><verbatim><?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:dc="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://www.example.com/linktype/implements"> <dc:title>Implements</dc:title> <dc:description> The subject resource provides an implementation of the subject resource. </dc:description> </rdf:Description> </rdf:RDF> </verbatim></pre> *Response* <verbatim>201 Created Location: http://example.com/linktype/resources/e3a78263cd917a ETag: "_3Z3mxMD_Ed6YkqfTZH8hGg"</verbatim> ---+++ PUT {Link type 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 {Link type 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. ---++ Link Type Resource URI <a name="LinkTypeResourceURI" title="LinkTypeResourceURI"></a> ---+++ GET {Link Type Resource URI} Returns the Link Type Resource. | *Status Code* | *Response Content* | *Response Headers* | *Description* | | 200 OK | A Link Type resource document | ETag: {Current ETag for link type resource} | The request was successful and the server has returned the collection of known link types. | | 400 Bad Request | Error message | | This response can be returned when any of the parameters or content is not properly structured. | ---++++ Example *Request* <verbatim>GET http://example.com/linktype/resources/e3a78263cd917a Accept: application/x-oslc-common-linktype+xml</verbatim> *Response* <verbatim>ETag: "_3Z3mxMD_Ed6YkqfTZH8hGg" Content-Type: application/x-oslc-common-linktype+xml <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:dc="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://standard.com/linktype/implements"> <dc:title>Implements</dc:title> <dc:description> The subject resource provides an implementation of the subject resource. </dc:description> </rdf:Description> </rdf:RDF> </verbatim> ---+++ POST {Link type 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. ---+++ PUT {Link Type Resource URI} Updates the link type definition on the server. Only the dc:title and dc:description are updatable. The type id is not changeable. The If-Match header with current ETag value is required. | *Status Code* | *Response Content* | *Response Headers* | *Description* | | 200 OK | | ETag: {the current ETag value for this resource} | The request was sucessful, the new link type was registered. The returned document represents the definition of the link type | | 400 Bad Request | Error message | | This response can be returned when any of the parameters or content is not properly structured. | ---++++ *Example* *Request* <verbatim>PUT http://example.com/linktype/resources/e3a78263cd917a Content-Type: application/x-oslc-am-linktype+xml If-Match: "_3Z3mxMD_Ed6YkqfTZH8hGg" <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:dc="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://www.example.com/linktype/implements"> <dc:title>Implements</dc:title> <dc:description>This implements that.</dc:description> </rdf:Description> </rdf:RDF> </verbatim> *Response* <verbatim>200 OK ETag: "_3uImlMD_Ed6YkqfTZH8hGg" </verbatim> ---+++ DELETE {Link Type Resource URI} Deletes the link type definition on the server for the link type id. This specification does not address the removal of all links with this type, which is at the service's discretion. The If-Match header with current ETag value is required. | *Status Code* | *Response Content* | *Response Headers* | *Description* | | 200 OK | | | The request was successful, the link type was deleted, and will not appear in future requests for supported/known link types. | | 400 Bad Request | Error message | | This response can be returned when any of the parameters or content is not properly structured. | ---++++ *Example* *Request* <verbatim>DELETE http://example.com/linktype/resources/e3a78263cd917a If-Match: "_3Z3mxMD_Ed6YkqfTZH8hGg" </verbatim> *Response* <verbatim>200 OK</verbatim> ---++ Link Type Query URI<a name="LinkTypeQueryURI" title="LinkTypeQueryURI"></a> ---+++ GET {Link Type Query URI}?type={URL encoded link type URI} Returns an Link Type Resource describing the link represented by the link type URI. | *Status Code* | *Response Content* | *Response Headers* | *Description* | | 200 OK | A Link Type resource document | Location: {Link Type Resource URI}<br />ETag: {Current ETag for link type resource} | The request was successful and the server has returned the collection of known link types. | | 400 Bad Request | Error message | | This response can be returned when any of the parameters or content is not properly structured. | ---++++ Example *Request* <verbatim>GET http://example.com/linktypes?type=http%3A%2F%2Fstandard.com%2Flinktype%2Fimplements Accept: application/x-oslc-am-linktype+xml</verbatim> *Response* <verbatim>Location: http://example.com/linktype/resources/e3a78263cd917a ETag: "_3Z3mxMD_Ed6YkqfTZH8hGg" <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:dc="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://standard.com/linktype/implements"> <dc:title>Implements</dc:title> <dc:description> The subject resource provides an implementation of the subject resource. </dc:description> </rdf:Description> </rdf:RDF> </verbatim> ---+++ GET {Link Type Query URI} Returns a collection of all the link types supported by the server. _Note: we are using ATOM Feeds to manage collections._ | *Status Code* | *Response Content* | *Response Headers* | *Description* | | 200 OK | Collection of all supported link types | | The request was sucessful and the server has returned the ATOM collection of known link types. | | 400 Bad Request | Error message | | This response can be returned when any of the parameters or content is not properly structured. | ---++++ Example <verbatim>GET http://example.com/linktypes Accept: application/atom+xml</verbatim> *Response* <br /><verbatim><?xml version='1.0' encoding='UTF-8'?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"> <title type="text">Link Types</title> <updated>2009-11-15T02:58:57.406Z</updated> <link href="https://am.acme.com/linkTypeFactory/_oSa28Mr5Ed6ugb3EZOtmVQ" rel="self" /> <opensearch:totalResults>3</opensearch:totalResults> <entry> <link href="https://am.acme.com/linkTypeFactory/_-uhmwdF_Ed6KwZENF5babw" rel="self" /> <oslc_am:etag>"_sopwiryfcnma937rhsk"</oslc_am:etag> <content type="application/xml"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/terms/"> <rdf:Description rdf:about="http://open-services.net/xmlns/am/1.0/implements"> <dc:title>Implements</dc:title> <dc:description>The subject implements the object.</dc:description> </rdf:Description> </rdf:RDF> </content> </entry> <entry> <link href="https://am.acme.com/linkTypeFactory/_AK6FMNGAEd6KwZENF5babw" rel="self" /> <oslc_am:etag>"_Ksos92ksndjs8ualoas"</oslc_am:etag> <content type="application/xml"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/terms/"> <rdf:Description rdf:about="http://purl.org/dc/terms/license"> <dc:title>License</dc:title> <dc:description>The resource is governed by the referenced license.</dc:description> </rdf:Description> </rdf:RDF> </content> </entry> <entry> <link href="https://am.acme.com/linkTypeFactory/_ALpsENGAEd6KwZENF5babw" rel="self" /> <oslc_am:etag>"_kasApaq932kaiwjfyabc023"</oslc_am:etag> <content type="application/xml"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/terms/"> <rdf:Description rdf:about="http://acme.org/linktypes/elaborates"> <dc:title>Elaborates</dc:title> <dc:description>The subject elaborates the object.</dc:description> </rdf:Description> </rdf:RDF> </content> </entry> </feed> </verbatim> ---+++ POST {Link type 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. ---+++ PUT {Link type 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 {Link type 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.
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r8
<
r7
<
r6
<
r5
<
r4
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r8 - 17 Jun 2010 - 13:46:41 -
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