# Update Data Table

`PUT /lokta-lms/api/v1/datatables/{datatableName}`

Modifies fields of a data table. If the apptableName parameter is passed, data table is deregistered and registered with the new application table.

## Parameters
- `datatableName` (path, string, required): datatableName

## Request body (application/json)
- `addColumns` (array of PutDataTablesRequestAddColumns)
- `apptableName` (string)
- `changeColumns` (array of PutDataTablesRequestChangeColumns)
- `dropColumns` (array of PutDataTablesRequestDropColumns)

## Responses
- `200`: OK

## Response fields
- `resourceIdentifier` (string)

## Example request (cURL)
```bash
curl -X PUT \
  'https://default.lokta.tech/lokta-lms/api/v1/datatables/{datatableName}' \
  -u '{username}:{password}' \
  -H 'Tenant-Identifier: default' \
  -H 'Content-Type: application/json' \
  -d '{
  "addColumns": [
    {
      "code": "Gender",
      "indexed": true,
      "mandatory": true,
      "name": "Question"
    }
  ],
  "apptableName": "l_client",
  "changeColumns": [
    {
      "code": "Gender",
      "indexed": true,
      "mandatory": true,
      "name": "Question"
    }
  ],
  "dropColumns": [
    {
      "name": "Gender_cd_Question"
    }
  ]
}'
```

## Example response
```json
{
  "resourceIdentifier": "extra_client_details"
}
```

Interactive: https://developer.lokta.ai/reference#operation/updateDatatable
