View a Tugboat Preview

Retrieves the details of one or more Tugboat Previews.

Arguments

  • preview - Optional
    The preview to list. If not specified, all previews that the user has permissions to view are returned.

  • repo - Optional
    Only list previews in the provided repository. If preview is also specified, this argument is ignored.

  • project - Optional
    Only list previews in the provided project. If preview or repo are also specified, this argument is ignored.

  • agent - Optional
    Only list previews hosted on a given agent. This can be combined with any of the above filters. Only Tugboat Admins can use this filter.

If none of the above arguments are provided, all previews that the user has access to are returned.

Example

socket.emit('tugboat', 'previews', 'list', args, callback);

Output

The requested previews. If a requested preview is not returned, it either does not exist, or the API key used to make the request does not have permission to view it.

single

{
    "_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": "https://api.github.com/repos/TugboatQA/tugboat-test/git/commits/e741cf14f476dc3341068a0da022f623b24976b4",
                    "type": "commit",
                    "sha": "e741cf14f476dc3341068a0da022f623b24976b4"
                },
                "url": "https://api.github.com/repos/TugboatQA/tugboat-test/git/refs/heads/master",
                "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": [
        "https://master-v0xq1vwswxtr7p3ubxhbfc4j.dev.tugboat.qa",
        "http://master-v0xq1vwswxtr7p3ubxhbfc4j.dev.tugboat.qa"
    ],
    "anchor": false,
    "locked": false,
    "state": "ready",
    "scope": "tugboat",
    "id": "58cf4e012057230001ae530a"
}

array

[
    {
        "_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": "https://api.github.com/repos/TugboatQA/tugboat-test/git/commits/e741cf14f476dc3341068a0da022f623b24976b4",
                        "type": "commit",
                        "sha": "e741cf14f476dc3341068a0da022f623b24976b4"
                    },
                    "url": "https://api.github.com/repos/TugboatQA/tugboat-test/git/refs/heads/master",
                    "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": [
            "https://master-v0xq1vwswxtr7p3ubxhbfc4j.dev.tugboat.qa",
            "http://master-v0xq1vwswxtr7p3ubxhbfc4j.dev.tugboat.qa"
        ],
        "anchor": false,
        "locked": false,
        "state": "ready",
        "scope": "tugboat",
        "id": "58cf4e012057230001ae530a"
    }
]

results matching ""

    No results matching ""