---
title: "Element <uri>"
source: https://dev.pageseeder.com/api/elements/element_uri.html
description: "API Element reference for <uri>"
last_updated: 2026-08-07T17:09:54+10:00
tokens: ~1727
---

# \<uri\>

## Summary

Represents a URI object in PageSeeder. A URI can be either internal, in which case it is a **document** object or external, in which case it is **URL** object.

## Usage context

| Permitted content | `<displaytitle>`, `<description>`, `<labels>`, `<sharing>` |
| --- | --- |
| Permitted parent | `<uris>` |

## Attributes

This element includes the following attributes:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| archived | `boolean` | no | If `true`, this URI is archived (for URLs only) |
| created | `xs:dateTime` | no | Date time the URI was created in ISO 8601 format (for example, `2012-05-23T15:33:52+10:00`) |
| decodedpath | `xs:string` | yes | URI path not URL encoded (for example, /ps/acme/specs/my product.xml) |
| docid | `document-id` | no | User entered unique document identifier (not for URLs) |
| documenttype | `document-type` | no | Document type (not for URLs) |
| external | `boolean` | no | If `true`, this is a URL |
| folder | `boolean` | no | If `true`, this is a folder (for URLs only). *Deprecated in PageSeeder v5.99.* |
| host | `xs:string` | yes | URI host (for example, mycompany.com) |
| id | [xs:long](../../psml/datatypes/xml_schema_datatypes.md) | yes | Unique and permanent URI identifier. |
| mediatype | `xs:string` | no | URI media type (for example, `text`/`html`) |
| modified | `xs:dateTime` | no | Date time the URI was last modified in ISO 8601 format (for example, `2012-05-23T15:33:52+10:00`) |
| path | `xs:string` | yes | URI path (for example, /ps/acme/specs/product.xml) |
| port | `xs:integer` | yes | URI port number (for example, 80, 443) |
| scheme | `xs:string` | yes | URI scheme (for example, http, https) |
| sharing | `enum` | no | Whether this URI folder is shared (only for folders, possible values are `shared` and `private`) |
| size | `xs:long` | no | The file size in bytes (URLs or non-PSML documents only) |
| source | enum | no | Whether the URL is to the PageSeeder UI or is virtual, can be `pageseeder` or `virtual`. |
| title | `document-title` | no | URI title |
| urltype | `document-type` | no | URL type (external URIs only) |

### `@archived`

A boolean flag indicating whether the URI is archived – only used for URLs (external URIs).

### `@created`

Date and time the URI was created in ISO 8601 date time format, including the timezone.

For example: `2012-05-23T15:33:52+10:00`

### `@decodedpath`

The path of the URI in its URL-decoded form.

For example: `/ps/acme/specs/myproduct.psml`

### `@docid`

The Doc ID of the document (not used for URLs).

It can only contain alphanumeric characters, hyphens and underscores.

> **Note:** The Doc ID is a system-wide ID that is guaranteed to be unique within the URI host, but it can be used as a public identifier for the document.

### `@documenttype`

The document type of the document URI if any (not used for URLs).

It can only contain alphanumeric characters and underscores.

### `@external`

A boolean flag indicating whether the URI refers to a PageSeeder URL instead of a regular document.

### `@folder`

A boolean flag indicating whether the URI refers to a folder instead of a regular document – only used for URLs (external URIs).

> **Deprecated:** This attribute is deprecated as of PageSeeder v5.99.

### `@host`

The URI host.

### `@id`

The unique ID of the URI.

The URI is a system-wide unique ID for the document that is specific to the PageSeeder instance.

### `@mediatype`

The media type of the URI.

All PSML documents have the media type: `application/vnd.pageseeder.psml+xml`

### `@modified`

The last time the URI was modified in ISO 8601 date time format. Any edit, note or version  updates this field.

### `@path`

The URL-encoded path of the URI.

### `@port`

The port for the URI.

### `@scheme`

The scheme for the URI.

### `@size`

The size in bytes (for non-PSML documents or URL only).

### `@shared`

Whether the URI folder is shared is, can be `private` or `shared`. Only for `@mediatype="folder"`.

To avoid duplicates this field is not output in JSON format when there is a contained [sharing](element_sharing.md) object.

### `@source`

Whether the URL is to the PageSeeder UI or is virtual, can be `pageseeder` or `virtual`.

*This attribute was introduced in PageSeeder 5.99.*

### `@title`

The title of the URI.

### `@urltype`

The URL type of the document,if any (external URIs only). Used by upload if no document/@type.

It can only contain alphanumeric characters and underscores.

*This attribute was introduced in PSML v1.3 in PageSeeder 5.99.*

## Examples

```lang-xml

<uri id="602"
     scheme="https"
     host="localhost"
     port="443"
     path="/ps/dev/group/documents/pages/001.psml"
     decodedpath="/ps/dev/group/documents/pages/001.psml"
     mediatype="application/vnd.pageseeder.psml+xml"
     documenttype="page"
     created="2017-03-01T17:31:25+11:00"
     modified="2017-03-02T16:19:22+11:00"
     title="Page 001">
  <displaytitle>Page 001</displaytitle>
</uri>
<uri id="723"
     scheme="https"
     host="api.example.org"
     port="443"
     path="/services/account/create.html"
     decodedpath="/services/account/create.html"
     external="true"
     created="2017-03-03T12:03:26+11:00"
     modified="2020-04-14T12:41:17+11:00"
     title="POST account – API">
  <displaytitle>POST account – API
  </displaytitle>
  <description>An example of external URI.</description>
</uri>
```

## Schema

### XML Schema

```lang-xml

<xs:element name="uri" type="uri-type" />

<xs:complexType name="uri">
  <xs:all>
    <xs:element name="displaytitle" type="xs:string" minOccurs="1"/>
    <xs:element name="description"  type="xs:string" minOccurs="0"/>
    <xs:element ref="labels" minOccurs="0"/>
  </xs:all>
  <xs:attribute name="id"         type="xs:long"    use="required"/>
  <xs:attribute name="docid"      type="document-id" />
  <xs:attribute name="scheme"     type="xs:string"  use="required"/>
  <xs:attribute name="host"       type="xs:string"  use="required"/>
  <xs:attribute name="port"       type="xs:integer" use="required"/>
  <xs:attribute name="path"       type="xs:string"  use="required"/>
  <xs:attribute name="decodedpath" type="xs:string" use="required"/>
  <xs:attribute name="title"      type="xs:string" />
  <xs:attribute name="created"    type="xs:string"/>
  <xs:attribute name="modified"   type="xs:string"/>
  <xs:attribute name="documenttype" type="document-type"/>
  <xs:attribute name="mediatype"  type="xs:string"/>
  <xs:attribute name="external"   type="boolean"/>
  <xs:attribute name="folder"     type="boolean"/>
  <xs:attribute name="archived"   type="boolean"/> 
  <xs:attribute name="size"       type="xs:long"/>
  <xs:attribute name="urltype"    type="xs:string"/>
  <xs:attribute name="source"     type="xs:string"/>
</xs:complexType>
```

 

## Compatibility

No change since initial API release.

