client.users.delete_api_keys

A method of the Users endpoint.

delete_api_keys(id: str, key_id: int) Response

Revoke the specified API key

API URL: DELETE /users/{id}/api_keys/{key_id}

import civis
client = civis.APIClient()
response = client.users.delete_api_keys(...)
Parameters:
idstr

The ID of the user or β€˜me’.

key_idint

The ID of the API key.

Returns:
civis.Response
  • idint

    The ID of the API key.

  • namestr

    The name of the API key.

  • expires_atstr (date-time)

    The date and time when the key expired.

  • created_atstr (date-time)

    The date and time when the key was created.

  • revoked_atstr (date-time)

    The date and time when the key was revoked.

  • last_used_atstr (date-time)

    The date and time when the key was last used.

  • scopesList[str]

    The scopes which the key is permissioned on.

  • use_countint

    The number of times the key has been used.

  • expiredbool

    True if the key has expired.

  • activebool

    True if the key has neither expired nor been revoked.

  • constraintsList[civis.Response]

    Constraints on the abilities of the created key

    • constraintstr

      The path matcher of the constraint.

    • constraint_typestr

      The type of constraint (exact/prefix/regex/verb).

    • get_allowedbool

      Whether the constraint allows GET requests.

    • head_allowedbool

      Whether the constraint allows HEAD requests.

    • post_allowedbool

      Whether the constraint allows POST requests.

    • put_allowedbool

      Whether the constraint allows PUT requests.

    • patch_allowedbool

      Whether the constraint allows PATCH requests.

    • delete_allowedbool

      Whether the constraint allows DELETE requests.