...
Codeblock |
---|
title | Antwort auf POST /sandbox/v2/urns |
---|
collapse | true |
---|
|
HTTP/1.1 201 Created
Connection: keep-alive
Location: httphttps://localhost:8080api.nbn-resolving.org/sandbox/v2/urns/urn/urn:nbn:de:example-2019021315155244513532
Content-Type: application/json
Content-Length: 527
Date: Wed, 13 Feb 2019 14:32:48 GMT
{
"urn": "urn:nbn:de:example-2019021315155244513532",
"creationDate": "2019-02-13T15:32:48+0100",
"lastModified": "2019-02-13T15:32:48+0100",
"namespace": "https://api.nbn-resolving.org/sandbox/v2/namespaces/name/urn:nbn:de:example",
"successor": null,
"urls": "https://api.nbn-resolving.org/sandbox/v2/urns/urn/urn:nbn:de:example-2019021315155244513532/urls",
"myUrls": "https://api.nbn-resolving.org/sandbox/v2/urns/urn/urn:nbn:de:example-2019021315155244513532/my-urls",
"@id": "https://api.nbn-resolving.org/sandbox/v2/urns/urn/urn:nbn:de:example-2019021315155244513532"
} |
...
Um eine zusätzliche URL zu einer URN zu registrieren, kann ein POST
-Request auf den Endpunkt /urns/urn/<urn>/urls
gemacht werden. Zusätzliche URLs dürfen nicht nur an eigenen URNs registriert werden, sondern an beliebigen URNs. Die Angabe des Feldes priority
ist wieder optional.
Codeblock |
---|
POST http://localhost:8080/sandbox/v2/urns/urn/urn:nbn:de:example-2019021315155244513532/urls
Authorization: Basic dXJuLXBhcnRuZXI6bWVpbi1wYXNzd29ydA==
Content-Type: application/json
Accept: application/json
{
"url" : "http://example.org/another-document-url",
"priority" : 100
} |
Codeblock |
---|
title | Antwort auf POST /sandbox/v2/urns/urn/urn:nbn:de:example-2019021315155244513532/urls |
---|
collapse | true |
---|
|
HTTP/1.1 201 Created
Connection: keep-alive
Location: httphttps://localhost:8080api.nbn-resolving.org/sandbox/v2/urns/urn/urn:nbn:de:example-2019021315155244513532/urls/base64/aHR0cDovL2V4YW1wbGUub3JnL2Fub3RoZXItZG9jdW1lbnQtdXJs
Content-Type: application/json
Content-Length: 466
Date: Wed, 13 Feb 2019 15:11:15 GMT
{
"url": "http://example.org/another-document-url",
"creationDate": "2019-02-13T16:11:15+0100",
"lastModified": "2019-02-13T16:11:15+0100",
"urn": "httphttps://localhost:8080api.nbn-resolving.org/sandbox/v2/urns/urn/urn:nbn:de:example-2019021315155244513532",
"organisation": "httphttps://localhost:8080api.nbn-resolving.org/sandbox/v2/organisations/id/1",
"priority": 100,
"@id": "httphttps://localhost:8080api.nbn-resolving.org/sandbox/v2/urns/urn/urn:nbn:de:example-2019021315155244513532/urls/base64/aHR0cDovL2V4YW1wbGUub3JnL2Fub3RoZXItZG9jdW1lbnQtdXJs"
} |
...
Codeblock |
---|
PATCH /sandbox/v2/urns/urn/urn:nbn:de:example-2019021315155244513532
Authorization: Basic dXJuLXBhcnRuZXI6bWVpbi1wYXNzd29ydA==
Content-Type: application/json
Accept: application/json
{
"successor": "httphttps://localhost:8080api.nbn-resolving.org/sandbox/v2/urns/urn/urn:nbn:de:example-20190213151552346346245"
} |
...