Old Release

This documentation covers an old version of Fedora. 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 Next »

Request URI: /fcr:nodetypes

Methods: GET, POST

 


 

GET  get a list of registered types (as RDFS triples)

Request

Request Headers:

ACCEPT  text/turtle, text/rdf+n3, application/n3, text/n3, application/rdf+xml, application/json+rdf, application/n-triples, text/html

Example:

curl "http://localhost:8080/rest/fcr:nodetypes"

Response:

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


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

200 OK

 


POST Update the list of node types

The request body format for updating nodetypes is JCR's CND syntax.  

Example:

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

Response:

Status: 204 No Content

Status:

204 No Content

  • No labels