Lookup

Retrieve a File

Returns a specific File.

This endpoint responds to general File parameters.

Endpoint

Method URL Token
GET https://api.app.net/files/{file_id} Varies
Please see the File Authorization documentation for more information on User and File tokens.

URL Parameters

Name Description
file_id The id of the File to retrieve.

Example

to see more complete examples.

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
    "https://api.app.net/files/1"
{
  "data": {
    "complete": true,
    "created_at": "2013-01-28T18:31:18Z",
    "derived_files": {
      "image_thumb_200s": {
        "image_info": {
          "width": 200,
          "height": 200
        },
        "name": "filename_image_thumb_200s.png",
        "mime_type": "image/png",
        "sha1": "be91cb06d69df13bb103a359ce70cf9fba31234a",
        "size": 33803,
        "url": "https://example.com/thumbnail_200s.png",
        "url_expires": "2013-01-25T03:00:00Z"
      },
      "image_thumb_960r": {
        "image_info": {
          "width": 600,
          "height": 800
        },
        "name": "filename_image_thumb_960r.png",
        "mime_type": "image/png",
        "size": 140173,
        "sha1": "57004b55119002f551be5b9f2d5439dd4ad1234a",
        "url": "https://example.com/thumbnail_960r.png",
        "url_expires": "2013-01-25T03:00:00Z"
      }
    },
    "file_token": "auCj3h64JZrhQ9aJdmwre3KP-QL9UtWHYvt5tj_64rUJWemoIV2W8eTJv9NMaGpBFk-BbU_aWA26Q40w4jFhiPBpnIQ_lciLwfh6o8YIAQGEQziksUMxZo7gOHJ_-niw3l3MZCh7QRWzqNGpiVaUEptfKO0fETrZ8bJjDa61234a",
    "id": "1",
    "image_info": {
      "width": 600,
      "height": 800
    },
    "kind": "image",
    "mime_type": "image/png",
    "name": "filename.png",
    "sha1": "ef0ccae4d36d4083b53e121a6cf9cc9d7ac1234a",
    "size": 172393,
    "source": {
      "name": "Clientastic for iOS",
      "link": "http://app.net",
      "client_id": "98765zyxw"
    },
    "total_size": 346369,
    "type": "com.example.test",
    "url": "https://...",
    "url_expires": "2013-01-25T03:00:00Z",
    "user": "...user object..."
  },
  "meta": {
    "code": 200
  }
}

Retrieve multiple Files

Returns multiple Files requested by id. At most 200 files can be requested. Files which do not exist or which the requesting user does not have authorization to view will not be returned.

This endpoint responds to general File parameters.

Endpoint

Method URL Token Scope
GET https://api.app.net/files User files
Please see the File Authorization documentation for more information on User and File tokens.

Query String Parameters

Name Description
ids A comma separated list of File ids to retrieve.

Example

In the following example, file 6502 is omitted because it doesn’t exist or we don’t have permission to view it.

to see more complete examples.

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
    "https://api.app.net/files?ids=1,2,6502"
{
  "data": [
    {
      "complete": true,
      "created_at": "2013-01-28T18:31:18Z",
      "derived_files": {
        "image_thumb_200s": {
          "image_info": {
            "width": 200,
            "height": 200
          },
          "name": "filename_image_thumb_200s.png",
          "mime_type": "image/png",
          "sha1": "be91cb06d69df13bb103a359ce70cf9fba31234a",
          "size": 33803,
          "url": "https://example.com/thumbnail_200s.png",
          "url_expires": "2013-01-25T03:00:00Z"
        },
        "image_thumb_960r": {
          "image_info": {
            "width": 600,
            "height": 800
          },
          "name": "filename_image_thumb_960r.png",
          "mime_type": "image/png",
          "size": 140173,
          "sha1": "57004b55119002f551be5b9f2d5439dd4ad1234a",
          "url": "https://example.com/thumbnail_960r.png",
          "url_expires": "2013-01-25T03:00:00Z"
        }
      },
      "file_token": "auCj3h64JZrhQ9aJdmwre3KP-QL9UtWHYvt5tj_64rUJWemoIV2W8eTJv9NMaGpBFk-BbU_aWA26Q40w4jFhiPBpnIQ_lciLwfh6o8YIAQGEQziksUMxZo7gOHJ_-niw3l3MZCh7QRWzqNGpiVaUEptfKO0fETrZ8bJjDa61234a",
      "id": "2",
      "image_info": {
        "width": 600,
        "height": 800
      },
      "kind": "image",
      "mime_type": "image/png",
      "name": "filename.png",
      "sha1": "ef0ccae4d36d4083b53e121a6cf9cc9d7ac1234a",
      "size": 172393,
      "source": {
        "name": "Clientastic for iOS",
        "link": "http://app.net",
        "client_id": "98765zyxw"
      },
      "total_size": 346369,
      "type": "com.example.test",
      "url": "https://...",
      "url_expires": "2013-01-25T03:00:00Z",
      "user": "...user object..."
    },
    {
      "complete": true,
      "created_at": "2013-01-28T18:31:18Z",
      "derived_files": {
        "image_thumb_200s": {
          "image_info": {
            "width": 200,
            "height": 200
          },
          "name": "filename_image_thumb_200s.png",
          "mime_type": "image/png",
          "sha1": "be91cb06d69df13bb103a359ce70cf9fba31234a",
          "size": 33803,
          "url": "https://example.com/thumbnail_200s.png",
          "url_expires": "2013-01-25T03:00:00Z"
        },
        "image_thumb_960r": {
          "image_info": {
            "width": 600,
            "height": 800
          },
          "name": "filename_image_thumb_960r.png",
          "mime_type": "image/png",
          "size": 140173,
          "sha1": "57004b55119002f551be5b9f2d5439dd4ad1234a",
          "url": "https://example.com/thumbnail_960r.png",
          "url_expires": "2013-01-25T03:00:00Z"
        }
      },
      "file_token": "auCj3h64JZrhQ9aJdmwre3KP-QL9UtWHYvt5tj_64rUJWemoIV2W8eTJv9NMaGpBFk-BbU_aWA26Q40w4jFhiPBpnIQ_lciLwfh6o8YIAQGEQziksUMxZo7gOHJ_-niw3l3MZCh7QRWzqNGpiVaUEptfKO0fETrZ8bJjDa61234a",
      "id": "1",
      "image_info": {
        "width": 600,
        "height": 800
      },
      "kind": "image",
      "mime_type": "image/png",
      "name": "filename.png",
      "sha1": "ef0ccae4d36d4083b53e121a6cf9cc9d7ac1234a",
      "size": 172393,
      "source": {
        "name": "Clientastic for iOS",
        "link": "http://app.net",
        "client_id": "98765zyxw"
      },
      "total_size": 346369,
      "type": "com.example.test",
      "url": "https://...",
      "url_expires": "2013-01-25T03:00:00Z",
      "user": "...user object..."
    }
  ],
  "meta": {
    "code": 200
  }
}

Retrieve my Files

Returns a stream of all Files the current user has created.

This endpoint responds to general File parameters.

Responses from this endpoint are paginated.

Endpoint

Method URL Token Scope
GET https://api.app.net/users/me/files User files

Example

to see more complete examples.

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
    "https://api.app.net/users/me/files"
{
  "data": [
    {
      "complete": true,
      "created_at": "2013-01-28T18:31:18Z",
      "derived_files": {
        "image_thumb_200s": {
          "image_info": {
            "width": 200,
            "height": 200
          },
          "name": "filename_image_thumb_200s.png",
          "mime_type": "image/png",
          "sha1": "be91cb06d69df13bb103a359ce70cf9fba31234a",
          "size": 33803,
          "url": "https://example.com/thumbnail_200s.png",
          "url_expires": "2013-01-25T03:00:00Z"
        },
        "image_thumb_960r": {
          "image_info": {
            "width": 600,
            "height": 800
          },
          "name": "filename_image_thumb_960r.png",
          "mime_type": "image/png",
          "size": 140173,
          "sha1": "57004b55119002f551be5b9f2d5439dd4ad1234a",
          "url": "https://example.com/thumbnail_960r.png",
          "url_expires": "2013-01-25T03:00:00Z"
        }
      },
      "file_token": "auCj3h64JZrhQ9aJdmwre3KP-QL9UtWHYvt5tj_64rUJWemoIV2W8eTJv9NMaGpBFk-BbU_aWA26Q40w4jFhiPBpnIQ_lciLwfh6o8YIAQGEQziksUMxZo7gOHJ_-niw3l3MZCh7QRWzqNGpiVaUEptfKO0fETrZ8bJjDa61234a",
      "id": "1",
      "image_info": {
        "width": 600,
        "height": 800
      },
      "kind": "image",
      "mime_type": "image/png",
      "name": "filename.png",
      "sha1": "ef0ccae4d36d4083b53e121a6cf9cc9d7ac1234a",
      "size": 172393,
      "source": {
        "name": "Clientastic for iOS",
        "link": "http://app.net",
        "client_id": "98765zyxw"
      },
      "total_size": 346369,
      "type": "com.example.test",
      "url": "https://...",
      "url_expires": "2013-01-25T03:00:00Z",
      "user": "...user object...",
      "pagination_id": "1"
    }
  ],
  "meta": {
    "code": 200,
    "more": false,
    "min_id": "1",
    "max_id": "1"
  }
}