Prearchive API
Get A List Of All Sessions In The Prearchive
This REST endpoint returns a list of all sessions waiting to be archived that the currently logged-in user has permission to view.
GET - /data/prearchive/projects
GET - /data/prearchive/projects/{project-id}
Parameters
{project-id} | Optional path parameter. Restricts the results to a specified project |
---|---|
format | Optional querystring parameter. Specify the format of the response text
|
Response
{
"ResultSet": {
"Result": [
{
"autoarchive": "",
"folderName": "string",
"lastmod": "datetime",
"name": "string",
"prevent_anon": boolean,
"prevent_auto_commit": boolean,
"project": "string {project-id}",
"PROTOCOL": "",
"scan_date": "date",
"scan_time": "time",
"SOURCE": "SessionImporter",
"status": "string",
"subject": "string",
"tag": "string {UID}",
"timestamp": "string",
"TIMEZONE": "",
"uploaded": "datetime",
"url": "relative path",
"VISIT": ""
}
]
}
}
Move A Session To A New Project
When an image session is imported into the prearchive, session metadata is inspected to determine which project it should eventually be archived in. This also determines which project users can see this session in the prearchive. If no project is found, an image session will go into the "Unassigned" prearchive, which is only visible to site administrators. This REST endpoint allows admins or project owners to change the project associated with an image session.
This URI is a mirror of /data/prearchive/projects/{project-id}/{timestamp}/{session-label}?action=move
, where the src param replaces the relative path and move replaces the action parameter
POST - /data/services/prearchive/move
Parameters
src | Required body parameter: The location of the session relative to the prearchive path. (e.g. /prearchive/projects/Sample_Project/20140411_140005287/Sample_Session) |
---|---|
newProject | Required body parameter: The ID of the destination project |
async | Optional body parameter. Default is "false" |
format | Optional querystring parameter. Specify the format of the response text
|
Response (JSON format shown)
{
"ResultSet": {
"Result": [
{
"autoarchive": "",
"folderName": "string",
"lastmod": "datetime",
"name": "string",
"prevent_anon": boolean,
"prevent_auto_commit": boolean,
"project": "string {project-id}",
"PROTOCOL": "",
"scan_date": "date",
"scan_time": "time",
"SOURCE": "SessionImporter",
"status": "string",
"subject": "string",
"tag": "string {UID}",
"timestamp": "string",
"TIMEZONE": "",
"uploaded": "datetime",
"url": "relative path",
"VISIT": ""
}
]
}
}
Rebuild An Image Session Listing
Refreshes the session XML metadata. Note that if a session was moved, this function will not reset the project to its original state.
POST - /data/services/prearchive/rebuild
Parameters
src | Required body parameter. The location of the session relative to the prearchive path. (e.g. /prearchive/projects/Sample_Project/20140411_140005287/Sample_Session) |
---|---|
format | Optional querystring parameter. Specify the format of the response text
|
Response (JSON format shown)
{
"ResultSet": {
"Result": [
{
"autoarchive": "",
"folderName": "string",
"lastmod": "datetime",
"name": "string",
"prevent_anon": boolean,
"prevent_auto_commit": boolean,
"project": "string {project-id}",
"PROTOCOL": "",
"scan_date": "date",
"scan_time": "time",
"SOURCE": "SessionImporter",
"status": "string",
"subject": "string",
"tag": "string {UID}",
"timestamp": "string",
"TIMEZONE": "",
"uploaded": "datetime",
"url": "relative path",
"VISIT": ""
}
]
}
}
Delete An Image Session From The Prearchive
This URI is a mirror of DELETE - /data/prearchive/projects/{project-id}/{timestamp}/{session-label}
, where the src param replaces the relative path
POST - /data/services/prearchive/delete
Parameters
src | Required body parameter. The location of the session relative to the prearchive path. (e.g. /prearchive/projects/Unassigned/20140411_140005287/Sample_Session) |
---|---|
format | Optional querystring parameter. Specify the format of the response text
|
Response (JSON format shown)
{
"ResultSet": {
"Result": [
{
"autoarchive": "",
"folderName": "string",
"lastmod": "datetime",
"name": "string",
"prevent_anon": boolean,
"prevent_auto_commit": boolean,
"project": "string {project-id}",
"PROTOCOL": "",
"scan_date": "date",
"scan_time": "time",
"SOURCE": "SessionImporter",
"status": "string",
"subject": "string",
"tag": "string {UID}",
"timestamp": "string",
"TIMEZONE": "",
"uploaded": "datetime",
"url": "relative path",
"VISIT": ""
}
]
}
}
Get A List Of Scans From A Session In The Prearchive
GET - /data/prearchive/projects/{project-id}/{timestamp}/{session}/scans
Parameters
project-id/timestamp/session | These src path attributes can be found in the "url" parameter of one of the above queries for sessions in the Prearchive |
---|
Response
{
"ResultSet": {
"Result": [
{
"ID": "integer"
"series_description": "string",
"xsiType": "xsiType",
}
]
}
}
Delete A Single Scan From A Session In The Prearchive
Specify a Scan ID from the above query.
DELETE - /data/prearchive/projects/{project-id}/{timestamp}/{session}/scans/{scan-ID}
Parameters
project-id/timestamp/session | These src path attributes can be found in the "url" parameter of one of the above queries for sessions in the Prearchive |
---|---|
{scan-ID} | Required path parameter. |
Get A List Of Scan Resources From A Session In The Prearchive
GET - /data/prearchive/projects/{project-id}/{timestamp}/{session}/scans/{scan-ID}/resources
Get A List Of Scan Resource Files From A Session In The Prearchive
GET - /data/prearchive/projects/{project-id}/{timestamp}/{session}/scans/{scan-ID}/resources/{resource}/files
Get A Scan Resource File From A Session In The Prearchive
GET - /data/prearchive/projects/{project-id}/{timestamp}/{session}/scans/{scan-ID}/resources/{resource}/files/{filename}
Set Project Prearchive Settings
PUT - /data/projects/{project-id}/prearchive_code/{prearchive-code}
Parameters
project-id | Required body parameter. Specify the project ID of the project to set |
---|---|
prearchive-code | Use one of the following three single-digit options:
|
Check Project Prearchive Settings
GET - /data/projects/{project-id}/prearchive_code