Create a Publication

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

Input

_type
Required - Name of the Publication Type
publication
required - The publication data
client_id
Required string - The client id
project_id
Required string - The project id

Publication data

resource_id
Required string - ID of the resource to be published
pub_account_id
Required string - ID of the PubAccount to publish with
scheduled
Required boolean
scheduled_at
Optional string - ISO 8601 time. (Required if scheduled is true)
title
Required string - A title for the publication
message
Optional string - An optional message to publish with the Resource
keywords
Optional string - An optional list of keywords separated by commas
{
  "_type": "Publications::FacebookWall",
  "publication": {
    "pub_account_id": "4e43f42c09e50d0e9f000070",
    "resource_id": "4e43f42c09e50d0e9f000075",
    "message": "I'm on a Facebook Wall !",
    "title": "A chat"
  }
}

Response

Status: 201 Created
Location: http://api.oahu.fr/v1/clients/4e43f42909e50d0e9f000062/projects/4e43f42909e50d0e9f000061/publications/4e43f42c09e50d0e9f00006f
{
  "_id": "4e43f42c09e50d0e9f00006f",
  "_type": "Publications::FacebookWall",
  "client_id": "4e43f42909e50d0e9f000062",
  "project_id": "4e43f42909e50d0e9f000061",
  "pub_account_id": "4e43f42c09e50d0e9f000070",
  "resource_id": "4e43f42c09e50d0e9f000075",
  "message": "I'm on a Facebook Wall !",
  "nb_comments": 0,
  "nb_likes": 0,
  "post_id": null,
  "scheduled": true,
  "status": "unpublished",
  "title": "A chat",
  "url": "http://www.facebook.com/110326788982420/posts/110326788982420_107896399246371",
  "scheduled_at": "2011-07-11T17:24:28+02:00",
  "created_at": "2011-06-14T14:09:11Z",
  "updated_at": "2011-06-15T15:19:32Z"
}