Versions Compared

Key

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

...

Update the list of node types

CONTENT-LOCATION (Optional) A URI to a resource to use instead of the request body

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

 

Example:

code

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:

Excerpt

 

Request URI: /fcr:nodetypes

Methods: GET, POST

 


Status
titleGET
 
 get a list of registered types (as RDFS triples)

Request

Request Headers:

Status
subtletrue
titleAccept
  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 "http://localhost:8080/rest/fcr:nodetypes"

Response:

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

Status
subtletrue
colourGreen
title200
 OK

 

Anchor
postpost
Status
colourBlue
titlePOST
Info
Code Block
Status: 204 No Content

Status:

StatussubtletruecolourGreentitle204 No Content: if the node types are updated successfully StatussubtletruecolourRedtitle400 Bad Request: if the CND content is invalid