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

Compare with Current View Page History

« Previous Version 16 Next »

Contents:

High Level Design

Web UI

All comments (from anyone) are welcome! Please add your comments to the first mockup page listed below, as it represents the latest thinking.

REST API

Introduction

The CloudSync REST API is a web-accessible, resource-oriented API that exposes operations on the key entities of the service:

  • Tasks: Define work that is to be performed or is currently being performed.
  • Task Logs: Raw, text/plain logs of running or completed tasks.
  • Sets: Specifications of groups of Fedora Objects for use with tasks.
  • Store: Sources or sinks of Fedora Objects and Datastreams.
  • Global Configuration: Properties that affect the global behavior of the application.
  • User Preferences: Properties that affect an individiaul user's experience of the application.
  • System Logs: Raw, text/plain logs of the application. Includes everything except Task Logs.

The exact attributes and representations of these entities have not yet been determined.

MIME Types and Status Codes

  • Unless otherwise stated, requests and responses will always be in JSON or XML format. The default format is XML ("application/xml") unless ".json" is specified at the end of the URL or content negotiation is used to denote a preference for the "application/json" MIME type.
  • When GET is used to retrieve information about a resource, success is indicated by a 200 OK response code.
  • When POST is used to add a resource (e.g. addTask), a successful (201 Created) response will include a Content-Location header that provides the URI of the new resource. The last portion of that URI will be the newly-allocated id of that resource, which is an opaque, URI-safe string.
  • When PUT is used to update a resource (e.g. updateTask), success is indicated by a 200 OK response code, and the response body will be the updated representation of the resource, as if requested via GET.
  • When DELETE is used to remove a resource (e.g. deleteTask), success is indicated by a 204 No Content response code, and the response body will be empty.

The base URL of all REST API operations is the URL of the cloudsync app, plus /api/rest/. For example:

http://example.org/cloudsync/api/rest/

Operations on Tasks

createTask

POST /cloudsync/api/rest/tasks

listTasks

GET /cloudsync/api/rest/tasks

getTask

GET /cloudsync/api/rest/tasks/{id}

updateTask

PUT /cloudsync/api/rest/tasks/{id}

deleteTask

DELETE /cloudsync/api/rest/tasks/{id}

Operations on Task Logs

  • list all task logs
  • get information about a single task log
  • delete a task log

Operations on Sets

  • create a set
  • list all sets
  • get information about a single set
  • update a set
  • delete a set

Operations on Stores

  • create a store
  • list all stores
  • get information about a specific store
  • update a store
  • delete a store

Operations on Global Configuration

  • get all global configuration values
  • set a specific global configuration value

Operations on User Preferences

  • get all user preferences values
  • set a specific user preference value

Operations on System Logs

  • list log messages by datetime range and severity level
  • No labels