View a Tugboat API Key

Retrieves the details of a Tugboat API key, or a set of API keys.

Arguments

  • key - Optional
    The ID of the key to retrieve. This can be a single ID, or an array of key IDs. If not specified, a list of all keys that the user has permission to view is returned.

  • parent - Optional
    Return a list of keys that are children of the specified parent. Only the parent key, and any of its children, or an admin key, can retrieve a list of the parent's children.

Example

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

Output

The requested keys. If an array of keys was requested, an array is returned. Otherwise, a single object is returned. If a requested key is missing from the result, it either does not exist, or the requestor does not have permission to view it.

single

{ updatedAt: '2017-02-07T22:05:48.284Z',
  createdAt: '2017-02-07T22:05:48.284Z',
  name: 'NewKey2',
  _id: '589a44bc236154000137a369',
  admin: false,
  id: '589a44bc236154000137a369',

array

[ { updatedAt: '2017-02-07T22:05:48.284Z',
  createdAt: '2017-02-07T22:05:48.284Z',
  name: 'NewKey2',
  _id: '589a44bc236154000137a369',
  admin: false,
  id: '589a44bc236154000137a369',

Errors

  • 1001: No Keys Found
    Returned if the requested keys either do not exist, or the requestor does not have permission to view them.

results matching ""

    No results matching ""