GET http://example.com/resource1/links?type=http%3A%2F%2Fexample.com%2Ftypes%2Fmodels Content-Type: application/xmlRequest 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: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>
GET http://example.com/resource1/links Content-Type: application/xmlRequest 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: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>
Status Code | Response Content | Response Headers | Description |
---|---|---|---|
200 OK | Link content | ETag: {Current ETag} Content-Type: application/x-oslc-common-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. |
POST http://example.com/resource1/links Content-Type: application/X-oslc-common-link+xml
Response<?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>
201 Created Location: http://example.com/links/fab328s9ed7ad ETag: "_3Z3mxMD_Ed6YkqfTZH8hGg"