Request URI: /path/to/some/binary Methods: HEAD, GET
Request the fixity checksum for a given digest algorithm Note |
---|
Checking fixity requires retrieving the content from the binary store and may take some time. |
Request Headers: Status |
---|
| |
---|
subtle | true |
---|
title | Want-digest |
---|
| md5, sha, sha-256, sha-512, sha-512/256
Example: Code Block |
---|
curl -I -H "Want-Digest: sha-256" "http://localhost:8080/rest/path/to/some/binary" |
Response (fixity success): Code Block |
---|
Status: 200 OK
Headers:
ETag: "51c5ed5fff4b6c79233cc7573a387902f7d171e7"
Last-Modified: Fri, 04 May 2018 18:14:47 GMT
Content-Type: image/jpeg
Accept-Ranges: bytes
Content-Disposition: attachment; filename="IMG_4023.JPG.jpg"; creation-date="Fri, 04 May 2018 18:14:47 GMT"; modification-date="Fri, 04 May 2018 18:14:47 GMT"; size=47021
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
Link: <http://www.w3.org/ns/ldp#NonRDFSource>;rel="type"
Link: <http://localhost:8080/rest/examples/binary/fcr:acl>; rel="acl"
Link: <http://localhost:8080/rest/examples/binary/fcr:metadata>; rel="describedby"
Link: <http://localhost:8080/static/constraints/NonRDFSourceConstraints.rdf>; rel="http://www.w3.org/ns/ldp#constrainedBy"
Link: <http://localhost:8080/rest/examples/binary>; rel="timegate"
Link: <http://localhost:8080/rest/examples/binary>; rel="original"
Link: <http://localhost:8080/rest/examples/binary/fcr:versions>; rel="timemap"
Link: <http://mementoweb.org/ns#OriginalResource>; rel="type"
Link: <http://mementoweb.org/ns#TimeGate>; rel="type"
Accept-External-Content-Handling: copy,redirect,proxy
Allow: DELETE,HEAD,GET,PUT,OPTIONS
Digest: sha-256=08692ca74dc1e08c84f90feda5e64c72617be850a7c7adca88b03f6ccd3db406
Content-Length: 47021
|
Status: Status |
---|
subtle | true |
---|
colour | Green |
---|
title | 200 |
---|
| OK Status |
---|
| |
---|
subtle | true |
---|
colour | Red |
---|
title | 400 |
---|
| Bad request (the 'Want-Digest' request-header algorithm type is either invalid or unsupported) Status |
---|
subtle | true |
---|
colour | Red |
---|
title | 404 |
---|
| Resource not found
Anchor |
---|
| fcrfixity-service |
---|
| fcrfixity-service |
---|
| NOTE: While the following feature is still available in Fedora 5, it is deprecated and may be removed in a future release.Request URI: /path/to/some/resource/fcr:fixity Methods: GET Get the fixity report for an object Note |
---|
Checking fixity requires retrieving the content from the binary store and may take some time. |
Note |
---|
The /fcr:fixity endpoint is not part of the Fedora API Specification . This feature is currently supported for backwards compatibility reasons and may be removed in a future release. |
Request Headers: application application/ld+json, application/n-triples, application/rdf+xml, application/x-turtle, application/xhtml+xml, application/xml, text/html, text/n3, text/plain, text/rdf+n3, text/turtle
Example: Code Block |
---|
curl -H "Accept: text/turtle" "http://localhost:8080/rest/path/to/some/resource/fcr:fixity" |
Response (fixity success): Code Block |
---|
Status: 200 OK
Headers:
Content-Type: text/turtle
Body:
@prefix premis: <http://www.loc.gov/premis/rdf/v1#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<http://localhost:8080/rest/path/to/some/resource>
premis:hasFixity <http://localhost:8080/rest/path/to/some/resource#fixity/1494431303920> .
<http://localhost:8080/rest/path/to/some/resource#fixity/1494431303920>
rdf:type premis:Fixity ;
rdf:type premis:EventOutcomeDetail ;
premis:hasEventOutcome "SUCCESS" ;
premis:hasMessageDigestAlgorithm "SHA-1" ;
premis:hasMessageDigest <urn:sha1:ca3392593351ef8e6554bdabfbd8bdc1002ecb6f> ;
premis:hasSize "1277811"^^<http://www.w3.org/2001/XMLSchema#long> .
|
Response (fixity failure): Code Block |
---|
Status: 200 OK
Headers:
Content-Type: text/turtle
Body:
@prefix premis: <http://www.loc.gov/premis/rdf/v1#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<http://localhost:8080/rest/path/to/some/resource>
premis:hasFixity <http://localhost:8080/rest/path/to/some/resource#fixity/1494445619308> .
<http://localhost:8080/rest/path/to/some/resource#fixity/1494445619308>
rdf:type premis:Fixity ;
rdf:type premis:EventOutcomeDetail ;
premis:hasEventOutcome "BAD_CHECKSUM" ;
premis:hasEventOutcome "BAD_SIZE" ;
premis:hasMessageDigestAlgorithm "SHA-1" ;
premis:hasMessageDigest <urn:sha1:1d3d03c656cf0a944c393bf9257c6cecdba5263f> ;
premis:hasSize "1287509"^^<http://www.w3.org/2001/XMLSchema#long> . |
Status: Status |
---|
subtle | true |
---|
colour | Green |
---|
title | 200 |
---|
| OK Status |
---|
subtle | true |
---|
colour | Red |
---|
title | 404 |
---|
| Resource not found
Note: Default Fixity AlgorithmWhen ingesting a binary resource, one or more checksums may be provided, see API reference (POST example 4, POST example 4b, PUT example 3). The supported algorithms are: SHA-1, SHA-256 and MD5. By default, the algorithm used by the /fcr:fixity endpoint is SHA-1. However, that may be changed - per resource - to one of the other supported algorithms by configuring the property: fedoraconfig:defaultDigestAlgorithm . See API reference (PATCH example 2).
|