Sign in or register
for additional privileges

Scalar 1 User’s Guide

You appear to be using an older verion of Internet Explorer. For the best experience please upgrade your IE version or switch to a another web browser.

GET variables

A series of GET variables are available to change the information that is output in RDF. Some options can be placed on queries of any scope, such as the format option. However, others can only be placed in context of certain scopes, such as versions which requires content nodes to be present.

Format

Change the RDF output format. The default is XML.

URL structure: ?format=[xml|json]

Scope: Install, Book, InstancesOf, Node

Example: http://scalar.usc.edu/works/guide/rdf/instancesof/content?format=json

Versions

By default the most recent version of each content node is returned; to return all versions use this option. Note that this can be an expensive call which will take longer for the server to produce.

URL structure: ?versions=1

Scope: InstancesOf, Node

Example: http://scalar.usc.edu/works/guide/rdf/instancesof/content?versions=1

Relationship recursion

By default, content and version nodes will be displayed. However, relationship nodes (hasBody/hasTarget) can be added based on a “recursion level,” or, the amount of recursions through content relationships that will be returned. For example, asking for recursion 1 will return content and version nodes with their direct relationships to other content (ie, that a node is a tag, or in a path). Recursion 2 will return relationships of the nodes that are in turn related to the original nodes. Note that recursion is an expensive call that could take time for the server to produce. Generally, recursion 1 should be sufficient.

URL structure: ?rec=[#]

Scope: InstancesOf, Node

Example: http://scalar.usc.edu/works/guide/rdf/instancesof/content?rec=1

References

Many Scalar pages reference media through URLs in their text content. In the front-end, these references are visualized by the various Scalar views. In the RDF API, these relationships can be output for easy access (removing the need to text-mine the content for the same information). Additionally, each media node will describe what pages reference them (ie, the reverse information).

URL structure: ?ref=1

Scope: InstancesOf, Node

Example: http://scalar.usc.edu/works/guide/rdf/instancesof/content?ref=1

Restrict

Some recursion calls can take a long time for the server produce. Therefore, you can request that only certain relationship types are included in the query. For example, you might request that the server only return path relationships, excluding other types such as tag or annotation.

URL structure: ?res=[path|tag|annotation|reference|reply]

Scope: InstancesOf, Node

Example: http://scalar.usc.edu/works/guide/rdf/instancesof/content?res=path

Search

Searching will return nodes where certain fields (title, description, etc) match the search query.

URL structure: ?sq=(search string)

Scope: InstancesOf

Example: http://scalar.usc.edu/works/guide/rdf/instancesof/content?sq=metadata

Pagination

The number of nodes to return can be restricted using start and results fields. For example, asking for start=0, results=20 will return the first twenty nodes; start=20, results=20 will return the next twenty. 

Note that pagination acts on the base nodes being returned. If recursion is present (?rec=1 or greater), then more than twenty results might be returned in the example above, since the relationship nodes, and the nodes referenced in those relationships, will also be returned along with the base nodes.

URL structure: ?start=(int)&results=(int)

Scope: InstancesOf

Example: http://scalar.usc.edu/works/guide/rdf/instancesof/content?start=20&results=20

Comment on this page
 

Discussion of "GET variables"

Add your voice to this discussion.

Checking your signed in status ...

Previous page on path Working with the API, page 4 of 6 Next page on path