1.0 SPECIFICATION DRAFT
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.
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. |
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#"> <oslc:LinkType 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> </oslc:LinkType> </rdf:RDF>
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. |
Request
GET http://example.com/linktype/resources/e3a78263cd917a
Accept: application/x-oslc-common-linktype+xml
Response
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#"> <oslc:LinkType 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> </oslc:LinkType> </rdf:RDF>
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. |
GET http://example.com/linktypes Accept: application/atom+xmlResponse
<?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"> <oslc_am:LinkType xmlns:oslc_am="http://open-services.net/xmlns/am/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/terms/" 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> </oslc_am:LinkType> </content> </entry> <entry> <link href="https://am.acme.com/linkTypeFactory/_AK6FMNGAEd6KwZENF5babw" rel="self" /> <oslc_am:etag>"_Ksos92ksndjs8ualoas"</oslc_am:etag> <content type="application/xml"> <oslc_am:LinkType xmlns:oslc_am="http://open-services.net/xmlns/am/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/terms/" 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> </oslc_am:LinkType> </content> </entry> <entry> <link href="https://am.acme.com/linkTypeFactory/_ALpsENGAEd6KwZENF5babw" rel="self" /> <oslc_am:etag>"_kasApaq932kaiwjfyabc023"</oslc_am:etag> <content type="application/xml"> <oslc_am:LinkType xmlns:oslc_am="http://open-services.net/xmlns/am/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/terms/" rdf:about="http://acme.org/linktypes/elaborates"> <dc:title>Elaborates</dc:title> <dc:description>The subject elaborates the object. </dc:description> </oslc_am:LinkType> </content> </entry> </feed>
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. |
POST http://example.com/linkTypeFactory Content-Type: application/x-oslc-am-linktype+xml
Request Body
Response<?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#"> <oslc:LinkType 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> </oslc:LinkType> </rdf:RDF>
201 Created Location: http://example.com/linktype/resources/e3a78263cd917a ETag: "_3Z3mxMD_Ed6YkqfTZH8hGg"
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. |
Request
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#"> <oslc:LinkType rdf:about="http://www.example.com/linktype/implements"> <dc:title>Implements</dc:title> <dc:description>This implements that.</dc:description> </oslc:LinkType> </rdf:RDF>Response
200 OK ETag: "_3uImlMD_Ed6YkqfTZH8hGg"
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. |
Request
DELETE http://example.com/linktype/resources/e3a78263cd917a If-Match: "_3Z3mxMD_Ed6YkqfTZH8hGg"Response
200 OK
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 - 07 Oct 2009