The base URL for our Relationship service is
Provides relationships stored within a given object
GET
https://rucore.libraries.rutgers.edu/api/relationship/get/
https://rucore.libraries.rutgers.edu/api/relationship/get/{Parameter1}/{Parameter2}/{Parameter3}/
Parameter | Value | Description |
---|---|---|
1 |
string (required)
|
A full object ID containing the namespace mentioned must be provided. If an invalid ID is submitted nothing will be returned. |
2 | string (optional) | As an option you can pass a predicate or base ontology, this will limit the results returned to only those ontologies. |
3 | string (optional)
|
This value is optional and controls the format of the resulting list. Current default is xml. |
Each <relationship> has a series of ATTRIBUTES explained below:
The subelements that appear in <relationship> are as follows:
Creates relationship(s) between resources
POST
https://rucore.libraries.rutgers.edu/api/relationship/
Authorization key required
200 on success; 400 with error code on failure
Parameter | Value | Description |
---|---|---|
key | string (required) | The ADD method is a restricted use method meaning a valid key must be submitted with every request. If you are interested in obtaining a key contact us. |
do |
string (required)
|
The action that is to be performed by the API. |
subject |
string (required)
|
This is the subject for the relationship being created |
predicate | string (required) | Registered ontology, see the DESCRIBE method for more information. |
object |
string (required)
|
The object used when creating the relationship. |
type |
string (optional)
|
Providing this parameter with value single only the predicate ontology relationship will be created in the subject. A relationship using the predicate provided will be created between the subject and object; however the corresponding relationship between the object and the subject will not automatically be created. |
rutgers-lib:24827
Subject |
-----hasAnalytic----->
<-----isAnalyticOf-----
|
rutgers-lib:25566
Object |
rutgers-lib:24827
Subject |
-----hasAnalytic----->
|
rutgers-lib:25566
Object |
This is highly discouraged because of the additional steps taken and the likelihood relationships might not be fully expressed with both the subject and object. It is strongly suggested that relationships are not created using type=single.
Deletes relationship(s) associated with resources
DELETE
https://rucore.libraries.rutgers.edu/api/relationship/
Authorization key required
204 on success; 400 with error code on failure
Parameter | Value | Description |
---|---|---|
key | string (required) | The DELETE method is a restricted use method meaning a valid key must be submitted with every request. If you are interested in obtaining a key contact us. |
do |
string (required)
|
The action that is to be performed by the API. |
subject |
string (required)
|
This is the subject for the relationship being deleted |
predicate | string (optional) | Registered ontology, see the DESCRIBE method for more information. When supplied only relationships using this ontology are deleted. If no predicate is supplied then all registered ontologies are deleted from the subject. |
object |
string (optional)
|
When supplied only relationships between the subject and the object are deleted. |
type |
string (optional)
|
Providing this parameter with value single only the predicate ontology relationship will be deleted from the subject. If a relationship is expressed in the object between the object and the subject this will not be automatically deleted. |
This is highly discouraged because it leads to the likelihood that relationships will not be fully expressed. It is strongly suggested that relationships are not deleted using type=single.
Provides an RDF document of all supported registered ontologies
GET
A Google Group has been created to provide a place for discussion about the web services RUcore provides.
If you have any further questions please contact us.