Namespaces that are managed by the URN-Service.
Returns the registered namespaces. The list can be filtered using the
q
parameter.
The result is paged. The count
and offset
parameters can be
used to navigate through the result list. Alternatively, the Link
header contains URLs for browsing through the result list.
Access: Unauthorized (public) access allowed.
name | type | description | default | constraints |
---|---|---|---|---|
count | query | number of entries to return. Maximum is 1000, default is 20. | 20 | max: 1000, min: 0 |
offset | query | index of the first entry to return starting from 0. Default is 0. | 0 | min: 0 |
q | query | allows to filter the list of namespaces. The format of the filter query is “key:value”. Supported filter keys are name, created, lastmodified, and allowsregistration | ||
runas | query | optional login name whose identity is used to execute the request (only available to users with the RunAs privilege) | ||
sortby | query | sort field. Supported fields are name, created and lastmodified | name | "CREATED" or "LASTMODIFIED" or "NAME" |
sortorder | query | sort order. Must be either asc or desc | asc | "ASC" or "DESC" |
code | condition |
---|---|
200 | if the request was completed successfully |
400 |
|
401 | if the user could not be authenticated (error code 401001) |
403 | if the current user is not authorised to use a certain search parameter (error code 403001) |
media type | data type | description |
---|---|---|
application/json | Collection (JSON) | a Collection of {@link RESTNamespaceRepresentation Namespace}s. |
name | description |
---|---|
Link | contains links to the first, last, next and previous result pages |
GET /namespaces
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
Link: ...
{
"self" : "http://example.org/collection",
"totalItems" : 42,
"items" : [ { }, { } ]
}
Creates a new namespace.
Access: System administrators only.
name | type | description |
---|---|---|
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 | CreateNamespaceRequest (JSON) | specifies the name of new namespace and additional administrative information. |
code | condition |
---|---|
201 | if the namespace was created successfully |
400 |
|
401 | if the user could not be authenticated (error code 401001) |
403 | if the user is not allowed to create namespaces (error code 403001) |
409 | if a namespace with the given name exists already (error code 409001) |
media type | data type | description |
---|---|---|
application/json | Namespace (JSON) | the new namespace |
name | description |
---|---|
Location | points to the created namespace. Only returned if the request was successful. |
POST /namespaces
Content-Type: application/json
Accept: application/json
{
"name" : "urn:nbn:de2112",
"owner" : "http://example.org/organisations/id/1",
"urnNamingPolicy" : "http://example.org/policies/urn-naming/id/1",
"urlPolicy" : "http://example.org/policies/url/id/1",
"comment" : "This namespace is used for test purposes only",
"resolverUrl" : "http://example.org/resolver"
}
HTTP/1.1 201 Created
Content-Type: application/json
Location: ...
{
"self" : "http://example.org/namespaces/name/urn:nbn:de:0815",
"name" : "urn:nbn:de2112",
"created" : "2017-03-02T15:23:16.123Z",
"lastModified" : "2017-03-02T15:23:16.123Z",
"allowsRegistration" : true,
"comment" : "This namespace is used for test purposes only",
"resolverUrl" : "http://example.org/resolver",
"owner" : "http://example.org/organisations/id/1",
"urnNamingPolicy" : "http://example.org/policies/urn-naming/id/1",
"urlPolicy" : "http://example.org/policies/url/id/1",
"urns" : "http://example.org/namespaces/name/urn:nbn:de:0815/urns",
"urnSuggestion" : "http://example.org/namespaces/name/urn:nbn:de:0815/urnsuggestion"
}