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.

Architecture Management Link Type Factory REST API

1.0 SPECIFICATION DRAFT

Link Type Factory URI

GET {Link Type Factory 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}
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

GET http://example.com/linktypes?type=http%3A%2F%2Fstandard.com%2Flinktype%2Fimplements
Accept: application/x-oslc-am-linktype+xml

Response

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> 

GET {Link Type Factory 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

GET http://example.com/linktypes
Accept: application/atom+xml
Response
<?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>

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}
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

Content-Type: application/x-oslc-am-linktype+xml

Request Body

<?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> 
Response

201 Created
Location: http://example.com/linktype/resources/e3a78263cd917a
ETag: "_3Z3mxMD_Ed6YkqfTZH8hGg"
Topic revision: r1 - 17 Jun 2010 - 12:56:59 - JimConallen
 
This site is powered by the TWiki collaboration platform 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