Table of Contents

    Mock Server

    Use this URL to access a mockup of the API server. Your traffic will be recorded and compared to the documentation. You'll find your traffic analysis in the inspector or directly here in the documentation, right next to each resource.

AeroFS API Playground

Welcome to the AeroFS API Playground. This website allows you to interact with a mockup of the API server. For a complete reference of the AeroFS API, please take a look at the AeroFS API Reference Documentation.

Children resource

The Children resource contains a list of files and folders under a parent folder. You may use methods on this object to enumerate the AeroFS directory tree belonging to the authenticated user.

Attributes

  • parent (read-only) Identifier of the parent folder.
  • folders (read-only) List of Folder objects under the parent folder.
  • files (read-only) List of File objects under the parent folder.

List children of a folder

GET

/api/v0.10/children/{id}

List files and folders under a given folder.

Parameters
Name Description Details
id

Identifier of the parent folder. If absent, list the children of the root AeroFS folder of the authenticated user.

folder_id, optional
example: 9f8e7d...

Response

200 (OK)
Content-Type: application/json
ETag: "cb0f09..."
{
  "parent": "9f8e7d...",
  "folders": [{
    "id": "0a1b2c...",
    "name": "Folder 1",
    "is_shared": false
  }, {
    "id": "0a1b2d...",
    "name": "Folder 2",
    "is_shared": true
  }],
  "files": [{
    "id": "0a1b2e...",
    "name": "Some File.txt",
    "last_modified": "2013-12-14T02:19:59Z",
    "size": 123,
    "mime_type": "text/plain"
  }]
}

Working with folders

Folder resource

The Folder resource represents a folder in AeroFS. You may use methods on this object to manipulate folders and retrieve their information.

Attributes

  • id (read-only) Identifier of this folder.
  • name (read-write) Human-readable base name of this folder.
  • parent (write-only) Identifier of this folder's parent folder.
  • is_shared (read-only) Boolean. Whether this folder is a shared folder.

Retrieve folder metadata

GET

/api/v0.10/folders/{id}

Given a folder's identifier, return its metadata such as the name and parent folder ID.

Parameters
Name Description Details
id

Identifier of the folder.

folder_id, required
example: 9f8e7d...

Response

200 (OK)
Content-Type: application/json
ETag: "cb0f09..."
{
    "id": "0a1b2c...",
    "name": "Important Documents",
    "is_shared": false
}

Delete a folder

DELETE

/api/v0.10/folders/{id}

Delete a folder and all its children.

Parameters
Name Description Details
id

Identifier of the folder.

folder_id, required
example: 9f8e7d...

Response

204 (No Content)

Response

412 (Precondition Failed)
Etag: cb0f09...

Move or rename a folder

PUT

/api/v0.10/folders/{id}

Rename a folder and/or move it to a new parent.

The result is undefined if two clients try to move or rename the same folder at the same time without passing an If-Match header.

Note: return 409 if a folder or file with the same name already exists.

Parameters
Name Description Details
id

Identifier of the folder.

folder_id, required
example: 9f8e7d...

Response

200 (OK)
Content-Type: application/json
ETag: "cb0f09..."
{
    "id": "0a1b2c...",
    "name": "Important Documents",
    "is_shared": false
}

Response

409 (Conflict)
Etag: cb0f09...

Response

412 (Precondition Failed)
Etag: cb0f09...

POST

/api/v0.10/folders

Create a new, empty folder.

Returns HTTP code 409 if a folder or file with the same name already exists.

Response

201 (Created)
Content-Type: application/json
Location: <URL of the new resource.>
Etag: <Etag of the new resource>
{
    "id": "0a1b2c..",
    "name": "New Folder",
    "is_shared": "false",
}

Response

409 (Conflict)

Working with files

File resource

The File resource represents a file in AeroFS. You may use methods on this object to manipulate files and retrieve their information.

Attributes

  • id (read-only) Identifier of this file.
  • name (read-write) Human-readable base name of this file.
  • parent (write-only) Identifier of this folder's parent folder.
  • last_modified (read-only) Last modified time of this file, in ISO 8601 format.
  • size (read-only) Long type. Size of this file, in bytes.
  • mime_type (read-only) MIME type of the file, default to application/octet-stream.

Retrieve file metadata

GET

/api/v0.10/files/{id}

Given a file's identifier, return its metadata such as the name and parent folder ID.

Parameters
Name Description Details
id

Identifier of the file.

file_id, required
example: 9f8e7d...

Response

200 (OK)
Content-Type: application/json
Etag: cb0f09
{
    "id": "0a1b2e...",
    "name": "My File.txt",
    "last_modified": "2013-03-17T01:23Z",
    "size": 1234,
    "mime_type": "text/plain"
}

Delete a file

DELETE

/api/v0.10/files/{id}

Parameters
Name Description Details
id

Identifier of the file.

file_id, required
example: 9f8e7d...

Response

204 (No Content)

Response

412 (Precondition Failed)
Etag: cb0f09...

Move a file

PUT

/api/v0.10/files/{id}

Rename a file and/or move it to a new parent.

The result is undefined if two clients try to move or rename the same file at the same time without passing an If-Match header.

Note: return 409 if a folder or file with the same name already exists.

Parameters
Name Description Details
id

Identifier of the file.

file_id, required
example: 9f8e7d...

Response

200 (OK)
Content-Type: application/json
Etag: cb0f09
{
    "id": "0a1b2e...",
    "name": "My File.txt",
    "last_modified": "2013-03-17T01:23Z",
    "size": 1234,
    "mime_type": "text/plain"
}

Response

409 (Conflict)
Etag: cb0f09...

Response

412 (Precondition Failed)
Etag: cb0f09...

File content

Retrieve file content

GET

/api/v0.10/files/{id}/content

Given a file's identifier, return its content.

If the file is modified on the source computer during the transfer, the connection will be closed before transfer completes.

Parameters
Name Description Details
id

Identifier of the file.

file_id, required
example: 9f8e7d...

Response

200 (OK)
<file content>

Response

206 (Partial Content)
<partial file content>

Response

304 (Not Modified)

Response

416 (Requested Range Not Satisfiable)

Upload file content

PUT

/api/v0.10/files/{id}/content

Overwrite an existing file's content with new content.

In cases where unconditional overwrite is not acceptable, the client should first make a GET request on the content. (Alternatively, use a HEAD request with the same parameters as GET to fetch response headers only.) The entity tag in the response header can then be passed to this method in the If-Match header.

If two clients try to upload new content to the same file at the same time without passing an If-Match header, the result is undefined.

Parameters
Name Description Details
id

Identifier of the file.

file_id, required
example: 9f8e7d...

Response

200 (OK)
Etag: cb0f09...

Response

412 (Precondition Failed)
Etag: cb0f09...

POST

/api/v0.10/files

Create a new, empty file.

Returns HTTP code 409 if a folder or file with the same name already exists.

Response

201 (Created)
Content-Type: application/json
Location: <URL of the new resource.>
Etag: <Etag of the new resource>
{
    "id": "{{ site.data.api.ex_oid }}",
    "name": "New File.txt",
    "last_modified": "2013-03-17T01:23Z",
    "size": 0,
    "mime_type": "application/octet-stream"
}

Response

409 (Conflict)