/urns/urn/{urn}/my-urls Resource

URNs managed by the URN-Service.

GET /urns/urn/{urn}/my-urls

Returns a list of the caller's URLs on this URN.

The list of URLs is ordered by priority (see RESTUrlRepresentation#getPriority().

Access: Logged in organisations only.

Request Parameters
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)  
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 Collection (JSON) a Collection of Urls.

Example

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

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

                
{
  "self" : "http://example.org/collection",
  "totalItems" : 42,
  "items" : [ { }, { } ]
}
                
              

PATCH /urns/urn/{urn}/my-urls

Replaces all URLs which belong to the current organisation with the URLs sent. A change of the priority value with the URI-String remaining the same is ignored.

After the replace operation there must be at least one URL be still registered with the URN. Otherwise the replace request is not executed.

Access: Logged in organisations only.

Request Parameters
name type description constraints
urn path whose URLs are replaced 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 array of ReplaceUrlRequest (JSON) the new list of URLs for this organisation.
application/merge-patch+json array of ReplaceUrlRequest (JSON)
Response Codes
code condition
401 if the user is not authenticated (error code 401001)
404 if the URN is not registered (error code 404001)

Example

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

                
[ {
  "url" : "...",
  "priority" : 100
} ]
                
              
Response
HTTP/1.1 200 OK