Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Status
subtletrue
colourGreen
title201
  Created

Content Modeling

Request URI: /fcr:nodetypes

...

Code Block
Status: 200 OK
 
Headers:
Content-Type: text/turtle
Body:
<x> <y> <z> 

Status:

Status
subtletrue
colourGreen
title200
 

 

 

...




<http://fedora.info/definitions/v4/rest-api#object>
        a       <http://www.w3.org/2000/01/rdf-schema#Class> ;
        <http://www.w3.org/2000/01/rdf-schema#label>
                "fedora:object" ;
        <http://www.w3.org/2000/01/rdf-schema#subClassOf>
                <http://fedora.info/definitions/v4/rest-api#resource> .


<http://fedora.info/definitions/v4/rest-api#resource>
        a       <http://www.w3.org/2000/01/rdf-schema#Class> ;
        <http://www.w3.org/2000/01/rdf-schema#label>
                "fedora:resource" ;
        <http://www.w3.org/2000/01/rdf-schema#subClassOf>
                <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.0lockable> , <http://www.jcp.org/jcr/mix/1.0versionable> .

[...]

Status:

Status
subtletrue
colourGreen
title200
 OK

 

...

 

Status
colourBlue
titlePOST
Update the list of node types

Warning

The request body format for updating nodetypes is in flux. For now, and in the immediate future, it uses  JCR's CND syntax , but we'd prefer a provider-independent format.

Example:

Code Block
curl -X POST -H "Content-Type: text/cnd" -d "@cnd.txt" "http://localhost:8080/rest/fcr:nodetypes"
 
Body:
 
[fedora:custom_node_type] > fedora:resource mixin
    - fedora:thumbnail (string)
 

Response:

Code Block
Status: 204 No Content

Status:

Status
subtletrue
colourGreen
title204
 No Content

Namespaces

Request URI: /fcr:namespaces

Methods: GET, POST

Status
titleGET
get a list of registered namespaces and default prefixes

Request Headers:

Status
subtletrue
titleAccept
  text/turtle, text/rdf+n3, application/n3, text/n3, application/rdf+xml, application/json+rdf, application/n-triples, text/html

Example:

Code Block
curl "http://localhost:8080/rest/fcr:namespaces"

Response:

Code Block
Status: 200 OK
 
Headers:
Content-Type: text/turtle

Body:

@prefix dc:    <http://purl.org/dc/terms/> .
@prefix nt:    <http://www.jcp.org/jcr/nt/1.0> .
@prefix fcrepo: <http://fedora.info/definitions/v4/repository#> .
dc:     a       <http://purl.org/vocommons/voaf#Vocabulary> ;
        <http://purl.org/vocab/vann/preferredNamespacePrefix>
                "dc" ;
        <http://purl.org/vocab/vann/preferredNamespaceUri>
                "http://purl.org/dc/terms/" .


fcrepo:  a      <http://purl.org/vocommons/voaf#Vocabulary> ;
        <http://purl.org/vocab/vann/preferredNamespacePrefix>
                "fcrepo" ;
        <http://purl.org/vocab/vann/preferredNamespaceUri>
                "http://www.jcp.org/jcr/1.0" .

nt:     a       <http://purl.org/vocommons/voaf#Vocabulary> ;
        <http://purl.org/vocab/vann/preferredNamespacePrefix>
                "nt" ;
        <http://purl.org/vocab/vann/preferredNamespaceUri>
                "http://www.jcp.org/jcr/nt/1.0" .
[....]
Warning

The request body format for updating nodetypes is in flux. For now, and in the immediate future, it uses  JCR's CND syntax , but we'd prefer a provider-independent format.

Example:

Code Block
curl -X POST -H "Content-Type: text/cnd" -d "@cnd.txt" "http://localhost:8080/rest/fcr:nodetypes"
 
Body:
 
[fedora:custom-node-type] > [fedora:resource]
    - fedora:thumbnail (string)
 

Response:

Code Block
Status: 204 No Content

Status:

...

Namespaces

Request URI: /fcr:namespaces

Methods: GET, POST

Status
titleGET
get a list of registered namespaces and default prefixes

Request Headers:

Status
subtletrue
titleAccept
  text/turtle, text/rdf+n3, application/n3, text/n3, application/rdf+xml, application/json+rdf, application/n-triples, text/html

Example:

Code Block
curl "http://localhost:8080/rest/fcr:namespaces"

Response:

Code Block
Status: 200 OK
 
Headers:
Content-Type: text/turtle
Body:
<x> <y> <z> 

Status:

Status
subtletrue
colourGreen
title200
  Ok

 

...

 

Status
colourBlue
titlePOST
 add or modify namespaces

...