Data Formats
The Chute API makes use of a variety of JSON formats. These formats are both consumed and returned by the API. Here are some important notes regarding our data:
- JSON-only
- We currently support only JSON for the return data.
- Data Container
- Whenever there are multiple records returned, Chute will return a
dataarray.
Accounts
Account JSON
{
"id" : 1,
"type" : "facebook",
"name" : "Gregarious Narain",
"uid" : "100001016206990"
"notifications_enabled" : 1
}
Assets
Files Parameter JSON
[
{
"filename": "100000.jpg",
"md5" : "AAAAAABAAAAAAAAAAAAA",
"size" : "1225"
},
{
"filename": "100001.jpg",
"md5" : "AAAAAAAAAAAAAAAAAAAA",
"size" : "1234"
}
]
Verification JSON
[
{
"file_path" : "100000.jpg",
"asset_id" : 1,
"status" : "new",
"priority" : 1
},
{
"file_path" : "100001.jpg",
"asset_id" : 2,
"status" : "initialized",
"priority" : 1
}
]
Token JSON
{
"signature" : "AWS 09PR2VYP16YAQERGP382:t6NXCsDmUUWxVrYSneJmgXrdrkA=",
"date" : "Mon, 31 Jan 2011 00:35:19 GMT",
"file_path" : "/Users/gregarious/Library/Application%20Support/iPhone%20Simulator/4.2/Applications/E5DA5AF3-A5CC-40C0-B9B0-2C230AD66C96/Documents/somefile.jpg",
"md5" : "",
"upload_url" : "http://s3.amazonaws.com/assets.getchute.com/uploads/images/somefile.jpg",
"content_type": "image/jpeg",
"asset_id" : "1"
}
Asset JSON
{
"id": 1,
"height": 768,
"width": 1024,
"taken_at": "2011-02-10T13:09:45Z",
"url": "http://assets.getchute.com.s3.amazonaws.com/assets/images/240/secret-240.jpg",
"is_portrait": true,
"share_url": "http://getchute.com/assets/abcde",
"user": {
"id": 4,
"name": "Gregarious Narain",
"avatar": "http://graph.facebook.com/503180032/picture?type=square"
}
}
Bundles
Bundle JSON
{
data: {
"id": 1,
"shortcut": "zmnise",
"views": 0,
"assets": [{
"id": 30,
"height": 768,
"width": 1024,
"url": "http://assets.getchute.com.s3.amazonaws.com/assets/images/33/secret-33.jpg",
"is_portrait": true,
"user": {
"id": 4,
"name": "Gregarious Narain",
"avatar": "http://graph.facebook.com/503180032/picture?type=square"
}
}]
}
}
Chutes
Chute Create JSON
{
"name" : "Some Chute Name"
"permission_view" : 0,
"permission_add_members" : 0,
"permission_add_photos" : 0,
"permission_add_comments" : 0,
"moderate_members" : 0,
"moderate_photos" : 0,
"moderate_comments" : 0
}
Chute Object JSON
{
"id": 34,
"user": {
"id": 2,
"name": "Gregarious Narain",
"avatar": "http://graph.facebook.com/100001016206990/picture?type=square"
},
"name": "Chute Name Comes Here",
"shortcut": "zulUT",
"recent_count": null,
"recent_user_id": null,
"recent_parcel_id": null,
"members_count": 2,
"created_at": "2011-02-18T22:25:05Z",
"updated_id": "2011-02-18T22:25:05Z",
"permission_view" : 0,
"permission_add_members" : 0,
"permission_add_photos" : 0,
"permission_add_comments" : 0,
"moderate_members" : false,
"moderate_photos" : false,
"moderate_comments" : false
}
Chute Invitation Providers JSON
"providers" : {
"email" : ['gaurav.qwe@gmail.com'], // comma-delimited list
"facebook" : ['100000725980873'], // comma
"chute" : ['2'] // chute user id
}
Chute Invitation JSON
{
"data": [
{
"id": 1,
"invited_by": {
"id": 1,
"name": "Brandon Coston",
"avatar": "http://graph.facebook.com/720671102/picture?type=square"
}
"chute": {
"id": 3,
"user": {
"id": 1,
"name": "Brandon Gnu",
"avatar": "http://graph.facebook.com/720671102/picture?type=square"
}
"name": "tezt",
"shortcut": "kvw8il",
"recent_thumbnail": "http://assets.getchute.com.s3.amazonaws.com/uploads/images/10/75x75-1000000020.JPG",
"recent_count": 5,
"assets_count": 5,
"members_count": 5
}
}
]
}
Chute Membership JSON
{
"status": "Already a member"
"membership": {
"id": 11,
"chute_id": 1,
"role": 0,
"assets_count": 0
}
}
Comments
Comment JSON
{
"id": 1
"user": {
"id": 1
"name": "Gregarious Narain"
"avatar": "http://graph.facebook.com/720671102/picture?type=square"
}
"comment": "This is a comment"
"created_at": "2011-05-12T03:54:09Z"
"updated_id": "2011-05-12T03:54:09Z"
"status": 0
}
Devices
Device JSON
{
"id": 7
"name": "Chute Chrome Extension"
"os": "Chrome"
"version": "1.0.0"
"notifications_enabled": false
}
Device Queue JSON
{
"total": 1,
"data": [
{
"asset_id": 1,
"status": 1,
"priority": 1,
"file_path": "filename",
"locked": 1,
"locked_at": "2011-02-18T22:25:05Z"
}
]
}
Parcels
Parcel JSON
{
"id" => 1,
"device_id" => 1,
"status" => "complete",
"asset_count" => 10
}
Parcel Create JSON
{
"id": 2,
"uploads": [
{
"file_path" : "100000.jpg",
"asset_id" : 1,
"status" : "new",
"priority" : 1
}
]
}
Parcel Placement JSON
{
"inbox_id": "2",
"id": 2,
"count": 1,
"updated": "2011-02-09T08:53:31Z",
"thumbnail": "http://assets.getchute.com.s3.amazonaws.com/uploads/images/2/ss-2.JPG"
"user": {
"id": 1,
"name": "Brandon Coston",
"avatar": "http://graph.facebook.com/720671102/picture?type=square"
},
"chute": {
"id": 1,
"user": {
"id": 1,
"name": "Brandon Coston",
"avatar": "http://graph.facebook.com/720671102/picture?type=square"
}
"name": "My First Chute",
"shortcut": "7ckhj2"
},
"assets": [
{
"id": 2,
"url": "http://assets.getchute.com.s3.amazonaws.com/uploads/images/2/1000000057.JPG",
"is_portrait": true,
"share_url": "http://getchute.com/assets/abcfd",
"comments": 0
}
]
}
Users
User JSON
{
:id => 1,
:name => "Gregarious Narain",
:avatar => "http://graph.facebook.com/...",
:notification_photos => 1,
:notification_comments => 1,
:notification_invites => 1
}