Delete a Tugboat API Key

Deletes a Tugboat API Key, or a set of API Keys.

Arguments

  • key - Required
    The ID of the key to delete.

Example

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

Output

When the requested keys are successfully deleted, they are returned to show what was deleted. If an array of keys was specified, 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 delete 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 delete them.

  • 1002: No key ID provided
    The required key argument was not included in the request.

results matching ""

    No results matching ""