Update user Run in API Explorer

PUT /v1/users/{user.name}

Update a user's credentials.

Path parameters

  • user.name string Required

    Username.

application/json

Body Required

  • mechanism string

    SASL mechanism to use for authentication.

    Values are SASL_MECHANISM_SCRAM_SHA_256 or SASL_MECHANISM_SCRAM_SHA_512.

  • password string

    Password.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • mechanism string

      SASL mechanism to use for authentication.

      Values are SASL_MECHANISM_SCRAM_SHA_256 or SASL_MECHANISM_SCRAM_SHA_512.

    • name string
  • 400 application/json

    Bad request. Check API documentation and update request.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

  • 401 application/json

    Unauthenticated.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

  • 500 application/json

    Internal Server Error. Reach out to support.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

  • default application/json

    An unexpected error response.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

PUT /v1/users/{user.name}
curl \
 --request PUT 'https://{dataplane_api_subdomain}.cloud.redpanda.com/v1/users/{user.name}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"user":{"password":"new-password","mechanism":"SASL_MECHANISM_SCRAM_SHA_256"}}'
Request example
{
  "user": {
    "password": "new-password",
    "mechanism": "SASL_MECHANISM_SCRAM_SHA_256"
  }
}
Response examples (200)
{
  "user": {
    "name": "payment-service",
    "mechanism": "SASL_MECHANISM_SCRAM_SHA_256"
  }
}
Response examples (400)
{
  "code": "INVALID_ARGUMENT",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.ErrorInfo",
      "domain": "redpanda.com/dataplane",
      "reason": "REASON_INVALID_INPUT",
      "metadata": {}
    },
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "field": "user.password",
          "description": "value length must be at least 3 characters"
        },
        {
          "field": "user.mechanism",
          "description": "value is required"
        }
      ]
    }
  ],
  "message": "provided parameters are invalid"
}
Response examples (401)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string"
        }
      ]
    }
  ],
  "message": "string"
}
Response examples (500)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string"
        }
      ]
    }
  ],
  "message": "string"
}
Response examples (default)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string"
        }
      ]
    }
  ],
  "message": "string"
}