URNs managed by the URN-Service.
Returns a list of URLs attached to this URN.
Access: Unauthorized (public) access allowed.
name | type | description | constraints |
---|---|---|---|
urn | path | whose URLs are queried. | required |
runas | query | optional login name whose identity is used to execute the request (only available to users with the RunAs privilege) |
code | condition |
---|---|
200 | if the request was completed successfully |
401 | if the user is not authenticated (error code 401001) |
404 | if the URN is not registered (error code 404001) |
media type | data type | description |
---|---|---|
application/json | Collection (JSON) | a Collection of Urls. |
GET /urns/urn/{urn}/urls
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"self" : "http://example.org/collection",
"totalItems" : 42,
"items" : [ { }, { } ]
}
Registers a new URL.
Access: Logged in organisations only.
name | type | description | constraints |
---|---|---|---|
urn | path | to which the URL is added | required |
runas | query | optional login name whose identity is used to execute the request (only available to users with the RunAs privilege) |
media type | data type | description |
---|---|---|
application/json | CreateUrlRequest (JSON) | the registration details for the new URL |
code | condition |
---|---|
201 | if the URL was registered successfully |
400 |
|
401 | if the user is not authenticated (error code 401001) |
403 | if the user is not authorized to register
|
409 | if the URL is already registered (error code 409001) |
media type | data type | description |
---|---|---|
application/json | Url (JSON) | the registration information of the new URL |
name | description |
---|---|
Location | URI pointing to the new URL |
POST /urns/urn/{urn}/urls
Content-Type: application/json
Accept: application/json
{
"url" : "http://example.org/the-document.pdf",
"owner" : "http://example.org/organisations/id/1516",
"priority" : 100
}
HTTP/1.1 201 Created
Content-Type: application/json
Location: ...
{
"self" : "http://example.org/urns/urn/urn:nbn:de:101:1-200911171195/urls/base64/aHR0cDovL2V4YW1wbGUub3JnL3RoZS1kb2N1bWVudC5wZGY=",
"created" : "2017-03-02T15:23:16.123Z",
"lastModified" : "2017-03-02T15:23:16.123Z",
"url" : "http://example.org/the-document.pdf",
"urn" : "http://example.org/urns/urn/urn:nbn:de:101:1-200911171195",
"owner" : "http://example.org/organisations/id/1516",
"priority" : 100
}