Clone a Tugboat Preview

Creates a clone of an existing preview. Clones are only allowed in projects that have base previews enabled.


  • preview - Required
    The preview to clone.

  • label - Optional
    An optional human-readable label, or description, to give to the new preview.


const args = { preview: '5ad6035e9e9e230001299fba' };
socket.emit('tugboat', 'previews', 'clone', args, callback);


    "_id": "58cf4e012057230001ae530a",
    "updatedAt": "2017-03-20T03:35:40.112Z",
    "createdAt": "2017-03-20T03:35:29.073Z",
    "name": "master",
    "repo": "58cf4bfc457b92000138c33d",
    "token": "v0xq1vwswxtr7p3ubxhbfc4j",
    "data": {
        "github": {
            "ref": {
                "name": "master",
                "object": {
                    "url": "",
                    "type": "commit",
                    "sha": "e741cf14f476dc3341068a0da022f623b24976b4"
                "url": "",
                "ref": "refs/heads/master"
    "build_begin": "2017-03-20T03:35:29.620Z",
    "default_service": "58cf4e012057230001ae530b",
    "build_end": "2017-03-20T03:35:39.413Z",
    "size": 418248599,
    "hits": 0,
    "aliases": [],
    "url": [
    "anchor": false,
    "locked": false,
    "state": "ready",
    "scope": "tugboat",
    "id": "58cf4e012057230001ae530a"


  • 1000: Permision Denied
    Either the user requesting the clone does not have permission to do so, or the preview's project does not have base previews enabled.

  • 1015: No Preview ID Provided
    The required preview argument was not included in the request.

  • 1039: Unknown Preview
    The requested preview could not be found.

results matching ""

    No results matching ""