Update a Tugboat API Key

Updates the properties of a Tugboat API Key, or a set of API keys.

Arguments

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

  • name - Optional
    A human-readable name to associate with the key.

  • parent - Optional
    Change the key's parent key. Only a Tugboat Admin can change this property.

  • admin (boolean) - Optional
    Whether the key should be a Tugboat Super Admin. Only a Tugboat Admin can change this property.

Example

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

Output

The keys that were successfully updated. If an array of keys was specified, an array is returned. Otherwis, a single object is returned. If a key is not returned, it either does not exist, or the requestor does not have permission to update 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 update them.

  • 1002: No key ID provided

The required key argument was not included in the request.

results matching ""

    No results matching ""