top

Create Make

Create's a Make for the given user and returns the make.

Method: POST
Path: /api/20130724/make
Authentication: yes
Request Body:
{
make: {
  // required fields
  email: "fake@123.com",
  url: "http://notarealurl.com/make_asdf.html",
  contentType: "application/x-applicationName",
  title: "title of make",

  // optional fields
  contenturl: "http://realMakeURL.com/notbehindaproxy",
  locale: "en_CA",
  description: "description of make",
  thumbnail: "http://fakeimageURL.com/img123.gif",
  author: "anonymous person",
  tags: [
      "foo",
      "bar"
  ],
  remixedFrom: "OBJECTIDOFANOTHERMAKE"
}
}
Response:
{
email: "fake@123.com",
url: "http://notarealurl.com/make_asdf.html",
contentType: "application/x-applicationName",
title: "title of make",
contenturl: "http://realMakeURL.com/notbehindaproxy",
locale: "en_CA",
description: "description of make",
thumbnail: "http://fakeimageURL.com/img123.gif",
author: "anonymous person",
tags: [
    "foo",
    "bar"
],
remixedFrom: "OBJECT-ID-OF-ANOTHER-MAKE"
}
top

Update Make

Updates a Make with the data in the body of the request. The Make's owner ID must match the id of the Hawk credentials making the request.

Method: PUT
Path: /api/20130724/make/:id
Authentication: yes
Parameter: :id - The unique ID of the Make being updated
Request Body:
{
make: {
  tags: [ "baz" ]
  // this object can contain any field of a Make to update
}
}
Response:
{
tags: [ "baz" ],
email: "fake@123.com",
url: "http://notarealurl.com/make_asdf.html",
contentType: "application/x-applicationName",
title: "title of make",
// optional fields
contenturl: "http://realMakeURL.com/notbehindaproxy",
locale: "en_CA",
description: "description of make",
thumbnail: "http://fakeimageURL.com/img123.gif",
author: "anonymous person",
remixedFrom: "OBJECT-ID-OF-ANOTHER-MAKE"
}
top

Delete Make

Deletes a Make from the database with the given ID. The Make's owner ID must match the id of the Hawk credentials making the request.

Method: DELETE
Path: /api/20130724/make/:id
Authentication: yes
Parameter: :id - The unique ID of the Make being deleted
Response
{
tags: [ "baz" ],
email: "fake@123.com",
url: "http://notarealurl.com/make_asdf.html",
contentType: "application/x-applicationName",
title: "title of make",
// optional fields
contenturl: "http://realMakeURL.com/notbehindaproxy",
locale: "en_CA",
description: "description of make",
thumbnail: "http://fakeimageURL.com/img123.gif",
author: "anonymous person",
remixedFrom: "OBJECT-ID-OF-ANOTHER-MAKE"
}

Search Makes

Search for makes based on parameters passed in as a querystring. If you are not using Hawk credentials, you will not get unpublished makes in your search results.

Method: GET
Path: /api/20130724/make/search
Authentication: no
Query Parameters
  • "user" - Webmaker Username
  • "tags" - A tag or a comma separated list of tags
  • "tagPrefix" - Partial tag string (i.e. "foo" matches "foobar")
  • "url" - Make URL
  • "contentType" - Make ContentType
  • "remixedFrom" - Make ID
  • "id" - Make ID
  • "title" - Make Title
  • "description" - Make description
  • "limit" - Max results to return
  • "page" - Page number of results to return
  • "sortByField" - a field name or comma separated list of fields to sort results on
  • "likedByUser" - Webmaker Username
  • "or" - search makes using OR logic
Example search URL: /api/20130724/make/search?tags=webmaker,thimble&sortByField=createdAt&limit=5
Response:
{
makes: [], // array of makes that matched your query
total: <num> // total hits on query - may be greater than makes array length, request next page for more makes
}
top

Like Make

Add the given user to a makes likes array.

Method: PUT
Path: /api/20130724/make/like/:id
Authentication: yes
Parameter: :id - The unique ID of the Make being liked
Request Body:
{
maker: "makerUsername"
}
Response
{
// The make that was just liked
}
top

Unlike Make

Remove a given user from a makes likes array

Method: PUT
Path: /api/20130724/make/unlike/:id
Authentication: yes
Parameter: :id - The unique ID of the Make being unliked
Request Body:
{
maker: "makerUsername"
}
Response
{
// The make that was just unliked
}
top

Report Make

Indicate that a given user has reported a make as inappropriate

Method: PUT
Path: /api/20130724/make/report/:id
Authentication: yes
Parameter: :id - The unique ID of the Make being reported
Request Body:
{
maker: "makerUsername"
}
Response
{
// The make that was just reported
}
top

Cancel Report Make

Cancel a report by the given user for this make

Method: PUT
Path: /api/20130724/make/cancelReport/:id
Authentication: yes
Parameter: :id - The unique ID of the Make having a report canceled
Request Body:
{
maker: "makerUsername"
}
Response
{
// The make that had a report cancelled
}
top

Remix Count

Count the number of times this make has been remixed in a given time range

Method: GET
Path: /api/20130724/make/remixCount
Authentication: no
Query Parameters:
  • id - Make ID
  • from - Unix Timestamp
  • to - Unix Timestamp
Response
{
count: <num> // number of remixes made in the given timeframe
}
top

Tag Suggestions

Given a string of text, suggest tags that could auto-complete the string based on their frequency in the Make database.

Method: GET
Path: /api/20130724/make/tags
Authentication: no
Query Parameters:
  • t - a string to run the autocomplete facet on
  • s - number of results to return (Max 100)
Response
{
tags: [
  {
    term: "foo", // suggested tag
    "count": num // occurrence score (popularity)
  }
],
total: <num> // number of suggested tags matched
}
top

Create List

Create an ordered list of Makes

Method: POST
Path: /api/20130724/list
Authentication: yes
Request Body:
{
make: [ /* array of Make IDs */ ],
userId: <num>, // Webmaker userID of creator.
title: "title"
}
Response:
{
makes: [ /* ... */],
userId: <num>,
title: "title"
}
top

Update List

Update a List of Makes by ID

Method: PUT
Path: /api/20130724/list/:id
Authentication: yes
Parameter: :id - The unique ID of the List being updated
Request Body:
{
userId: <num>, // userId of Webmaker Account updating the List
makes: [ /* new array of List IDs */ ]
}
Response:
{
makes: [ /* ... */],
userId: <num>,
title: "title"
}
top

Delete List

Delete a List by ID

Method: DELETE
Path: /api/20130724/list/:id
Authentication: yes
Parameter: :id - The unique ID of the List being deleted
Response
{
makes: [ /* ... */],
userId: <num>,
title: "title"
}
top

Get List

Gets a List of makes. The IDs stored in the list are changed into the actual Make data and sorted.

Method: GET
Path: /api/20130724/list/:id
Parameter: :id - The unique ID of the List to retrieve
Response
{
makes: [ /* Array of ordered makes, with M data prefetched */ ]
}
top

Get User's Lists

Gets all lists created by a give user (by ID)

Method: GET
Path: /api/20130724/list/user/:id
Parameter: :id - The userID of the Webmaker user whose lists are to be retrieved
Response
{
lists: [ /* array of lists created by the Webmaker User */]
}