This task creates a web script description document for a Folder Listing web
script.
-
Log in to SkyVault Explorer:
- Open a web browser and enter the URL: http://localhost:8080/SkyVault
- If prompted, log in with the user name admin and password admin.
- Navigate to Company Home > Data Dictionary > Web Scripts Extensions.
-
Create a folder to represent the top-level package structure:
- In the Create menu, click Create Space.
- Enter the name for the folder in the Name field, such as: org
- Click Create Space.
-
Create a sub-package:
- Navigate to Company Home > Data Dictionary > Web Scripts Extensions > org.
- In the Create menu, click Create Space.
- Enter the name for the folder in the Name field, such as: example
- Click Create Space.
- Navigate to Company Home > Data Dictionary > Web Scripts Extensions > org > example.
-
Create a web script description document for the Folder Listing example:
- In the Create menu, click Create Content.
- Enter the name for the web script in the Name field, such as: dir.get.desc.xml
- In the Content Type list, select XML.
- Click Next.
-
Type the following in the Enter Content box:
<webscript> <shortname>Folder Listing Utility</shortname> <description>Sample demonstrating the listing of folder contents</description> <url>/dir/{folderpath}?verbose={verbose?}</url> <format default="html">extension</format> <authentication>user</authentication> </webscript>
- Click Next, click Finish, and then click OK.
You now have a web script package named /org/example where you will
place all your component files for the Folder Listing web script. You have already placed the
description document there, which is named dir.get.desc.xml.
Your Folder Listing web script defines the following short name and description:
<shortname>Folder Listing Utility</shortname><description>Sample demonstrating the listing of folder contents</description>
As the Folder Listing web script queries the SkyVault content repository, you must ensure that only authenticated users have access. This means the web script will only return folder contents that the authenticated user has permission to see.
Your Folder Listing web script defines the following level of authentication: <authentication>user</authentication>