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.
Request URI | Append /api/rest/service to the URL of the CloudSync instance |
Query Parameters | None |
Request Formats | application/vnd.fcrepo-cloudsync.serviceinit+json application/vnd.fcrepo-cloudsync.serviceinit+xml |
Response Formats | application/vnd.fcrepo-cloudsync.serviceinfo+json application/vnd.fcrepo-cloudsync.serviceinfo+xml |
Typical Status Codes | 200 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.
Request URI | Append /api/rest/service to the URL of the CloudSync instance |
Query Parameters | None |
Request Formats | None |
Response Formats | application/vnd.fcrepo-cloudsync.serviceinfo+json application/vnd.fcrepo-cloudsync.serviceinfo+xml |
Typical Status Codes | 200 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:
Field | Description | Required? |
buildDate |
The date the CloudSync software was built | Yes |
currentUserUri |
A URI that can be used to get the current user via GET user | Yes |
initialized |
true if POST serviceInit has been successfully called on this instance, false otherwise |
Yes |
objectSetsUri |
The URI to be used for GET objectSets and POST objectSet requests | Yes |
objectStoresUri |
The URI to be used for GET objectStores and POST objectStore requests | Yes |
providerAccountsUri |
The URI to be used for GET providerAccounts requests | Yes |
spacesUri |
The URI to be used for GET spaces requests | Yes |
taskLogsUri |
The URI to be used for GET taskLogs requests | Yes |
tasksUri |
The URI to be used for GET tasks and POST task requests | Yes |
usersUri |
The URI to be used for GET users and POST user requests | Yes |
version |
The version of the CloudSync software | Yes |
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:
Field | Description | Required? |
initialAdminUsername |
The username of the initial admin user. | Yes |
initialAdminPassword |
The password of the initial admin user. | Yes |
Example:
{ serviceInit: { initialAdminUsername: "fwilson", initialAdminPassword: "PuppiesRgr8!" } }
An XML encoding of the above.
Example:
<serviceInit> <initialAdminUsername>fwilson</initialAdminUsername> <initialAdminPassword>PuppiesRgr8!</initialAdminPassword> </serviceInit>