/urns/urn/{urn} Resource

URNs managed by the URN-Service.

GET /urns/urn/{urn}

Returns the registration information for a URN.

Access: Unauthorized (public) access allowed.

Request Parameters
name type description constraints
urn path whose registration information should be returned required
runas query optional login name whose identity is used to execute the request (only available to users with the RunAs privilege)  
Response Codes
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)
Response Body
media type data type description
application/json Urn (JSON) the registration information of the URN

Example

Request
GET /urns/urn/{urn}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "self" : "http://example.org/urns/urn/urn:nbn:de:101:1-200911171195",
  "urn" : "urn:nbn:de:101:1-200911171195",
  "created" : "2017-03-02T15:23:16.123Z",
  "lastModified" : "2017-03-02T15:23:16.123Z",
  "namespace" : "http://example.org/namespaces/name/urn:nbn:de:101:1",
  "successor" : "http://example.org/urns/urn/urn:nbn%3Ade:101:1-20112061111",
  "urls" : "http://example.org/urns/urn/urn:nbn:de:101:1-200911171195/urls",
  "myUrls" : "http://example.org/urns/urn/urn:nbn:de:101:1-200911171195/my-urls"
}
                
              

HEAD /urns/urn/{urn}

Checks whether a URN exists.

Access: Unauthorized (public) access allowed.

Request Parameters
name type description constraints
urn path the URN to check required
runas query optional login name whose identity is used to execute the request (only available to users with the RunAs privilege)  
Response Codes
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)
Response Body
media type data type description
application/json object (JSON) an empty response (null)

Example

Request
HEAD /urns/urn/{urn}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

PATCH /urns/urn/{urn}

Updates the registration information of a URN.

Access: Namespaces owners only for their own URNs.

Request Parameters
name type description constraints
urn path the URN which should be updated required
runas query optional login name whose identity is used to execute the request (only available to users with the RunAs privilege)  
Request Body
media type data type description
application/json UpdateUrnRequest (JSON) the updated registration information
application/merge-patch+json UpdateUrnRequest (JSON)
Response Codes
code condition
204 if the URN registration information was updated successfully
400
  • if a field is not valid (error code 400007),
  • if a successor URN was specified but it does not exist (error code 400009) or
  • if a primary URL reference was specified but it is does not exist (error code 400009).
401 if the user is not authenticated (error code 401001)
403
  • if the user is not authorized to modify this URN (error code 403001),
  • if the user is not authorized to add or change the comment of this URN (error code 403001),
  • if the user is not authorized to update the successor of this URN (error code 403001) or
  • if the primary URL reference is already registered with another URN (error code 403002).
404 if the URN is not registered (404001)

Example

Request
PATCH /urns/urn/{urn}
Content-Type: application/json

                
{
  "successor" : "http://example.org/urns/urn/URN:NBN:no-2016042500"
}
                
              
Response
HTTP/1.1 204 No Content

              

DELETE /urns/urn/{urn}

Deletes a URN registration.

Access: System administrators only.

Request Parameters
name type description constraints
urn path the URN which should be deleted required
runas query optional login name whose identity is used to execute the request (only available to users with the RunAs privilege)  
Response Codes
code condition
204 if the URN registration was deleted successfully
401 if the user is not authenticated (error code 401001)
403
  • if the user is not authorized to delete this URN (error code 403001) or
404 if the URN is not registered (error code 404001)

Example

Request
DELETE /urns/urn/{urn}
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 204 No Content