Versions Compared

Key

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

...

Status
colourBlue
titlePOST
 add or modify namespaces

Info

There are some restrictions on what can be modified. (TODO: what are the caveats?)

 

Example:

Code Block
curl -X POST -H "Content-Type: application/sparql-update" -d "@namespaces.rdf" "http://localhost:8080/rest/fcr:namespaces"
 
Body:
# Register the namespace 'info:some-namespace' with the prefix 'some'
INSERT { 
    <info:some-namespace> <http://purl.org/vocab/vann/preferredNamespacePrefix> "some" 
} WHERE { 
 
}

...

Status
titleGET
get an XML Sitemap of content in the repository

Example (1):

Code Block
curl "http://localhost:8080/rest/sitemap"

...

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

Body:
<sitemap>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><sitemap:sitemapindex xmlns:sitemap="http://www..
</sitemap>

Status:

Status
subtletrue
colourGreen
title200
 

 

Full text

Request URI: /fcr:search

Methods: GET

Status
titleGET
 HTML form for submitting SPARQL queries

 

Status
titleGET
execute a fulltext search over indexed properties in the repository

Query Parameters:

...

sitemaps.org/schemas/sitemap/0.9"><sitemap:sitemap><sitemap:loc>http://localhost:8080/rest/sitemap/1</sitemap:loc><sitemap:lastmod>2013-11-15T16:51:38.132-08:00</sitemap:lastmod><sitemap:changefreq>monthly</sitemap:changefreq><sitemap:priority>0.8</sitemap:priority></sitemap:sitemap></sitemap:sitemapindex>

Example (2):

Code Block
curl "http://localhost:8080/rest/sitemap/1"

Response:

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

 
Body:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><sitemap:urlset xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap:url><sitemap:loc>http://localhost:8080/rest/00/cf/42/b8/00cf42b8-3a11-4af0-8972-48be8d9db5cd</sitemap:loc><sitemap:lastmod>2013-11-15T16:52:32.418-08:00</sitemap:lastmod><sitemap:changefreq>monthly</sitemap:changefreq><sitemap:priority>0.8</sitemap:priority></sitemap:url></sitemap:urlset>


Status:

Status
subtletrue
colourGreen
title200
 OK

Full text

Request URI: /fcr:search

Methods: GET

Status
titleGET
 HTML form for submitting SPARQL queries

Request Headers:

Status
subtletrue
titleAccept
 text/html

 

...

 

Status
titleGET
execute a fulltext search over indexed properties in the repository

Query Parameters:

Status
subtletrue
titleq
 Query term

Status
subtletrue
titleoffset
 Pagination control for member resources

Status
subtletrue
titleLIMIT
 Pagination control for member resources

 

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 -H "Accept: text/turtle" "http://localhost:8080/rest/fcr:search?q=bypassAdmin"

Response:

Code Block
Status: 200
 
Headers:
Link: http://localhost:8080/rest/fcr:search?q=bypassAdmin&offset=0&limit=25;rel="first"
Content-Type: text/turtle
Body:

<http://localhost:8080/rest/fcr:search?q=bypassAdmin>
        a       <http://www.w3.org/ns/ldp#Page> , <http://sindice.com/vocab/search#Page> ;
        <http://fedora.info/definitions/v4/repository#hasMember>
                <http://localhost:8080/rest/00/cf/42/b8/00cf42b8-3a11-4af0-8972-48be8d9db5cd> ;
        <http://fedora.info/definitions/v4/rest-api#hasMoreResults>
                false ;
        <http://sindice.com/vocab/search#itemsPerPage>
                "25"^^<http://www.w3.org/2001/XMLSchema#int> ;
        <http://sindice.com/vocab/search#searchTerms>
                "bypassAdmin" ;
        <http://sindice.com/vocab/search#startIndex>
                "0"^^<http://www.w3.org/2001/XMLSchema#long> ;
        <http://sindice.com/vocab/search#totalResults>
                "1"^^<http://www.w3.org/2001/XMLSchema#long> ;
        <http://www.w3.org/ns/ldp#firstPage>
                <http://localhost:8080/rest/fcr:search?q=bypassAdmin&offset=0&limit=25> ;
        <http://www.w3.org/ns/ldp#nextPage>
                ()
         ;
        <http://www.w3.org/ns/ldp#pageOf>
                <http://localhost:8080/rest/fcr:search?q=bypassAdmin> .

<http://localhost:8080/rest/00/cf/42/b8/00cf42b8-3a11-4af0-8972-48be8d9db5cd>
        a       <http://fedora.info/definitions/v4/rest-api#object> , <http://fedora.info/definitions/v4/rest-api#resource> ;
        <http://fedora.info/definitions/v4/repository#created>
                "2013-11-16T00:52:32.432Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
        <http://fedora.info/definitions/v4/repository#createdBy>
                "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
        <http://fedora.info/definitions/v4/repository#lastModified>
                "2013-11-16T00:52:32.418Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
        <http://fedora.info/definitions/v4/repository#lastModifiedBy>
                "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
        <http://fedora.info/definitions/v4/repository#uuid>
                "b9fb7c68-c5c8-4ecd-a1b6-5ffeeeb2ba3d"^^<http://www.w3.org/2001/XMLSchema#string> ;

Status:

Status
subtletrue
colourGreen
title200
 OK

Status
subtletrue
colourRed
title400
 Bad Request

SPARQL

Request URI: /fcr:sparql

Methods: GET

Status
titleGET
HTML form for submitting SPARQL queries

Status
subtletrue
titleoffset
 Pagination control for member resources

Status
subtletrue
titleLIMIT
 Pagination control for member resources

 

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:

 text/html

 

...

 

Status
colourBlue
titlePOST
 execute a query using a subset of SPARQL

Example:

Code Block
curl -H "Content-Type: application/sparql-query" -d @sparqlQuery.txt
Code Block
curl -H "Accept: text/turtle" "http://localhost:8080/rest/fcr:search"sparql"
 
Body:
SELECT ?subject FROM <> WHERE { ?subject dc:title ?title }

Response:

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

Status:

Status
subtletrue
colourGreen
title200
 

SPARQL

Request URI: /fcr:sparql

Methods: GET OK

Status
titleGET
HTML form for submitting SPARQL queries StatuscolourBlue
subtletrue
colourRed
title
POST execute a query using a subset of SPARQL
400
 Bad Request