API for data deposit.
Not a complete implementation of but conform to the Sword3 specification:
GET {scheme}://{server}/deposit/{repository}
See: https://swordapp.github.io/swordv3/swordv3-behaviours.html#1.
GET /api.ka3.uni-koeln.de/deposit/{repository} HTTP/1.1 Host: api.ka3.uni-koeln.de Authorization: Bearer eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00if...
POST {scheme}://{server}/deposit/{repository}
See: https://swordapp.github.io/swordv3/swordv3-behaviours.html#2.1.
POST /api.ka3.uni-koeln.de/deposit/{repository} HTTP/1.1 Host: api.ka3.uni-koeln.de Content-Type: application/json Content-Disposition: attachment; metadata=true Authorization: Bearer eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00if... { "@context": "https://swordapp.github.io/swordv3/swordv3.jsonld","@id": "","@type" : "Metadata", "dc:title" : "Some title", "dcterms:abstract": "Some abstract" }
@id
must not be present here, since the URL seems not known at
this point of time.POST {scheme}://{server}/deposit/{repository}
See: https://swordapp.github.io/swordv3/swordv3-behaviours.html#2.2.
POST /api.ka3.uni-koeln.de/deposit/{repository} HTTP/1.1 Host: api.ka3.uni-koeln.de Content-Type: application/json Content-Disposition: attachment; by-reference=true Authorization: Bearer eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00if... { "@context" : "https://swordapp.github.io/swordv3/swordv3.jsonld", "@type" : "ByReference", "byReferenceFiles" : [ { "@id": "https://uni-koeln.sciebo.de/s/RnL6h6q4nVZ3i24/download", "contentType": "application/zip", "contentDisposition": "attachment; filename=testdata.zip", "packaging": "http://purl.org/net/sword/packaging/SimpleZip", "dereference": true,"contentLength": 0,"contentDisposition": "","digest": ""} ] }
contentLength
, contentDisposition
,
and digest
properties must not be present since these data are provided by OwnCloud.POST {scheme}://{server}/deposit/{repository}
See: https://swordapp.github.io/swordv3/swordv3-behaviours.html#2.3.
POST /api.ka3.uni-koeln.de/deposit/{repository} HTTP/1.1 Host: api.ka3.uni-koeln.de Content-Type: application/json Content-Disposition: attachment; metadata=true; by-reference=true Authorization: Bearer eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00if... { "metadata": { "@context": "https://swordapp.github.io/swordv3/swordv3.jsonld", "@type": "Metadata", "dc:title" : "Some title", "dcterms:abstract": "Some abstract" }, "by-reference": { "@context": "https://swordapp.github.io/swordv3/swordv3.jsonld", "@type": "ByReference", "byReferenceFiles": [] } }
GET {scheme}://{server}/deposit/{repository}/{identifier}
See: https://swordapp.github.io/swordv3/swordv3-behaviours.html#3.1.
GET /api.ka3.uni-koeln.de/deposit/{repository}/{identifier} HTTP/1.1 Host: api.ka3.uni-koeln.de Authorization: Bearer eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00if...
GET {scheme}://{server}/deposit/{repository}/{identifier}/metadata
See: https://swordapp.github.io/swordv3/swordv3-behaviours.html#3.2.
GET /api.ka3.uni-koeln.de/deposit/{repository}/{identifier}/metadata HTTP/1.1 Host: api.ka3.uni-koeln.de Authorization: Bearer eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00if...
GET {scheme}://{server}/deposit/{repository}/{identifier}/file/**
See: https://swordapp.github.io/swordv3/swordv3-behaviours.html#3.3.
GET /api.ka3.uni-koeln.de/deposit/{repository}/{identifier}/file/** HTTP/1.1 Host: api.ka3.uni-koeln.de Authorization: Bearer eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00if...
PUT {scheme}://{server}/deposit/{repository}/{identifier}/metadata
See: https://swordapp.github.io/swordv3/swordv3-behaviours.html#5.1.
PUT /api.ka3.uni-koeln.de/deposit/{repository} HTTP/1.1 Host: api.ka3.uni-koeln.de Content-Type: application/json Content-Disposition: attachment; metadata=true Authorization: Bearer eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00if... { "@context": "https://swordapp.github.io/swordv3/swordv3.jsonld", "@id": "https://api.ka3.uni-koeln.de/deposit/a5-1/9b67fab2-d6b7-4155-801b-4cc19278c6b6/metadata", "@type" : "Metadata", "dc:title" : "Some title", "dcterms:abstract": "Some abstract" }
PUT {scheme}://{server}/deposit/{repository}/{identifier}/fileSet
See: https://swordapp.github.io/swordv3/swordv3-behaviours.html#5.5.
PUT /api.ka3.uni-koeln.de/deposit/{repository} HTTP/1.1 Host: api.ka3.uni-koeln.de Content-Type: application/json Content-Disposition: attachment; by-reference=true Authorization: Bearer eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00if... { "@context" : "https://swordapp.github.io/swordv3/swordv3.jsonld", "@type" : "ByReference", "byReferenceFiles" : [ { "@id": "https://uni-koeln.sciebo.de/s/RnL6h6q4nVZ3i24/download", "contentType": "application/zip", "contentDisposition": "attachment; filename=testdata.zip", "packaging": "http://purl.org/net/sword/packaging/SimpleZip", "dereference": true,"contentLength": 0,"contentDisposition": "","digest": ""} ] }
contentLength
, contentDisposition
,
and digest
properties must not be present since these data are provided by OwnCloud.DELETE {scheme}://{server}/deposit/{repository}/{identifier}/fileSet
See: https://swordapp.github.io/swordv3/swordv3-behaviours.html#6.3.
DELETE /api.ka3.uni-koeln.de/deposit/{repository}/{identifier}/fileSet HTTP/1.1 Host: api.ka3.uni-koeln.de Authorization: Bearer eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00if...
DELETE {scheme}://{server}/deposit/{repository}/{identifier}
See: https://swordapp.github.io/swordv3/swordv3-behaviours.html#6.4.
DELETE /api.ka3.uni-koeln.de/deposit/{repository}/{identifier} HTTP/1.1 Host: api.ka3.uni-koeln.de Authorization: Bearer eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00if...