×Read this message from Erik, founder of YouMagine

Supported Formats: json


GET /v1/designs/:design_id/documents Load all documents of a design

Supported Formats

json

Examples

Request

GET /v1/designs/pixoboo-9/documents?auth_token=yweNGNJxB4_2j3LLHdQe

Response

200
[
  {
    "id": 13,
    "name": "Agivu",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>\n\n<p>Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus.</p>\n\n<p>Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero.</p>",
    "user_id": 36,
    "documentable_id": 9,
    "documentable_type": "Design",
    "file": {
      "url": "/spec_uploads/document/file/13/example.gcode"
    },
    "created_at": "2016-06-10T12:16:58.938+02:00",
    "updated_at": "2016-06-10T12:16:58.938+02:00",
    "file_contains_3d_model": true,
    "design_tool_id": null,
    "design_tool_version_id": null,
    "file_tmp": null,
    "properties": null,
    "download_count": 0,
    "modelhash": "12345",
    "alternative_formats": {},
    "rendered_image": null
  },
  {
    "id": 8,
    "name": "Janyx",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>\n\n<p>Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus.</p>\n\n<p>Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero.</p>",
    "user_id": 31,
    "documentable_id": 9,
    "documentable_type": "Design",
    "file": {
      "url": "/spec_uploads/document/file/8/example.stl"
    },
    "created_at": "2016-06-10T12:16:58.706+02:00",
    "updated_at": "2016-06-10T12:16:58.706+02:00",
    "file_contains_3d_model": true,
    "design_tool_id": null,
    "design_tool_version_id": null,
    "file_tmp": null,
    "properties": null,
    "download_count": 0,
    "modelhash": "12345",
    "alternative_formats": {
      "stl_file": {
        "url": "/spec_uploads/document/file/8/example.stl"
      },
      "stl_zip_file": {
        "url": null
      },
      "ctm_file": {
        "url": null
      }
    },
    "rendered_image": null
  },
  {
    "id": 9,
    "name": "Kwinu",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>\n\n<p>Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus.</p>\n\n<p>Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero.</p>",
    "user_id": 32,
    "documentable_id": 9,
    "documentable_type": "Design",
    "file": {
      "url": "/spec_uploads/document/file/9/example.stl"
    },
    "created_at": "2016-06-10T12:16:58.757+02:00",
    "updated_at": "2016-06-10T12:16:58.757+02:00",
    "file_contains_3d_model": true,
    "design_tool_id": null,
    "design_tool_version_id": null,
    "file_tmp": null,
    "properties": null,
    "download_count": 0,
    "modelhash": "12345",
    "alternative_formats": {
      "stl_file": {
        "url": "/spec_uploads/document/file/9/example.stl"
      },
      "stl_zip_file": {
        "url": null
      },
      "ctm_file": {
        "url": null
      }
    },
    "rendered_image": null
  },
  {
    "id": 10,
    "name": "Lazz",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>",
    "user_id": 33,
    "documentable_id": 9,
    "documentable_type": "Design",
    "file": {
      "url": "/spec_uploads/document/file/10/example.gcode"
    },
    "created_at": "2016-06-10T12:16:58.807+02:00",
    "updated_at": "2016-06-10T12:16:58.807+02:00",
    "file_contains_3d_model": true,
    "design_tool_id": null,
    "design_tool_version_id": null,
    "file_tmp": null,
    "properties": null,
    "download_count": 0,
    "modelhash": "12345",
    "alternative_formats": {},
    "rendered_image": null
  },
  {
    "id": 4,
    "name": "Mynte",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>",
    "user_id": 27,
    "documentable_id": 9,
    "documentable_type": "Design",
    "file": {
      "url": "/spec_uploads/document/file/4/example.stl"
    },
    "created_at": "2016-06-10T12:16:58.415+02:00",
    "updated_at": "2016-06-10T12:16:58.415+02:00",
    "file_contains_3d_model": true,
    "design_tool_id": null,
    "design_tool_version_id": null,
    "file_tmp": null,
    "properties": null,
    "download_count": 0,
    "modelhash": "12345",
    "alternative_formats": {
      "stl_file": {
        "url": "/spec_uploads/document/file/4/example.stl"
      },
      "stl_zip_file": {
        "url": null
      },
      "ctm_file": {
        "url": null
      }
    },
    "rendered_image": null
  },
  {
    "id": 12,
    "name": "Podcat",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>",
    "user_id": 35,
    "documentable_id": 9,
    "documentable_type": "Design",
    "file": {
      "url": "/spec_uploads/document/file/12/example.pdf"
    },
    "created_at": "2016-06-10T12:16:58.896+02:00",
    "updated_at": "2016-06-10T12:16:58.896+02:00",
    "file_contains_3d_model": false,
    "design_tool_id": null,
    "design_tool_version_id": null,
    "file_tmp": null,
    "properties": null,
    "download_count": 0,
    "modelhash": "12345",
    "alternative_formats": {},
    "rendered_image": null
  },
  {
    "id": 5,
    "name": "Teklist",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>",
    "user_id": 28,
    "documentable_id": 9,
    "documentable_type": "Design",
    "file": {
      "url": "/spec_uploads/document/file/5/example.stl"
    },
    "created_at": "2016-06-10T12:16:58.463+02:00",
    "updated_at": "2016-06-10T12:16:58.463+02:00",
    "file_contains_3d_model": true,
    "design_tool_id": null,
    "design_tool_version_id": null,
    "file_tmp": null,
    "properties": null,
    "download_count": 0,
    "modelhash": "12345",
    "alternative_formats": {
      "stl_file": {
        "url": "/spec_uploads/document/file/5/example.stl"
      },
      "stl_zip_file": {
        "url": null
      },
      "ctm_file": {
        "url": null
      }
    },
    "rendered_image": null
  },
  {
    "id": 6,
    "name": "Thoughtblab",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>",
    "user_id": 29,
    "documentable_id": 9,
    "documentable_type": "Design",
    "file": {
      "url": "/spec_uploads/document/file/6/example.stl"
    },
    "created_at": "2016-06-10T12:16:58.543+02:00",
    "updated_at": "2016-06-10T12:16:58.543+02:00",
    "file_contains_3d_model": true,
    "design_tool_id": null,
    "design_tool_version_id": null,
    "file_tmp": null,
    "properties": null,
    "download_count": 0,
    "modelhash": "12345",
    "alternative_formats": {
      "stl_file": {
        "url": "/spec_uploads/document/file/6/example.stl"
      },
      "stl_zip_file": {
        "url": null
      },
      "ctm_file": {
        "url": null
      }
    },
    "rendered_image": null
  },
  {
    "id": 11,
    "name": "Thoughtsphere",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>\n\n<p>Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus.</p>",
    "user_id": 34,
    "documentable_id": 9,
    "documentable_type": "Design",
    "file": {
      "url": "/spec_uploads/document/file/11/example.gcode"
    },
    "created_at": "2016-06-10T12:16:58.853+02:00",
    "updated_at": "2016-06-10T12:16:58.853+02:00",
    "file_contains_3d_model": true,
    "design_tool_id": null,
    "design_tool_version_id": null,
    "file_tmp": null,
    "properties": null,
    "download_count": 0,
    "modelhash": "12345",
    "alternative_formats": {},
    "rendered_image": null
  },
  {
    "id": 7,
    "name": "Thoughtworks",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>\n\n<p>Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus.</p>\n\n<p>Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero.</p>",
    "user_id": 30,
    "documentable_id": 9,
    "documentable_type": "Design",
    "file": {
      "url": "/spec_uploads/document/file/7/example.stl"
    },
    "created_at": "2016-06-10T12:16:58.618+02:00",
    "updated_at": "2016-06-10T12:16:58.618+02:00",
    "file_contains_3d_model": true,
    "design_tool_id": null,
    "design_tool_version_id": null,
    "file_tmp": null,
    "properties": null,
    "download_count": 0,
    "modelhash": "12345",
    "alternative_formats": {
      "stl_file": {
        "url": "/spec_uploads/document/file/7/example.stl"
      },
      "stl_zip_file": {
        "url": null
      },
      "ctm_file": {
        "url": null
      }
    },
    "rendered_image": null
  }
]

GET /v1/designs/:design_id/documents/:id Load a specific document of a design by ID

Supported Formats

json

Examples

Request

GET /v1/designs/yakijo-10/documents/14?auth_token=gU889_KaoWBmdF_sdg7D

Response

200
{
  "id": 14,
  "name": "Edgeify",
  "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>\n\n<p>Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus.</p>\n\n<p>Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero.</p>",
  "user_id": 38,
  "documentable_id": 10,
  "documentable_type": "Design",
  "file": {
    "url": "/spec_uploads/document/file/14/example.pdf"
  },
  "created_at": "2016-06-10T12:16:59.188+02:00",
  "updated_at": "2016-06-10T12:16:59.188+02:00",
  "file_contains_3d_model": false,
  "design_tool_id": null,
  "design_tool_version_id": null,
  "file_tmp": null,
  "properties": null,
  "download_count": 0,
  "modelhash": "12345",
  "alternative_formats": {},
  "rendered_image": null
}

POST /v1/designs/:design_id/documents Create a document for a design

Params

Param nameDescription
document
required

Value:

Must be hash

document[name]
optional

name of the image (file name is used by default)


Value:

Must be string.

document[description]
optional

description of the image


Value:

Must be text/html.

document[file]
required

an document file (any, except exe)


Value:

Must be file.

Supported Formats

json

Examples

Request

POST /v1/designs/kaymbo-11/documents?auth_token=7xzteYVvTfjd4kSZC-dU
Content-Type: multipart/form-data; boundary=APIPIE_RECORDER_EXAMPLE_BOUNDARY

--APIPIE_RECORDER_EXAMPLE_BOUNDARY
Content-Disposition: form-data; name="document[file]"; filename="example.pdf"
Content-Type: text/plain
Content-Length: 67

... contents of "document[file]" ...
--APIPIE_RECORDER_EXAMPLE_BOUNDARY--

Response

201
{
  "id": 15,
  "name": "Tagopia",
  "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>\n\n<p>Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus.</p>\n\n<p>Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa id lobortis convallis, tortor risus dapibus augue, vel accumsan tellus nisi eu orci. Mauris lacinia sapien quis libero.</p>",
  "user_id": 39,
  "documentable_id": 11,
  "documentable_type": "Design",
  "file": {
    "url": "/spec_uploads/document/file/15/example.pdf"
  },
  "created_at": "2016-06-10T12:16:59.394+02:00",
  "updated_at": "2016-06-10T12:16:59.394+02:00",
  "file_contains_3d_model": false,
  "design_tool_id": null,
  "design_tool_version_id": null,
  "file_tmp": null,
  "properties": {},
  "download_count": 0,
  "ctm_file": {
    "url": null
  },
  "jscad_file": {
    "url": null
  },
  "obj_file": {
    "url": null
  },
  "obj_zip_file": {
    "url": null
  },
  "scad_file": {
    "url": null
  },
  "stl_file": {
    "url": null
  },
  "stl_zip_file": {
    "url": null
  },
  "modelhash": "12345"
}

PATCH /v1/designs/:design_id/documents/:id Update a design's document

PUT /v1/designs/:design_id/documents/:id Update a design's document

Params

Param nameDescription
document
required

Value:

Must be hash

document[name]
optional

name of the image (file name is used by default)


Value:

Must be string.

document[description]
optional

description of the image


Value:

Must be text/html.

document[file]
required

an document file (any, except exe)


Value:

Must be file.

Supported Formats

json

Examples

Request

PUT /v1/designs/ntag-6/documents/1?auth_token=8exiXCrnbzLgx54mbaGT

Response

204

DELETE /v1/designs/:design_id/documents/:id Delete a single document of a design

Supported Formats

json

Examples

Request

DELETE /v1/designs/jazzy-8/documents/3?auth_token=Rx88Psvass_MHsR_kyv2

Response

204