CloudSync Project
CloudSync 1.1.x (Current Release)
CloudSync 1.0.x
Old Release
This documentation covers an old version of Fedora CloudSync. Looking for another release? See the links to the left.
On this page:
Initializes the service by adding the first administrative user.
This method does not require authentication and can only be run once.
/api/rest/service
to the URL of the CloudSync instance200 Ok
209 Conflict
if the service is already initialized.Example:
Request:
POST /cloudsync/api/rest/service HTTP/1.1 Content-Type: application/vnd.fcrepo-cloudsync.serviceinit+json Accept: application/vnd.fcrepo-cloudsync.serviceinfo+json
{ serviceInit: { initialAdminUsername: "fwilson", initialAdminPassword: "puppies1" } }
Response:
HTTP/1.1 200 OK Content-Type: application/vnd.fcrepo-cloudsync.serviceinfo+json
{ 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" } }
Gets key information about the service, including URIs of other resources that comprise the REST API.
This method does not require authentication.
/api/rest/service
to the URL of the CloudSync instance200 Ok
Example:
Request:
GET /cloudsync/api/rest/service HTTP/1.1 Accept: application/vnd.fcrepo-cloudsync.serviceinfo+json
Response:
HTTP/1.1 200 OK Content-Type: application/vnd.fcrepo-cloudsync.serviceinfo+json
{ 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" } }
A JSON object with a serviceInfo
field whose value is an associative array of the following fields:
buildDate
currentUserUri
initialized
true
if POST serviceInit has been successfully called on this instance, false
otherwiseobjectSetsUri
objectStoresUri
providerAccountsUri
spacesUri
taskLogsUri
tasksUri
usersUri
version
Example:
{ 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" } }
An XML encoding of the above.
Example:
<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>
A JSON object with a serviceInit
field whose value is an associative array of the following fields:
initialAdminUsername
initialAdminPassword
Example:
{ serviceInit: { initialAdminUsername: "fwilson", initialAdminPassword: "PuppiesRgr8!" } }
An XML encoding of the above.
Example:
<serviceInit> <initialAdminUsername>fwilson</initialAdminUsername> <initialAdminPassword>PuppiesRgr8!</initialAdminPassword> </serviceInit>