Skip to main content

 Services

Web services from /about to /webhooks

default

/uri/{uri} [GET]

com.pageseeder.Default

Description

This service accepts GET, HEAD or OPTIONS requests for a file (document) stored on PageSeeder, checks access permission and fetches the file.

It must be accessed through one of the following URL paths:

  • /ps/uri/[uriid][ext] (e.g. /ps/uri/123 or /ps/uri/123.gif)
  • /ps/docid/[docid] (e.g. /ps/docid/myid123)
  • /ps/uri?path=/ps/acme/specs/doc.psml

If publication=true and publicationid is not specified then the publications for this document (that the current member can access) are ordered alphabetically by display title (then by ID) and the first publication is used.

The HTTP cache headers returned depend on the publication (if any) and whether there is any content transcluded from other documents as follows:

no publicationpublication root accessible to ps-grouppublication root NOT accessible to ps-group
transcluded content

Cache-Control: no-cache

Cache-Control: no-cache

Cache-Control: no-cache

NO transcluded content

Cache-Control: must-revalidate

ETag: [document etag]

Last-Modified: [document modified date]

Cache-Control: must-revalidate

ETag: [publication etag]

Last-Modified: [publication modified date]

Cache-Control: private, must-revalidate

ETag: [publication etag]

Last-Modified: [publication modified date]

Parameters

Name Description Required Type Default value
uriid The URI ID of the document (required if no docid or path and overrides it) maybe long [from path info]
docid The document ID of the document (required if no uriid or path) maybe string [from path info]
path The path for the document (required if no uriid or docid) maybe path
group The group for the document edits (for backward compatibility, pre v6 different groups could have different edits) no string [the first user’s group with access]
versionid The version ID of the document/metadata to return (overrides version). As of PageSeeder v5.99 it can be any event ID. no long
version The version of the document/metadata to return (applies to transclusions and auto-numbering). If ‘original’ or ‘current’, load original or current version. If the value is a float or ISO 8601 date and none match, the closest previous version is loaded. no string [current version]
compareuriid The URI ID of the document to compare with (requires compare or compareid) no long [uriid]
compareid The version ID to compare the selected version with (overrides compare) As of PageSeeder v5.99 it can be any event ID. no long
compare The version to compare the selected version with (applies to auto-numbering). If ‘original’ or ‘current’, compare with original or current version. If the value is a float or ISO 8601 date and none match, the closest previous version is loaded. no string
compare-diffx The diffx markup to include for comparison, can be none, combined, split  (true=combined and if no compareid or compare, compare with current version) no enum none
compare-position The position (instance number) of the xompare document in the publication (requires publication=true and compareuriid ) no integer [first embedded position of URI]
compare-publicationid The ID of the publication for compare document numbering (requires publication=true and compareuriid) no publicationid [first publication found for URI]
transclude Whether to transclude content for transclude xrefs (only applies if no compare* parameters) no boolean false
ps-reload Whether to refresh the document XML cache contents (requires psml=true for non-PSML documents) no boolean false
psml Whether to return PSML metadata for non-PSML files no boolean false
position The position (instance number) of this document in the publication (requires publication=true) no integer [first embedded position of URI]
publication Whether to use publication for version and adjustments (e.g. numbering) in content no boolean false
publicationid The ID of the publication context for version and numbering, empty means standalone (requires publication=true) no publicationid [first publication found for URI]
behavior If set to ‘download’, add filename attachment headers to trigger download by browser no string

For backward compatibility parameter names can be prefixed by “ps-” and “docPath” can be used for "path".

Permission

You must have permission to view the document in order to invoke this service.

Response

The response depends on the media type of the document.

Error handling

PageSeeder Return Status

StatusDescription
errorResource Not Available
errorResource Not Found
Created on , last edited on