Digitalisér.dk REST API

Dette API udstiller dele af Digitaliser.dk's underliggende data. API'et udstiller både læsning- og skrivningsfunktionalitet. Dataene er repræsenteret som XML, der er beskrevet i XML skemaer (se links i tabellen). API'et følger den samme rettighedsmodel som digitaliser.dk. For at tilgå REST API'et som autentificeret bruger, kan du bruge HTTP Basic Auth over HTTPS - det vil sige https://api.digitaliser.dk/rest. For at udløse en login-prompt via en browser tilgås login ressourcen.
Fejlmeddelelser i API'et er beskrevet her.

REST grænsefladen er også specificeret i en WADL (W3C, Wikipedia) fil her: http://api.digitaliser.dk/rest/application.wadl

Der findes et eksempel der benytter jQuery mod REST API'et: klassifikationsbrowseren.

For at undgå at browseren cacher svar fra REST API'et kan der sendes en tilfældig værdi med hver forespørgsel. Eksempelvis: ?rand=0.6076720174034937.

Digitalisér.dk - din indgang til offentlig it-arkitektur og standardisering

RessourceHttp verberProducererKonsumerer
/GET text/html
artefactkinds/{title}GET text/xml application/xml application/json application/x-javascript
artefactkindsGET text/xml application/xml application/json application/x-javascript
artefacts?title={title}&firstResult={firstResult}&
maxResults={maxResults}
GET text/xml application/xml application/json application/x-javascript
classifications/{classificationId}GET text/xml application/xml application/json application/x-javascript
classificationsGET text/xml application/xml application/json application/x-javascript
classifications/{classificationId}/dimensions/
{dimensionId}
GET text/xml application/xml application/json application/x-javascript
classifications/{classificationId}/
dimensions
GET text/xml application/xml application/json application/x-javascript
classifications/{classificationId}/dimensions/
{dimensionid}/choices/
{choiceId}
GET text/xml application/xml application/json application/x-javascript
classifications/{classificationId}/dimensions/
{dimensionid}/choices
GET text/xml application/xml application/json application/x-javascript
classifications/{classificationId}/dimensions/
{dimensionid}/choices/{choiceId}/
instances?firstResult={firstResult}&
maxResults={maxResults}
GET text/xml application/xml application/json application/x-javascript
debates/latest/rss?linkto={linkto}GET application/rss+xml
emailinvites?firstname={firstname}&
surname={surname}
POST text/plain application/xml
events/{eventId}/promotions/frontpage/
image?width={width}&height={height}
GET image/png
events/{eventId}/promotions/network/
{networkId}/image?width={width}&
height={height}
GET image/png
groups/{id}DELETE
groups/{groupId}/imageDELETE
groups/{id}GET text/xml application/xml application/json application/x-javascript
groups/{id}/members?firstResult={firstResult}&
maxResults={maxResults}
GET text/xml application/xml application/json application/x-javascript
groups?firstResult={firstResult}&
maxResults={maxResults}
GET text/xml application/xml application/json application/x-javascript
groups/{groupId}/image?width={width}&
height={height}
GET image/png
groups/{groupid}/latest/rss?
linkto={linkto}
GET application/rss+xml
groups/{groupid}/debate/latest/rss?
linkto={linkto}
GET application/rss+xml
groups/latest/rss?linkto={linkto}GET application/rss+xml
groups/{groupid}/members/latest/rss?
linkto={linkto}
GET application/rss+xml
groups/{groupid}/newspostings/latest/rss?
linkto={linkto}
GET application/rss+xml
groups/{groupid}/resources/latest/rss?
linkto={linkto}
GET application/rss+xml
groups/{groupid}/resources?firstResult={firstResult}&
maxResults={maxResults}
GET text/xml application/xml application/json application/x-javascript
groups/{id}PUT text/plain text/xml application/xml application/json
groups/{groupId}/imagePUT
networks/{networkId}/image?width={width}&
height={height}
GET image/png
networks/{networkId}/latest/rss?
linkto={linkto}
GET application/rss+xml
networks/{networkId}/debate/latest/rss?
linkto={linkto}
GET application/rss+xml
networks/{networkId}/members/latest/rss?
linkto={linkto}
GET application/rss+xml
networks/{networkId}/newspostings/latest/
rss?linkto={linkto}
GET application/rss+xml
networks/{networkId}/resources/latest/rss?
linkto={linkto}
GET application/rss+xml
newspostings/{newsPostingId}/promotions/
frontpage/image?width={width}&
height={height}
GET image/png
newspostings/{newsPostingId}/promotions/
network/{networkId}/image?width={width}&
height={height}
GET image/png
newspostings/latest/rss?linkto={linkto}GET application/rss+xml
objectidPOST text/plain
resourcecategories/{id}GET text/xml application/xml application/json application/x-javascript
resourcecategoriesGET text/xml application/xml application/json application/x-javascript
resourcemetadata/{id}GET text/xml application/xml application/json application/x-javascript
resourcemetadataGET text/xml application/xml application/json application/x-javascript
resources/{id}DELETE
resources/{resourceId}/promotions/frontpage/
image?width={width}&
height={height}
GET image/png
resources/{resourceId}/promotions/group/
image?width={width}&height={height}
GET image/png
resources/latest/rss?linkto={linkto}GET application/rss+xml
resources/{id}GET text/xml application/xml application/json application/x-javascript
resources?title={title}&firstResult={firstResult}&
maxResults={maxResults}
GET text/xml application/xml application/json application/x-javascript
resources/{id}/tagsGET text/xml application/xml application/json application/x-javascript
resources/{id}PUT text/plain text/xml application/xml application/json
resources/{id}/tagsPUT text/xml application/xml application/json
resources/search?query={query}&
firstResult={firstResult}&maxResults={maxResults}&
tags={tags}&
classificationChoices={classificationChoices}
GET text/xml application/xml application/json application/x-javascript
resources/{resourceId}/artefacts/
{artefactId}
DELETE
resources/{resourceId}/artefacts/
{artefactId}
GET text/xml application/xml application/json application/x-javascript
resources/{resourceId}/artefactsGET text/xml application/xml application/json application/x-javascript
resources/{resourceId}/artefacts/{artefactId}/
content
GET */*
resources/{resourceId}/artefacts/
{artefactId}
PUT text/plain text/xml application/xml application/json
resources/{resourceId}/artefacts/{artefactId}/
content
PUT text/plain */*
resources/{resourceId}/classificationInstances/
{instanceId}
GET text/xml application/xml application/json application/x-javascript
resources/{resourceId}/
classificationInstances
GET text/xml application/xml application/json application/x-javascript
resources/{resourceId}/classificationInstances/
{instanceId}
PUT text/plain text/xml application/xml application/json
resources/{resourceId}/references/
{referenceId}
DELETE
resources/{resourceId}/references/
{referenceId}
GET text/xml application/xml application/json application/x-javascript
resources/{resourceId}/referencesGET text/xml application/xml application/json application/x-javascript
resources/{resourceId}/references/
{referenceId}
PUT text/plain text/xml application/xml application/json
tags/{id}GET text/xml application/xml application/json application/x-javascript
tags/{id}PUT text/plain text/xml application/xml application/json
taxonomies/{taxonomyTitle}DELETE
taxonomies/{taxonomyTitle}/taxonomynodes/
{identifier}
DELETE
taxonomies/{taxonomyTitle}/taxonomynodecategories/
{categoryId}
DELETE
taxonomies/{taxonomyTitle}GET text/xml application/xml application/json application/x-javascript
taxonomies/{taxonomyTitle}/taxonomynodes/
{identifier}
GET text/xml application/xml application/json application/x-javascript
taxonomies/{taxonomyTitle}/taxonomynodecategories/
{categoryId}
GET text/xml application/xml application/json application/x-javascript
taxonomies/{taxonomyTitle}/taxonomynodecategories/
{categoryId}/nodes
GET text/xml application/xml application/json application/x-javascript
taxonomies/{taxonomyTitle}/taxonomynodes/
{identifier}/resources
GET text/xml application/xml application/json application/x-javascript
taxonomies?firstResult={firstResult}&
maxResults={maxResults}
GET text/xml application/xml application/json application/x-javascript
taxonomies/{taxonomyTitle}/
taxonomynodecategories
GET text/xml application/xml application/json application/x-javascript
taxonomies/{taxonomyTitle}/taxonomynodes/
{identifier}/children
GET text/xml application/xml application/json application/x-javascript
taxonomies/{taxonomyTitle}/taxonomynodes?
root={root}
GET text/xml application/xml application/json application/x-javascript
taxonomies/{taxonomyTitle}PUT text/xml application/xml application/json
taxonomies/{taxonomyTitle}/taxonomynodes/
{identifier}
PUT text/plain text/xml application/xml application/json
taxonomies/{taxonomyTitle}/taxonomynodecategories/
{categoryId}
PUT text/xml application/xml application/json
taxonomies/{taxonomyTitle}/search?
query={query}&firstResult={firstResult}&
maxResults={maxResults}
GET text/xml application/xml application/json application/x-javascript
users/{userId}/image?width={width}&
height={height}
GET image/png
users/{id}GET text/xml application/xml application/json application/x-javascript
users?firstResult={firstResult}&
maxResults={maxResults}
GET text/xml application/xml application/json application/x-javascript
users/{id}/membershipsGET text/xml application/xml application/json application/x-javascript
users/{userId}/resources?firstResult={firstResult}&
maxResults={maxResults}
GET text/xml application/xml application/json application/x-javascript
versiongroups/{id}DELETE
versiongroups/{id}GET text/xml application/xml application/json application/x-javascript
versiongroups/{id}PUT text/plain text/xml application/xml application/json

Følgende fejlmeddelelser returneres af REST API'et. Alle fejlmeddelelser benytter skemaet ErrorMessage.xsd (ErrorMessage.xsd.meta.xml).
Fejl-idFejl-beskrivelse
400-00Forespørgslen er ikke gyldig. Der forventes en anden type argument end det forespurgte.
400-01Argumentet er en streng, men skulle være et tal.
400-02ID-nummeret er ikke reserveret af den aktuelle bruger.
400-03Objektet kan ikke slettes pga. eksisterende afhængigheder.
400-04Argumentet er ikke gyldigt.
400-05Der forsøges at oprette en versionsgruppe-label der allerede eksisterer.
400-06De påkrævede argumenter for operationen er ikke udfyldte.
400-07URL'en passer ikke til det forventede mønster.
400-08Artefakt-typen kan ikke accepteres.
400-09Det ønskede antal søgeresultater er for stort.
400-10Gruppen kunne ikke slettes da den har publicerede ressourcer.
400-11Kunne ikke oprette gruppen: Der eksisterer allerede en gruppe med den angivne titel.
400-12Den tilsendte objekt-type er ikke understøttet.
401-00Der er ikke den nødvendige adgang til at udføre handlingen.
404-00Der kan ikke findes et objekt som passer til argumenterne i forespørgslen.
404-01REST operationen, der forsøges tilgået, findes ikke.
500-00Der opstod en ukendt fejl.
500-01Argumentet er ikke tilladt.
500-02Objektet kan ikke samles (marshall'es).
500-03Der kan ikke skrives eller læses fra disken.
500-04RSS-feedet kan ikke læses eller genereres.
500-05Versionsgruppens label er ikke unik