Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

On this page:

Table of Contents

Methods

Anchor
postServiceInit
postServiceInit

POST serviceInit

Initializes the service by adding the first administrative user.

This method does not require authentication and can only be run once.

HTML Table
border1
cellpadding5
cellspacing0
stylebackground-color: #eee
Table Row (tr)
Table Cell (td)
stylebackground-color: #ccc
Request URI
Table Cell (td)
Append /api/rest/service to the URL of the CloudSync instance
Table Row (tr)
Table Cell (td)
stylebackground-color: #ccc
Query Parameters
Table Cell (td)
None
Table Row (tr)
Table Cell (td)
stylebackground-color: #ccc
Request Formats
Table Cell (td)
application/vnd.fcrepo-cloudsync.serviceinit+json
application/vnd.fcrepo-cloudsync.serviceinit+xml
Table Row (tr)
Table Cell (td)
stylebackground-color: #ccc
Response Formats
Table Cell (td)
application/vnd.fcrepo-cloudsync.serviceinfo+json
application/vnd.fcrepo-cloudsync.serviceinfo+xml
Table Row (tr)
Table Cell (td)
stylebackground-color: #ccc
Typical Status Codes
Table Cell (td)
200 Ok
209 Conflict if the service is already initialized.

Example:

Panel

Request:

No Format
POST /cloudsync/api/rest/service HTTP/1.1
Content-Type: application/vnd.fcrepo-cloudsync.serviceinit+json
Accept: application/vnd.fcrepo-cloudsync.serviceinfo+json
Code Block
{
  serviceInit: {
    initialAdminUsername: "fwilson",
    initialAdminPassword: "puppies1"
  }
}

Response:

No Format
HTTP/1.1 200 OK
Content-Type: application/vnd.fcrepo-cloudsync.serviceinfo+json
Code Block
{
  serviceInfo: {
    buildDate: "2011-10-26 11:50:56 UTC-0400",
    currentUserUri: "https://example.org/path/to/user",
    initialized: false,
    objectSetsUri: "https://example.org/path/to/objectSets",
    objectStoresUri: "https://example.org/path/to/objectStores",
    providerAccountsUri: "https://example.org/path/to/providerAccounts",
    spacesUri: "https://example.org/path/to/spaces",
    taskLogsUri: "https://example.org/path/to/taskLogs",
    tasksUri: "https://example.org/path/to/tasks",
    usersUri: "https://example.org/path/to/users",
    version: "1.0.0"
  }
}

Anchor
getServiceInfo
getServiceInfo

GET serviceInfo

Gets key information about the service, including URIs of other resources that comprise the REST API.

This method does not require authentication.

HTML Table
border1
cellpadding5
cellspacing0
stylebackground-color: #eee
Table Row (tr)
Table Cell (td)
stylebackground-color: #ccc
Request URI
Table Cell (td)
Append /api/rest/service to the URL of the CloudSync instance
Table Row (tr)
Table Cell (td)
stylebackground-color: #ccc
Query Parameters
Table Cell (td)
None
Table Row (tr)
Table Cell (td)
stylebackground-color: #ccc
Request Formats
Table Cell (td)
None
Table Row (tr)
Table Cell (td)
stylebackground-color: #ccc
Response Formats
Table Cell (td)
application/vnd.fcrepo-cloudsync.serviceinfo+json
application/vnd.fcrepo-cloudsync.serviceinfo+xml
Table Row (tr)
Table Cell (td)
stylebackground-color: #ccc
Typical Status Codes
Table Cell (td)
200 Ok

Example:

Panel

Request:

No Format
GET /cloudsync/api/rest/service HTTP/1.1
Accept: application/vnd.fcrepo-cloudsync.serviceinfo+json

Response:

No Format
HTTP/1.1 200 OK
Content-Type: application/vnd.fcrepo-cloudsync.serviceinfo+json
Code Block
{
  serviceInfo: {
    buildDate: "2011-10-26 11:50:56 UTC-0400",
    currentUserUri: "https://example.org/path/to/user",
    initialized: false,
    objectSetsUri: "https://example.org/path/to/objectSets",
    objectStoresUri: "https://example.org/path/to/objectStores",
    providerAccountsUri: "https://example.org/path/to/providerAccounts",
    spacesUri: "https://example.org/path/to/spaces",
    taskLogsUri: "https://example.org/path/to/taskLogs",
    tasksUri: "https://example.org/path/to/tasks",
    usersUri: "https://example.org/path/to/users",
    version: "1.0.0"
  }
}

Media Types

Anchor
serviceInfoJSON
serviceInfoJSON

application/vnd.fcrepo-cloudsync.serviceinfo+json

A JSON object with a serviceInfo field whose value is an associative array of the following fields:

HTML Table
border1
cellpadding5
cellspacing0
stylebackground-color: #eee
Table Row (tr)
stylebackground-color: #ccc
Table Cell (td)
Field
Table Cell (td)
Description
Table Cell (td)
Required?
Table Row (tr)
Table Cell (td)
buildDate
Table Cell (td)
The date the CloudSync software was built
Table Cell (td)
Yes
Table Row (tr)
Table Cell (td)
currentUserUri
Table Cell (td)
A URI that can be used to get the current user via GET user
Table Cell (td)
Yes
Table Row (tr)
Table Cell (td)
initialized
Table Cell (td)
true if POST serviceInit has been successfully called on this instance, false otherwise
Table Cell (td)
Yes
Table Row (tr)
Table Cell (td)
objectSetsUri
Table Cell (td)
The URI to be used for GET objectSets and POST objectSet requests
Table Cell (td)
Yes
Table Row (tr)
Table Cell (td)
objectStoresUri
Table Cell (td)
The URI to be used for GET objectStores and POST objectStore requests
Table Cell (td)
Yes
Table Row (tr)
Table Cell (td)
providerAccountsUri
Table Cell (td)
The URI to be used for GET providerAccounts requests
Table Cell (td)
Yes
Table Row (tr)
Table Cell (td)
spacesUri
Table Cell (td)
The URI to be used for GET spaces requests
Table Cell (td)
Yes
Table Row (tr)
Table Cell (td)
taskLogsUri
Table Cell (td)
The URI to be used for GET taskLogs requests
Table Cell (td)
Yes
Table Row (tr)
Table Cell (td)
tasksUri
Table Cell (td)
The URI to be used for GET tasks and POST task requests
Table Cell (td)
Yes
Table Row (tr)
Table Cell (td)
usersUri
Table Cell (td)
The URI to be used for GET users and POST user requests
Table Cell (td)
Yes
Table Row (tr)
Table Cell (td)
version
Table Cell (td)
The version of the CloudSync software
Table Cell (td)
Yes

Example:

Code Block
{
  serviceInfo: {
    buildDate: "2011-10-26 11:50:56 UTC-0400",
    currentUserUri: "https://example.org/path/to/user",
    initialized: false,
    objectSetsUri: "https://example.org/path/to/objectSets",
    objectStoresUri: "https://example.org/path/to/objectStores",
    providerAccountsUri: "https://example.org/path/to/providerAccounts",
    spacesUri: "https://example.org/path/to/spaces",
    taskLogsUri: "https://example.org/path/to/taskLogs",
    tasksUri: "https://example.org/path/to/tasks",
    usersUri: "https://example.org/path/to/users",
    version: "1.0.0"
  }
}

Anchor
serviceInfoXML
serviceInfoXML

application/vnd.fcrepo-cloudsync.serviceinfo+xml

An XML encoding of the above.

Example:

No Format
borderStyledashed
<serviceInfo>
  <buildDate>2011-10-26 11:50:56 UTC-0400</buildDate>
  <currentUserUri>https://example.org/path/to/user</currentUserUri>
  <initialized>false</initialized>
  <objectSetsUri>https://example.org/path/to/objectSets</objectSetsUri>
  <objectStoresUri>https://example.org/path/to/objectStores</objectStoresUri>
  <providerAccountsUri>https://example.org/path/to/providerAccounts</providerAccountsUri>
  <spacesUri>https://example.org/path/to/spaces</spacesUri>
  <taskLogsUri>https://example.org/path/to/taskLogs</taskLogsUri>
  <tasksUri>https://example.org/path/to/tasks</tasksUri>
  <usersUri>https://example.org/path/to/users</usersUri>
  <version>1.0.0</version>
</serviceInfo>

Anchor
serviceInitJSON
serviceInitJSON

application/vnd.fcrepo-cloudsync.serviceinit+json

A JSON object with a serviceInit field whose value is an associative array of the following fields:

HTML Table
border1
cellpadding5
cellspacing0
stylebackground-color: #eee
Table Row (tr)
stylebackground-color: #ccc
Table Cell (td)
Field
Table Cell (td)
Description
Table Cell (td)
Required?
Table Row (tr)
Table Cell (td)
initialAdminUsername
Table Cell (td)
The username of the initial admin user.
Table Cell (td)
Yes
Table Row (tr)
Table Cell (td)
initialAdminPassword
Table Cell (td)
The password of the initial admin user.
Table Cell (td)
Yes

Example:

Code Block
{
  serviceInit: {
    initialAdminUsername: "fwilson",
    initialAdminPassword: "PuppiesRgr8!"
  }
}

Anchor
serviceInitXML
serviceInitXML

application/vnd.fcrepo-cloudsync.serviceinit+xml

An XML encoding of the above.

Example:

No Format
borderStyledashed
<serviceInit>
  <initialAdminUsername>fwilson</initialAdminUsername>
  <initialAdminPassword>PuppiesRgr8!</initialAdminPassword>
</serviceInit>