Blog

Swift REST API Example

Posted on: March 14th, 2012 by stephenbroeker No Comments

Swift REST API Example

Last post I explained REST interfaces, and promised to use a Swift REST API as an example.   This application programming interface (API) supports the following operations.

1)  Swift REST API Authorization

GET Authorization

————————

This operation is used to obtain an authorization token and URL for a  given user login and password.   This token and URL are then used in any subsequent operations.

2) Swift REST API Account

DELETE Account
————————

Mark an account as deleted.   Swift REST API will clean up the account as time permits.

GET Account
————————

Get the list of containers in an account.

HEAD Account
————————

Get account statistics.

POST Account
————————

PUT Account
————————

Create an account.

3) Swift REST API Container

DELETE Container
————————

Mark a container as deleted. Swift will clean up the container as time permits.

GET Container
————————

Get the list of objects in a container.

HEAD Container
————————

Get container statistics.

POST Container
————————

PUT Container
————————

Create a container.

4) Swift REST API Object

COPY Object
————————

Copy an object from one container to another.

DELETE Object
————————

Delete an object from a container.

GET Object
————————

Get an object from a container.

POST Object
————————

Post meta-data to an object.

PUT Object
————————

Create an object in a container.

What would you add to this Swift REST API example?

Leave a Reply