> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# /lock/table

```
URL: http://<db.host>:<db.port>/lock/table
```

Manages global access to a table's data.  By default a table has a input
parameter *lock\_type* of *read\_write*, indicating all operations are permitted.
A user may request a *read\_only* or a *write\_only* lock, after which only read
or write operations, respectively, are permitted on the table until the lock is
removed.  When input parameter *lock\_type* is *no\_access* then no operations
are permitted on the table.  The lock status can be queried by setting input
parameter *lock\_type* to *status*.

## Input Parameter Description

<ParamField body="table_name" type="string">
  Name of the table to be locked, in \[schema\_name.]table\_name format, using standard [name resolution rules](../../concepts/tables/#table-name-resolution). It must be a currently existing table or view.
</ParamField>

<ParamField body="lock_type" type="string">
  The type of lock being applied to the table. Setting it to *status* will return the current lock status of the table without changing it.

  The default value is `status`.

  * **status**: Show locked status.
  * **no\_access**: Allow no read/write operations.
  * **read\_only**: Allow only read operations.
  * **write\_only**: Allow only write operations.
  * **read\_write**: Allow all read/write operations.
</ParamField>

<ParamField body="options" type="map of string to strings">
  Optional parameters.

  The default value is an empty map ( \{} ).
</ParamField>

## Output Parameter Description

The Kinetica server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query.  Here is a description of the various fields of the wrapper:

<ResponseField name="status" type="String">
  'OK' or 'ERROR'
</ResponseField>

<ResponseField name="message" type="String">
  Empty if success or an error message
</ResponseField>

<ResponseField name="data_type" type="String">
  'lock\_table\_response' or 'none' in case of an error
</ResponseField>

<ResponseField name="data" type="String">
  Empty string
</ResponseField>

<ResponseField name="data_str" type="JSON or String">
  This embedded JSON represents the result of the /lock/table endpoint:

  <Expandable title="data_str">
    <ResponseField name="lock_type" type="string">
      Returns the lock state of the table.
    </ResponseField>

    <ResponseField name="info" type="map of string to strings">
      Additional information.
    </ResponseField>
  </Expandable>

  Empty string in case of an error.
</ResponseField>
