Request URI: /path/to/some/resource Methods: GET, POST, PUT, PATCH, HEAD, OPTIONS, DELETE, MOVE, COPY
Retrieve the content of the resourceRequest Headers: Byte range of content to retrieve, of the form: "Range: bytes=500-999" RDF sources support content negotiation with these formats: 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/turtleNote: JSON-LD profiles can be requested by using the following Accept headers: Accept: application/ld+json; profile=\"http://www.w3.org/ns/json-ld#expanded\"" - default Accept: application/ld+json; profile=\"http://www.w3.org/ns/json-ld#compacted\"" Accept: application/ld+json; profile=\"http://www.w3.org/ns/json-ld#flattened\"" Number of child resources to list. If paired with Accept: (X)HTML, the default is 100. Otherwise, the default is -1 (all children are listed) Status |
---|
subtle | true |
---|
title | If-None-Match |
---|
|
Status |
---|
subtle | true |
---|
title | If-Modified-Since |
---|
| return=minimalreturn=representation return=representation; include=" URIs " return=representation; omit=" URIs " where minimal indicates that only triples directly related to a resource should be returned, and representation indicates that links to other resources and their properties should also be included. URIs is a space-separate list of LDP defined preferences, and also: URI | Description |
---|
http://fedora.info/definitions/v4/repository#EmbedResources | Embed "child" resources in the returned representation | http://fedora.info/definitions/fcrepo#PreferInboundReferences | Include assertions from other Fedora resources to this node (excluded from representation by default) | http://fedora.info/definitions/v4/repository#ServerManaged | Embed server managed properties in the representation (enabled by default) | Example (1): Turtle
Code Block |
---|
curl -H "Accept: text/turtle" "http://localhost:8080/rest/path/to/resource" |
Response: Code Block | Status: 200 OK
Headers:
ETag: "0ed38fe211c2663ace5322e970e7b7d606196e00"
Last-Modified: Mon, 19 May 2014 19:44:59 GMT
Preference-Applied: return=representation; include="http:http://www.w3.org/ns/oa#PreferContainedDescriptions | Embed "child" resources in the returned representation | http://www.w3.org/ns/ldp#PreferContainment | Include/Exclude "ldp:contains" assertions to contained resources (enabled by default) | http://www.w3.org/ns/ldp#PreferMembership |
| Include/Exclude assertions to member resources established by the Direct and Indirect containers (enabled by default) | http://www.w3.org/ns/ldp#PreferMinimalContainer | Include/Exclude triples that would be present when the container is empty (enabled by default) |
Example (1): Turtle
Code Block |
---|
curl -H "Acceptldp#PreferContainment"
Vary: Prefer
Accept-Patch: application/sparql-update
Allow: MOVE,COPY,DELETE,POST,HEAD,GET,PUT,PATCH,OPTIONS
Accept-Post: text/turtle" "http://localhost:8080/rest/path/to/resource" |
Response: Code Block |
---|
Status: 200 OK
Headers:
ETag: "0ed38fe211c2663ace5322e970e7b7d606196e00"
Last-Modified: Mon, 19 May 2014 19:44:59 GMT
Preference-Applied: return=representation; include="http://,text/rdf+n3,application/n3,text/n3,application/rdf+xml,application/n-triples,multipart/form-data,application/sparql-update
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
Link: <httpldp#PreferMembership http://www.w3.org/ns/ldp#DirectContainer>;rel="type"
Content-Type: text/turtle
Body:
<http://localhost:8080/rest/path/to/resource> <http://fedora.info/definitions/v4/rest-api#hasAccessRoles> <http://localhost:8080/rest/path/to/resource/fcr:accessroles> ;
<http://fedora.info/definitions/v4/rest-ldp#PreferContainment"
Vary: Prefer
Accept-Patch: application/sparql-update
Allow: MOVE,COPY,DELETE,POST,HEAD,GET,PUT,PATCH,OPTIONS
Accept-Post: text/turtle,text/rdf+n3,application/n3,text/n3,application/rdf+xml,application/n-triples,multipart/form-data,application/sparql-update
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
Link: <http://www.w3.org/ns/ldp#DirectContainer>;rel="type"
Content-Type: text/turtle
Body:
<http://localhost:8080/rest/path/to/resource> <http://fedora.info/definitions/v4/rest-api#hasAccessRoles> <http://localhost:8080/rest/path/to/resource/fcr:accessroles> ;
<http://fedora.info/definitions/v4/rest-api#exportsAs> <http://localhost:8080/rest/path/to/resource/fcr:export?format=jcr/xml> ;
<http://fedora.info/definitions/v4/repository#hasParent> <http://localhost:8080/rest/path/to> ;
a <http://www.w3.org/ns/ldp#Container> , <http://www.w3.org/ns/ldp#DirectContainer> ;
<http://www.w3.org/ns/ldp#membershipResource> <http://localhost:8080/rest/path/to/resource> ;
<http://www.w3.org/ns/ldp#hasMemberRelation> <http://fedora.info/definitions/v4/repository#hasChild> ;
a <http://www.jcp.org/jcr/nt/1.0folder> , <http://www.jcp.org/jcr/nt/1.0hierarchyNode> , <http://www.jcp.org/jcr/nt/1.0base> , <http://www.jcp.org/jcr/mix/1.0created> , <http://fedora.info/definitions/v4/rest-api#resource> , <http://fedora.info/definitions/v4/rest-api#object> , <http://fedora.info/definitions/v4/rest-api#relations> , <http://www.jcp.org/jcr/mix/1.0created> , <http://www.jcp.org/jcr/mix/1.0lastModified> , <http://www.jcp.org/jcr/mix/1.0referenceable> , <http://purl.org/dc/elements/1.1/describable> , <http://fedora.info/definitions/v4/rest-api#resource> ;
<http://fedora.info/definitions/v4/repository#primaryType> "nt:folder"^^<http://www.w3.org/2001/XMLSchema#string> ;
<http://fedora.info/definitions/v4/repository#created> "2014-05-19T19:44:59.647Z"^^<http://www.w3.org/2001/XMLSchema#string> ;
<http://fedora.info/definitions/v4/repository#lastModified> "2014-05-19T19:44:59.645Z"^^<http://www.w3.org/2001/XMLSchema#string> ;
<http://fedora.info/definitions/v4/repository#mixinTypes> "fedora:resource"^^<http://www.w3.org/2001/XMLSchema#string> , "fedora:object"^^<http://www.w3.org/2001/XMLSchema#string> ;
<http://fedora.info/definitions/v4/repository#lastModifiedBy> "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
<http://fedora.info/definitions/v4/repository#uuid> "2b655d37-e88a-44c5-86c1-3b3935cdea49"^^<http://www.w3.org/2001/XMLSchema#string> ;
<http://fedora.info/definitions/v4/repository#createdBy> "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
a <http://www.jcp.org/jcr/nt/1.0folder> , <http://www.jcp.org/jcr/nt/1.0hierarchyNode> , <http://www.jcp.org/jcr/nt/1.0base> , <http://www.jcp.org/jcr/mix/1.0created> , <http://fedora.info/definitions/v4/rest-api#resource> , <http://fedora.info/definitions/v4/rest-api#object> , <http://fedora.info/definitions/v4/rest-api#relations> , <http://www.jcp.org/jcr/mix/1.0created> , <http://www.jcp.org/jcr/mix/1.0lastModified>, <http://www.jcp.org/jcr/mix/1.0referenceable> , <http://purl.org/dc/elements/1.1/describable> , <http://fedora.info/definitions/v4/rest-api#resource> . |
Example (2): RDF/XML
Code Block |
---|
curl -H "Accept: application/rdf+xml" "http://localhost:8080/rest/path/to/resource" |
Response: Code Block |
---|
Status: 200 OK
Headers:
ETag: "0ed38fe211c2663ace5322e970e7b7d606196e00"
Last-Modified: Mon, 19 May 2014 19:44:59 GMT
Preference-Applied: return=representation; include="http://www.w3.org/ns/ldp#PreferMembership http://www.w3.org/ns/ldp#PreferContainment"
Vary: Prefer
Accept-Patch: application/sparql-update
Allow: MOVE,COPY,DELETE,POST,HEAD,GET,PUT,PATCH,OPTIONS
Accept-Post: text/turtle,text/rdf+n3,application/n3,text/n3,application/rdf+xml,application/n-triples,multipart/form-data,application/sparql-update
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
Link: <http://www.w3.org/ns/ldp#DirectContainer>;rel="type"
Content-Type: application/rdf+xml
Body:
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="http://localhost:8080/rest/path/to/resource">
<hasAccessRoles xmlns="http://fedora.info/definitions/v4/rest-api#" rdf:resource="http://localhost:8080/rest/path/to/resource/fcr:accessroles"/>
<exportsAs xmlns="http://fedora.info/definitions/v4/rest-api#" rdf:resource="http://localhost:8080/rest/path/to/resource/fcr:export?format=jcr/xml"/>
<hasParent xmlns="http://fedora.info/definitions/v4/repository#" rdf:resource="http://localhost:8080/rest/path/to"/>
<rdf:type rdf:resource="http://www.w3.org/ns/ldp#Container"/>
<rdf:type rdf:resource="http://www.w3.org/ns/ldp#DirectContainer"/>
<membershipResource xmlns="http://www.w3.org/ns/ldp#" rdf:resource="http://localhost:8080/rest/path/to/resource"/>
<hasMemberRelation xmlns="http://www.w3.org/ns/ldp#" rdf:resource="http://fedora.info/definitions/v4/repository#hasChild"/>
<rdf:type rdf:resource="http://www.jcp.org/jcr/nt/1.0folder"/>
<rdf:type rdf:resource="http://www.jcp.org/jcr/nt/1.0hierarchyNode"/>
<rdf:type rdf:resource="http://www.jcp.org/jcr/nt/1.0base"/>
<rdf:type rdf:resource="http://www.jcp.org/jcr/mix/1.0created"/>
<rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#resource"/>
<rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#object"/>
<rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#relations"/>
<rdf:type rdf:resource="http://www.jcp.org/jcr/mix/1.0created"/>
<rdf:type rdf:resource="http://www.jcp.org/jcr/mix/1.0lastModified"/>
<rdf:type rdf:resource="http://www.jcp.org/jcr/mix/1.0referenceable"/>
<rdf:type rdf:resource="http://purl.org/dc/elements/1.1/describable"/>
<rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#resource"/>
<primaryType xmlns="http://fedora.info/definitions/v4/repository#" rdf:datatype="http://www.w3.org/2001/XMLSchema#string">nt:folder</primaryType>
<created xmlns="http://fedora.info/definitions/v4/repository#" rdf:datatype="http://www.w3.org/2001/XMLSchema#string">2014-05-19T19:44:59.647Z</created>
<lastModified xmlns="http://fedora.info/definitions/v4/repository#" rdf:datatype="http://www.w3.org/2001/XMLSchema#string">2014-05-19T19:44:59.645Z</lastModified>
<mixinTypes xmlns="http://fedora.info/definitions/v4/repository#" rdf:datatype="http://www.w3.org/2001/XMLSchema#string">fedora:resource</mixinTypes>
<mixinTypes xmlns="http://fedora.info/definitions/v4/repository#" rdf:datatype="http://www.w3.org/2001/XMLSchema#string">fedora:object</mixinTypes>
<lastModifiedBy xmlns="http://fedora.info/definitions/v4/repository#" rdf:datatype="http://www.w3.org/2001/XMLSchema#string">bypassAdmin</lastModifiedBy>
<uuid xmlns="http://fedora.info/definitions/v4/repository#" rdf:datatype="http://www.w3.org/2001/XMLSchema#string">2b655d37-e88a-44c5-86c1-3b3935cdea49</uuid>
<createdBy xmlns="http://fedora.info/definitions/v4/repository#" rdf:datatype="http://www.w3.org/2001/XMLSchema#string">bypassAdmin</createdBy>
<rdf:type rdf:resource="http://www.jcp.org/jcr/nt/1.0folder"/>
<rdf:type rdf:resource="http://www.jcp.org/jcr/nt/1.0hierarchyNode"/>
<rdf:type rdf:resource="http://www.jcp.org/jcr/nt/1.0base"/>
<rdf:type rdf:resource="http://www.jcp.org/jcr/mix/1.0created"/>
<rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#resource"/>
<rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#object"/>
<rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#relations"/>
<rdf:type rdf:resource="http://www.jcp.org/jcr/mix/1.0created"/>
<rdf:type rdf:resource="http://www.jcp.org/jcr/mix/1.0lastModified"/>
<rdf:type rdf:resource="http://www.jcp.org/jcr/mix/1.0referenceable"/>
<rdf:type rdf:resource="http://purl.org/dc/elements/1.1/describable"/>
<rdf:type rdf:resource="http://fedora.info/definitions/v4/rest-api#resource"/>
</rdf:Description>
</rdf:RDF>
|
Example (3): Prefer headers
Code Block |
---|
curl -i -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/collection -H 'Prefer: return=representation;
include="http://fedora.info/definitions/fcrepo#PreferInboundReferences"; omit="http://www.w3.org/ns/ldp#PreferMembership
http://www.w3.org/ns/ldp#PreferContainment"' |
Response: Code Block |
---|
Status: 200 OK
Headers:
Date: Sat, 13 Oct 2018 00:03:25 GMT
Set-Cookie: JSESSIONID=1pgwewtt9ucywx13hwo9mtjow;Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Fri, 12-Oct-2018 00:03:25 GMT
ETag: W/"fee2096961dcdf1c475d394319fc34a53bec39ac"
Last-Modified: Fri, 12 Oct 2018 23:24:34 GMT
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
Link: <http://www.w3.org/ns/ldp#Container>;rel="type"
Link: <http://www.w3.org/ns/ldp#RDFSource>; rel="type"
Link: <http://www.w3.org/ns/ldp#BasicContainer>;rel="type"
Link: <http://localhost:8080/rest/collection>; rel="timegate"
Link: <http://localhost:8080/rest/collection>; rel="original"
Link: <http://localhost:8080/rest/collection/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
Accept-Patch: application/sparql-update
Accept-Post: text/turtle,text/rdf+n3,text/n3,application/rdf+xml,application/n-triples,application/ld+json
Allow: MOVE,COPY,DELETE,POST,HEAD,GET,PUT,PATCH,OPTIONS
Link: <http://localhost:8080/rest/collection/fcr:acl>; rel="acl"
Preference-Applied: return=representation; include="http://fedora.info/definitions/fcrepo#PreferInboundReferences"; omit="http://www.w3.org/ns/ldp#PreferMembership http://www.w3.org/ns/ldp#PreferContainment"
Vary: Prefer
Vary: Accept
Vary: Range
Vary: Accept-Encoding
Vary: Accept-Language
Vary: Accept-Datetime
Content-Type: text/turtle;charset=utf-8
Content-Length: 1082
Server: Jetty(9.3.25.v20180904)
Body:
@prefix memento: <http://mementoweb.org/ns#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix fedora: <http://fedora.info/definitions/v4/repository#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
<http://localhost:8080/rest/collection>
rdf:type fedora:Container ;
rdf:type fedora:Resource ;
rdf:type ldp:BasicContainer ;
fedora:lastModifiedBy "fedoraAdmin" ;
fedora:createdBy "fedoraAdmin" ;
fedora:created "2018-10-12T23:24:34.286Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
fedora:lastModified "2018-10-12T23:24:34.286Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
rdf:type ldp:RDFSource ;
rdf:type ldp:Container ;
fedora:writable true .
<http://localhost:8080/rest/collection/fcr:versions>
memento:original <http://localhost:8080/rest/collection> .
<http://localhost:8080/rest/item>
ldp:isMemberOfCollection <http://localhost:8080/rest/collection> . |
Example (4): Non-RDF Source
Code Block |
---|
curl "http://localhost:8080/rest/path/to/binary/resource" |
Response: Code Block |
---|
Status: 200 OK
Headers:
ETag: "0ed38fe211c2663ace5322e970e7b7d606196e00"
Last-Modified: Mon, 19 May 2014 19:44:59 GMT
Vary: Prefer
Link: <http://localhost:8080/rest/path/to/binary/resource/fcr:metadata">;rel="describedby"
Content-Type: image/jpg
Body:
{binary content} |
Status: Status |
---|
subtle | true |
---|
colour | Green |
---|
title | 200 |
---|
| OK Status |
---|
subtle | true |
---|
colour | Yellow |
---|
title | 304 |
---|
| Not Modified Status |
---|
subtle | true |
---|
colour | Red |
---|
title | 404 |
---|
| Not Found Status |
---|
| |
---|
subtle | true |
---|
colour | Red |
---|
title | 406 |
---|
| Not Acceptable (the 'Accept' request-header media type is either invalid or unsupported)
Create new resources within a LDP containerRequest Headers: Status |
---|
subtle | true |
---|
title | Content-Disposition |
---|
| (Optional) The filename provided in the content disposition header will be stored in a ebucore:filename property. (See 'Example (6): Uploaded file with filename')
Status |
---|
| |
---|
subtle | true |
---|
title | Content-Type |
---|
| (Optional) MIME type of the uploaded binary or RDF content (See ' Example (2): Create a new child binary resource with empty content ')
Note |
---|
If the MIME type corresponds to a supported RDF format or SPARQL-Update, the uploaded content will be parsed as RDF and used to populate the child node properties. RDF will be interpreted using the current resource as the base URI (e.g. <> will be expanded to the current URI). Namespaces must be declared in full. If the MIME type corresponds to a supported RDF format or SPARQL-Update, and you also provide a Link: <http://www.w3.org/ns/ldp#NonRDFSource>; rel="type" header. Then the contents will be stored as a binary resource with the provided MIME type as Content-type. For other MIME types, the uploaded For other MIME types, the uploaded content will be used to create a binary resource. Supported RDF formats: text/turtle, text/rdf+n3, application/n3, text/n3, application/rdf+xml, application/n-triples, text/html, text/plain, application/ld+json |
(Optional) A suggested name for the new child resource, which the repository may ignore. Note |
---|
The slug you provide does not guarantee the location of the created resource. Clients must check the Location header for the path to the created resource. |
(Optional) A way of providing one or more checksums (SHA-1, SHA-256, MD5) which will be checked against the uploaded content to ensure error-free transfer. The header is interpreted according to RFC-3230 (See 'Example (4): Uploaded file with checksum' and 'Example (5): Uploaded file with checksum mismatch') If the provided checksum does not match the calculated value for the uploaded file a 409 Conflict will be returned. See PATCH example for documentation on how to change the default algorithm used during on-demand fixity checking. Valid `Digest` algorithms/values are: sha, sha-256, or md5. With a value containing subfield rel= http://fedora.info/definitions/fcrepo#ExternalContent the client may provide binary content from an external path. See the external content documentation for details about syntax and handling options (note, this is disabled by default), and Example 7 for usage.
Example (1): Create a new child node
Code Block |
---|
curl -X POST "http://localhost:8080/rest/" |
Response: Code Block |
---|
Status: 201 Created
Headers:
ETag: "3ac31b09de1536a332d9c6ee8453669947721840"
Location: http://localhost:8080/rest/some/path/to/a/new/resource
Body:
http://localhost:8080/rest/some/path/to/a/new/resource |
Anchor |
---|
| post-example2 |
---|
| post-example2 |
---|
| Example (2): Create a new child binary resource with empty content
Code Block |
---|
curl -i -X POST -H "Content-Type:text/plain" "http://localhost:8080/rest" |
Response: Code Block |
---|
Status: 201 Created
ETag: "487f188240d2be3ae32d49958c0eeea18224be0a"
Last-Modified: Thu, 29 May 2014 15:46:13 GMT
Link: <http://localhost:8080/rest/b8/fc/32/be/b8fc32be-34be-428e-bf7c-81be97e5f2e3/fcr:metadata>; rel="describedby"; anchor="http://localhost:8080/rest/b8/fc/32/be/b8fc32be-34be-428e-bf7c-81be97e5f2e3"
Location: http://localhost:8080/rest/b8/fc/32/be/b8fc32be-34be-428e-bf7c-81be97e5f2e3
Content-Type: text/plain
Transfer-Encoding: chunked
Body:
http://localhost:8080/rest/b8/fc/32/be/b8fc32be-34be-428e-bf7c-81be97e5f2e3 |
Anchor |
---|
| post-example3 |
---|
| post-example3 |
---|
| Example (3): Create a new container with RDF properties
Code Block |
---|
curl -i -X POST -H "Content-Type: text/turtle" --data-binary "@body.rdf" "http://localhost:8080/rest/"
Request Body:
PREFIX dc: <http://purl.org/dc/elements/1.1/>
<> dc:title "some-resource-title" |
Response: Code Block |
---|
Status: 201 Created
Headers:
ETag: "a66937ca13bc29c63f7b1a55d447a76cd8f1d573"
Location: http://localhost:8080/rest/new/node/uri
Body:
http://localhost:8080/rest/new/node/uri |
Anchor |
---|
| post-example4 |
---|
| post-example4 |
---|
|
Example (4): Uploaded file with checksum
Code Block |
---|
curl -i -X POST --data-binary "@picture.jpg" -H"digest: sha=cb1a576f22e8e3e110611b616e3e2f5ce9bdb941" "http://localhost:8080/rest/parent/container" |
Response: Code Block |
---|
Status: 201 Created
Headers:
ETag: "fe4e2bf389fe05dab6390564e40012d8d36eca19"
Location: http://localhost:8080/rest/parent/object/auto/generated/ds/id
Body:
http://localhost:8080/rest/parent/object/auto/generated/ds/id |
Anchor |
---|
| post-example4b |
---|
| post-example4b |
---|
| Example (4b): Uploaded file with multiple checksum
Code Block |
---|
curl -i -X POST --data-binary "@picture.jpg" -H"digest: sha=cb1a576f22e8e3e110611b616e3e2f5ce9bdb941, sha-256=95331b60710d0400ee4913b5613c78f54" "http://localhost:8080/rest/parent/container" |
Response: Code Block |
---|
Status: 201 Created
Headers:
ETag: "fe4e2bf389fe05dab6390564e40012d8d36eca19"
Location: http://localhost:8080/rest/parent/object/auto/generated/ds/id
Body:
http://localhost:8080/rest/parent/object/auto/generated/ds/id |
Anchor |
---|
| post-example5 |
---|
| post-example5 |
---|
|
Example (5): Uploaded file with checksum mismatch
Code Block |
---|
curl -X POST --data-binary "@picture.jpg" -H"digest: sha=checksumdoesntmatch" "http://localhost:8080/rest/parent/object" |
Response: Code Block |
---|
Status: 409 Conflict
Body:
Checksum Mismatch of cb1a576f22e8e3e110611b616e3e2f5ce9bdb941 and urn:sha1:checksumdoesntmatch |
Anchor |
---|
| post-example6 |
---|
| post-example6 |
---|
| Example (6): Uploaded file with filename
Code Block |
---|
curl -i -X POST --data-binary "@picture.jpg" -H "Content-Disposition: attachment; filename=\"picture.jpg\"" "http://localhost:8080/rest/parent/container" |
Response: Code Block |
---|
Status: 201 Created
Headers:
ETag: "fe4e2bf389fe05dab6390564e40012d8d36eca19"
Location: http://localhost:8080/rest/parent/object/auto/generated/ds/id
Body:
http://localhost:8080/rest/parent/object/auto/generated/ds/id |
Anchor |
---|
| post_proxy_file |
---|
| post_proxy_file |
---|
| Example (7): Creating a new binary resource using proxied external content
Code Block |
---|
curl -i -X POST -H"Link: <file:///path/to/picture.jpg>; rel=\"http://fedora.info/definitions/fcrepo#ExternalContent\"; handling=\"proxy\"; type=\"image/jpg\"" "http://localhost:8080/rest/parent/container" |
Response:
Code Block |
---|
Status: 201 Created
Headers:
ETag: "fe4e2bf389fe05dab6390564e40012d8d36eca19"
Location: http://localhost:8080/rest/parent/container/<autogenerated-ds-id>
Body:
http://localhost:8080/rest/parent/container/<autogenerated-ds-id> |
Status: Status |
---|
subtle | true |
---|
colour | Green |
---|
title | 201 |
---|
| Created Status |
---|
subtle | true |
---|
colour | Green |
---|
title | 201 |
---|
| Created Status |
---|
| |
---|
subtle | true |
---|
colour | Red |
---|
title | 404 |
---|
| Not Found (resource does not exist – use PUT to specify a new resource name) Status |
---|
| |
---|
subtle | true |
---|
colour | Red |
---|
title | 409 |
---|
| Conflict (checksum mismatch)
Create a resource with a specified path, or replace the binary content or triples associated with a resource with the binary content or triples provided in the request body.
Note |
---|
title | For RDFSource resources |
---|
| Some resource properties are repository managed and cannot be removed or modified. Any attempt to do so may result in a 4xx error. |
Request Headers:
|
Delete requests create "tombstone" resources which need to be removed before you can reuse a URI.
Note: A federated resource can be moved within the federation, but not from the federation to the internal repository (or vice versa)