Archived

If you are looking for the last documentation in the 4.x series, see 4.7.5. Looking for another version? See all documentation.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

Request URI: /path/to/some/resource/fcr:fixity

Methods: GET

GET Get the fixity report for an object

Checking fixity requires retrieving the content from the binary store and may take some time.

 

Request Headers:

ACCEPT  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:

curl -H "Accept: text/turtle" "http://localhost:8080/rest/path/to/some/resource/fcr:fixity"

Response (fixity success):

Status: 200 OK
 
Headers:
Content-Type: text/turtle
 
Body:

<http://localhost:8080/rest/path/to/some/resource#fixity/1400589459772> a <http://www.loc.gov/premis/rdf/v1#Fixity> .

<http://localhost:8080/rest/path/to/some/resource> <http://www.loc.gov/premis/rdf/v1#hasFixity> <http://localhost:8080/rest/path/to/some/resource#fixity/1400589459772> .

<http://localhost:8080/rest/path/to/some/resource#fixity/1400589459772> <http://www.loc.gov/premis/rdf/v1#hasContentLocation> <info://org.modeshape.jcr.value.binary.FileSystemBinaryStore@7bcc39fb/fcrepo4/fcrepo-webapp/fcrepo4-data/fcrepo.binary.directory#f7d787ee7fc58ce7fc257ae0067a2c65476be750> .

<info://org.modeshape.jcr.value.binary.FileSystemBinaryStore@7bcc39fb/fcrepo4/fcrepo-webapp/fcrepo4-data/fcrepo.binary.directory#f7d787ee7fc58ce7fc257ae0067a2c65476be750> a <http://www.loc.gov/premis/rdf/v1#ContentLocation> ;
    <http://www.loc.gov/premis/rdf/v1#hasContentLocationValue> "info://org.modeshape.jcr.value.binary.FileSystemBinaryStore@7bcc39fb/fcrepo4/fcrepo-webapp/fcrepo4-data/fcrepo.binary.directory#f7d787ee7fc58ce7fc257ae0067a2c65476be750"^^<http://www.w3.org/2001/XMLSchema#string> .


Response (fixity failure):

Status: 200 OK
Headers:
Content-Type: text/turtle
 
Body:

<http://localhost:8080/rest/path/to/some/resource#fixity/1400589459772> a <http://www.loc.gov/premis/rdf/v1#Fixity> .

<http://localhost:8080/rest/path/to/some/resource> <http://www.loc.gov/premis/rdf/v1#hasFixity> <http://localhost:8080/rest/path/to/some/resource#fixity/1400589459772> .

<http://localhost:8080/rest/path/to/some/resource#fixity/1400589459772> <http://www.loc.gov/premis/rdf/v1#hasContentLocation> <info://org.modeshape.jcr.value.binary.FileSystemBinaryStore@7bcc39fb/fcrepo4/fcrepo-webapp/fcrepo4-data/fcrepo.binary.directory#f7d787ee7fc58ce7fc257ae0067a2c65476be750> .

<http://localhost:8080/rest/path/to/some/resource#fixity/1400589459772> <http://www.loc.gov/premis/rdf/v1#hasEventOutcome> "BAD_CHECKSUM"^^<http://www.w3.org/2001/XMLSchema#string> , "BAD_SIZE"^^<http://www.w3.org/2001/XMLSchema#string> ;
        <http://www.loc.gov/premis/rdf/v1#hasMessageDigest> <urn:sha1:b04bded0d83b74ac0c700945e24e43e823eb5821> ;
        <http://www.loc.gov/premis/rdf/v1#hasSize> "1324943"^^<http://www.w3.org/2001/XMLSchema#int> .

Status:

200  OK

404 Resource not found

Default Fixity Algorithm

When ingesting a binary resource, one or more checksums may be provided, see API reference (POST example 4b). The supported algorithms are: SHA-1, SHA-256 and MD5.
By default, the algorithm used by the Fixity service is SHA-1. However, that may be changed to one of the other supported algorithms by configuring the property: fedoraconfig:defaultDigestAlgorithm . See API reference (PATCH example 2).

 

  • No labels