Developer Console

Glossary

Definitions of terms for the Amazon Drive API and SDKs

Account Access Control

This refers to what type of content your app is able to access in a customer account; such as images, videos, text files, documents, audio files, eBooks, or everything).

ApplicationId

Every app registered on the Amazon Developer portal should have an applicationId. The applicationId is the same as your Login with Amazon clientId.

Asset

An asset is a type of node in Amazon Drive. An asset is generated when a file is uploaded to the Amazon Drive.

  • An asset may have one or more children.
  • An asset should be a child of a file.

Example: Short clips for video files.

ContentProperties

Every file has contentProperties metadata, which is generated based on the content of the file during upload; including size, date, extension, and so on. If the Amazon Drive uploading service recognizes that the file is a valid document, photo, or videos; then the advanced properties are extracted and stored as document, photo, or video properties inside the contentProperties metadata.

Endpoint

Currently there are two different types of endpoints in each marketplace: one for metadata and one for content.

  • MetadataUrl : Specifies the endpoint for read, write, modify, or trash metadata.
  • ContentUrl : Specifies the endpoint for upload or download content.

The expectation is that a app sends the getEndpoint method request when a user logs in or at some defined regular interval for most of the endpoint updates. The frequency of the requests would depend upon the use case.

File

A file is a type of node in the Amazon Drive. When files are uploaded, the metadata is extracted and stored as contentProperties. Alo during upload; the corresponding processing is performed on files based on the file type and assets are generated.

Folder

A folder is a kind of node in Amazon Drive. a folder is used as container for files and other folders.

FriendlyName

When you register your app with the Amazon Drive, you are asked to provide a friendlyname. A friendlyName is used as the key for accessing the property map in the metadata.

Label

Each node may be marked by a set of labels. The maximum number of labels for each node is 10. A label may be used as filter when sending a list request.

LocalId

A localId is defined by the app. It is usually a reference to the global unique ID for content in your app. Amazon Drive supports 1-to-1 mapping from the localId to the Amazon Drive nodeId. Note: Passing a localId in a request should help you avoid duplication of content in Amazon Drive.

Nodes

A node is the fundamental resource in Amazon Drive. The key Node related concepts are as follows.

  • A node may be used to represent different types of digital assets; including files and folder.
  • A node may contain only metadata or it may contain metadata and binary content. Example: An node for a folder contains only metadata. Example: A node for a photo asset contains binary content and metadata.
  • A node may be associated or related to other nodes. Example: A parent-child relationship.
  • A node is able to be created, updated, trashed, or permanently deleted.
  • An asset is a different digital representation of the original content and a node may have zero or more assets associated with it. Example: A JPEG file that has multiple assets of the image in various resolutions.

Permission Level

There are two permission levels in Amazon Drive: read and write. Read enables your app to download the content in a customer account. Write enables your app to upload or modify content in a customer account. You amy choose to select one, the other, or both. Example: If you built a photo printing app then you should only set the read access since your app downloads all of the images from a user's account to view, select, and print photos from the user's Amazon Drive account.

Properties

The properties metadata is a map structure with the associated content defined by the app. In the current configuration, an app should only access properties set by the friendlyName associated with it. Properties must not be set as a filter when sending a list request.

The properties structure looks like the following.

    "properties" : {
    "friendlyName": { "key":"value", "key":"value", ...}
    }

Root Folder

The root folder is the top-most folder in hierarchy of the user's Amazon Drive account. The root folder contains all other folders and file in the user's Amazon Drive account.

  • Only one root must exist for each user account.
  • A root must have no parent.

Getting the root folder:

    -GET: /nodes?filters=isRoot:true

Listing the top level files and folders under the root folder:

    -GET: /nodes/{RootId}/children

A tempLink is a temporary URI provided for the purpose of downloading content from Amazon Drive. A tempLink should be used only when it is not possible to send an authentication to the server to retrieve the contents of a file. Example: If you create a gallery with photos on the web where the app lists all of the photos from the user's Amazon Drive account and display the content.

A tempLink is read only and allows the same functionality as a node; such as requesting modification of an image. A tempLinks is a transient URI and should be used only when all other options are not implementable. The expiry for a tempLink is shared across apps. A tempLink expires after 48 hours; but is refreshed after 24 hours if any app sends a request, which invalidates the old tempLink. Since the expiry is shared across apps, there is a chance for the tempLink to be requested just prior to the 24 hour (or 48 hour) expiry; so apps should send a request for a new tempLink when a response from Amazon Drive is includes an HTTP Status Code of 404 Not Found or 410 Gone.

Example:

    https://content-na.drive.amazonaws.com/cdproxy/templink/6gnyiSEzHVH0dAVWKdb9oXvHfg-YL8Kx-zT-jMXsxxk86

Trash

A trash node is a soft delete usually performed when a user deletes stuff in your app. As a soft delete, the request deletes may be restored by sending a restore request. A trashed node is hidden from listNodes requests.

Note: When sending a trash request, be aware that the children of the target are not be trashed recursively.

Support

If you have any questions, see the Developer Forum.