Current Release

This documentation covers the latest release of Fedora CloudSync.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

On this page:

Methods

POST serviceInit

Initializes the service by adding the first administrative user.

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

Unknown macro: {table}
Unknown macro: {tr}
Unknown macro: {td}

Request URI

Unknown macro: {td}

Append /api/rest/service to the URL of the CloudSync instance

Unknown macro: {tr}
Unknown macro: {td}

Query Parameters

Unknown macro: {td}

None

Unknown macro: {tr}
Unknown macro: {td}

Request Formats

Unknown macro: {tr}
Unknown macro: {td}

Response Formats

Unknown macro: {tr}
Unknown macro: {td}

Typical Status Codes

Unknown macro: {td}

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"
  }
}

GET serviceInfo

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

This method does not require authentication.

Unknown macro: {table}
Unknown macro: {tr}
Unknown macro: {td}

Request URI

Unknown macro: {td}

Append /api/rest/service to the URL of the CloudSync instance

Unknown macro: {tr}
Unknown macro: {td}

Query Parameters

Unknown macro: {td}

None

Unknown macro: {tr}
Unknown macro: {td}

Request Formats

Unknown macro: {td}

None

Unknown macro: {tr}
Unknown macro: {td}

Response Formats

Unknown macro: {tr}
Unknown macro: {td}

Typical Status Codes

Unknown macro: {td}

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"
  }
}

Media Types

application/vnd.fcrepo-cloudsync.serviceinfo+json

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

Unknown macro: {table}
Unknown macro: {tr}
Unknown macro: {td}

Field

Unknown macro: {td}

Description

Unknown macro: {td}

Required?

Unknown macro: {tr}
Unknown macro: {td}

buildDate

Unknown macro: {td}

The date the CloudSync software was built

Unknown macro: {td}

Yes

Unknown macro: {tr}
Unknown macro: {td}

currentUserUri

Unknown macro: {td}

A URI that can be used to get the current user via GET user

Unknown macro: {td}

Yes

Unknown macro: {tr}
Unknown macro: {td}

initialized

Unknown macro: {td}

true if POST serviceInit has been successfully called on this instance, false otherwise

Unknown macro: {td}

Yes

Unknown macro: {tr}
Unknown macro: {td}

objectSetsUri

Unknown macro: {td}

The URI to be used for GET objectSets and POST objectSet requests

Unknown macro: {td}

Yes

Unknown macro: {tr}
Unknown macro: {td}

objectStoresUri

Unknown macro: {td}

The URI to be used for GET objectStores and POST objectStore requests

Unknown macro: {td}

Yes

Unknown macro: {tr}
Unknown macro: {td}

providerAccountsUri

Unknown macro: {td}

The URI to be used for GET providerAccounts requests

Unknown macro: {td}

Yes

Unknown macro: {tr}
Unknown macro: {td}

spacesUri

Unknown macro: {td}

The URI to be used for GET spaces requests

Unknown macro: {td}

Yes

Unknown macro: {tr}
Unknown macro: {td}

taskLogsUri

Unknown macro: {td}

The URI to be used for GET taskLogs requests

Unknown macro: {td}

Yes

Unknown macro: {tr}
Unknown macro: {td}

tasksUri

Unknown macro: {td}

The URI to be used for GET tasks and POST task requests

Unknown macro: {td}

Yes

Unknown macro: {tr}
Unknown macro: {td}

usersUri

Unknown macro: {td}

The URI to be used for GET users and POST user requests

Unknown macro: {td}

Yes

Unknown macro: {tr}
Unknown macro: {td}

version

Unknown macro: {td}

The version of the CloudSync software

Unknown macro: {td}

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"
  }
}

application/vnd.fcrepo-cloudsync.serviceinfo+xml

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>

application/vnd.fcrepo-cloudsync.serviceinit+json

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

Unknown macro: {table}
Unknown macro: {tr}
Unknown macro: {td}

Field

Unknown macro: {td}

Description

Unknown macro: {td}

Required?

Unknown macro: {tr}
Unknown macro: {td}

initialAdminUsername

Unknown macro: {td}

The username of the initial admin user.

Unknown macro: {td}

Yes

Unknown macro: {tr}
Unknown macro: {td}

initialAdminPassword

Unknown macro: {td}

The password of the initial admin user.

Unknown macro: {td}

Yes

Example:

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

application/vnd.fcrepo-cloudsync.serviceinit+xml

An XML encoding of the above.

Example:

<serviceInit>
  <initialAdminUsername>fwilson</initialAdminUsername>
  <initialAdminPassword>PuppiesRgr8!</initialAdminPassword>
</serviceInit>
  • No labels