Service document#
- GET /1/servicedocument/#
This is the starting endpoint for the client to discover its initial collection. The answer to this query will describes:
the server’s abilities
connected client’s collection information
Also known as: SD-IRI - The Service Document IRI
Example query:
GET /1/servicedocument/ HTTP/1.1 Host: deposit.softwareheritage.org Authorization: Basic xxxxxxxxxxxx=
Example response:
HTTP/1.1 200 OK Allow: GET, POST, PUT, DELETE, HEAD, OPTIONS Connection: keep-alive Content-Length: 1247 Content-Type: application/xml Date: Thu, 05 Nov 2020 14:27:05 GMT Server: nginx/1.19.2 Vary: Accept X-Frame-Options: SAMEORIGIN <?xml version="1.0" ?> <service xmlns:dcterms="http://purl.org/dc/terms/" xmlns:sword="http://purl.org/net/sword/terms/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://www.w3.org/2007/app"> <sword:version>2.0</sword:version> <sword:maxUploadSize>20971520</sword:maxUploadSize> <workspace> <atom:title>The Software Heritage (SWH) archive</atom:title> <collection href="https://deposit.softwareherigage.org/1/hal/"> <atom:title>SWH Software Archive</atom:title> <accept>application/zip</accept> <accept>application/x-tar</accept> <sword:collectionPolicy>Collection Policy</sword:collectionPolicy> <dcterms:abstract>Software Heritage Archive</dcterms:abstract> <sword:mediation>false</sword:mediation> <sword:metadataRelevantHeader>false</sword:metadataRelevantHeader> <sword:treatment>Collect, Preserve, Share</sword:treatment> <sword:acceptPackaging>http://purl.org/net/sword/package/SimpleZip</sword:acceptPackaging> <sword:service>https://deposit.softwareheritage.org/1/hal/</sword:service> </collection> </workspace> </service>
- Request Headers:
Authorization – Basic authentication token
- Status Codes:
200 OK – no error
401 Unauthorized – Unauthorized