Deletes an existing user

DELETE /users/{user_name}

Deletes an existing user.

Path parameters

Responses

  • User successfully deleted

    Additional properties are allowed.

    • The user cannot be deleted. (code: user.restricted_deletion)
    • External users cannot be modified. (code: user.cannot_modify_external)
    • Built-in users cannot be modified. (code: user.cannot_modify)
    Hide headers attribute Show headers attribute
    • The error codes associated with the response

      Values are user.restricted_deletion, user.cannot_modify_external, or user.cannot_modify.

    Hide response attribute Show response attribute object
    • errors array[object] Required

      A list of errors that occurred in the failing request

      Hide errors attributes Show errors attributes object
      • code string Required

        A structured code representing the error type that occurred

      • message string Required

        A human readable message describing the error that occurred

      • fields array[string]

        If the error can be tied to a specific field or fields in the user request, this lists those fields

  • User not found. (code: user.not_found)

    Hide headers attribute Show headers attribute
    Hide response attribute Show response attribute object
    • errors array[object] Required

      A list of errors that occurred in the failing request

      Hide errors attributes Show errors attributes object
      • code string Required

        A structured code representing the error type that occurred

      • message string Required

        A human readable message describing the error that occurred

      • fields array[string]

        If the error can be tied to a specific field or fields in the user request, this lists those fields

DELETE /users/{user_name}
curl \
 -X DELETE https://{{hostname}}/api/v1/users/{user_name}
Response examples (200)
{}
Response examples (400)
# Headers
x-cloud-error-codes: user.restricted_deletion

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}
Response examples (404)
# Headers
x-cloud-error-codes: user.not_found

# Payload
{
  "errors": [
    {
      "code": "string",
      "message": "string",
      "fields": [
        "string"
      ]
    }
  ]
}