Create a Resource

POST /v1/clients/:client_id/projects/:project_id/resources

Input

_type
Required - Name of the Resource Type
resource
required - Resource data
client_id
Required - The client id
project_id
Required - The project id

Resource data

source
Required - URL of the Resource’s source asset
name
Required string - Name of the Resource displayed to the end user
description
Optional string - A short text of description for the Resource
{
  "_type": "Video",
  "resource": {
    "description": "A great video",
    "name": "A video"
  }
}

Response

Status: 201 Created
{
  "_id": "4e43f42909e50d0e9f000051",
  "_type": "Resources::Video",
  "client_id": "4e43f42909e50d0e9f000053",
  "project_id": "4e43f42909e50d0e9f000052",
  "can_edit": true,
  "default": false,
  "description": "A great video",
  "name": "A video",
  "published": false,
  "paths": {
    "original": "http://assets.oahu.fr/media/BAhbB1sHOgZmSSILMTIzemJjBjoGRVRbBzoGcDoMbm90aGluZw",
    "thumb": "http://assets.oahu.fr/media/BAhbB1sHOgZmSSILMTIzemJjBjoGRVRbCDoGcDoLcmVzaXplSSIKODB4NjAGOwZU",
    "small": "http://assets.oahu.fr/media/BAhbB1sHOgZmSSILMTIzemJjBjoGRVRbCDoGcDoLcmVzaXplSSIMMjAweDE1MAY7BlQ",
    "medium": "http://assets.oahu.fr/media/BAhbB1sHOgZmSSILMTIzemJjBjoGRVRbCDoGcDoLcmVzaXplSSIMNTAweDUwMAY7BlQ",
    "iphone_thumb": "http://assets.oahu.fr/media/BAhbB1sHOgZmSSILMTIzemJjBjoGRVRbCDoGcDoLcmVzaXplSSIMMjAweDIwMAY7BlQ",
    "iphone_medium": "http://assets.oahu.fr/media/BAhbB1sHOgZmSSILMTIzemJjBjoGRVRbCDoGcDoLcmVzaXplSSIMMzIweDQ4MAY7BlQ",
    "base_480_400": "http://bucket.amazon3.com/123.flv",
    "high_480_450": "http://bucket.amazon3.com/123.mp4",
    "high_480_1000": "http://bucket.amazon3.com/123.mp4",
    "high_960_450": "http://bucket.amazon3.com/123.mp4",
    "high_960_750": "http://bucket.amazon3.com/123.mp4",
    "high_960_1800": "http://bucket.amazon3.com/123.mp4"
  }
}