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 Resource Links Collection REST API

1.0 SPECIFICATION DRAFT

Introduction

The Architecture Management Resource Link Creation URI {AMR Link Creation URI} is a URI obtained from a model resource's data (application/x-oslc-am-resource+xml). It specifies where a POST requests can be made to create new link resource from a model element to another CALM resource.

GET {AMR Link Collection URI}

Returns the collection of link resources that the AMR participates on the subject end.

Example

GET http://example.com/resource1/links
Content-Type: application/xml

Request Body

<?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:title>Behavior model</dc:title>
      <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>Uniwuely 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"/>
      <dc:creator rdf:resource="http://example.com/users/arch1" />
      <dc:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">
          2009-10-20T19:49:47-04:00
      </dc:created>
   </oslc:Link>

</rdf:RDF> 

POST {AMR 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}
Content-Type: application/x-oslc-am-resource-link+xml
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
POST http://example.com/resource1/links
Content-Type: application/ *X-oslc-common-link+xml*
<?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:title>Behavior model</dc:title>
      <dc:description>This link just covers the behavioral modeling aspect.</dc:description>
   </oslc:Link>

</rdf:RDF> 

Response

201 Created
Location: http://example.com/links/fab328s9ed7ad
ETag: "_3Z3mxMD_Ed6YkqfTZH8hGg"

PUT {AMR 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 {AMR 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 Architecture Management REST API 1.0 Home

-- JimConallen - 01 Sep 2009

Edit | Attach | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r6 - 27 Oct 2009 - 15:45:45 - 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