API Version 1
This page lists the resources that makes up the CloudFactory API Version 1.0. If you face any problems using these API please contact our developers support.
Authentication
Authentication is done using an API key. Your API token can be found by logging into your CloudFactory account.
curl http://www.cloudfactory.com/api/v1/account.json?api_key=e5d710a3efaflipasjs44545dfdf3488fce
Schema
All API access is over HTTP and accessed from the cloudfactory application. All data is received through JSON.
$ curl -i http://www.cloudfactory.com/api/v1/lines/thomas.json?api_key=e5d710a3efaflipasjs44545dfdf3488fce
HTTP/1.0 200 OK
Server: nginx
Date: Tue, 27 Sep 2011 11:15:56 GMT
Content-Type: application/json; charset=utf-8
Status: 200 OK
ETag: "b5b1f569960dc1991cc6e39f2225172f"
Cache-Control: max-age=0, private, must-revalidate
X-UA-Compatible: IE=Edge,chrome=1
Set-Cookie: _cloudfactory_session=486e6c0eea56c2f9422c28711224f0de; domain=.cloudfactory.com; path=/; expires=Tue, 27-Sep-2011 12:15:56 GMT; HttpOnly
X-Runtime: 0.454603
X-Cache: MISS from atmosphere.sprout.lan
X-Cache-Lookup: MISS from atmosphere.sprout.lan:3128
Via: 1.1 atmosphere.sprout.lan:3128 (squid/2.7.STABLE9)
Connection: close
{
"total_pages":1,
"total_lines":2,
"lines":[
{
"title":"cf-demo-line",
"description":"A line showing demo of cloudfactory",
"public":false,
"department":{
"name":"Digitization"
},
"user":{
"username":"xecutioner.kapil",
"email":"xecutioner.kapil@gmail.com"
}
},
{
"title":"adult-website-moderation",
"description":"A sample line for adult website moderation.",
"public":false,
"department":{
"name":"Survey"
},
"app":{
"name":"default",
"email":"xecutioner.kapil@gmail.com",
"notification_url":null
}
}
]
}
Blank fields are included as null instead of being omitted. All timestamps are returned in natural date format: Fri, 15 Jul 2011 04:51:30 GMT
Client Errors
Sending invalid inputs will result in a 422 Unprocessable Entity response.
HTTP/1.1 422 Unprocessable Entity
Content-Length: 149
{
"message": "Validation Failed",
}
All errors are returned in the response.
HTTP Verbs
CloudFactory API v1 strives to use appropriate HTTP verbs for each action.
GET :
Used for retrieving resources.
POST :
Used for creating resources.
PUT :
Used for replacing/updating resources.
DELETE :
Used for deleting resources.