POST /api/v1/tables/add_field
Add a new field to an existing table.
Resource Information
| Content-Type |
application/json |
Parameters:
| database (optional) |
The name of the database.
|
| table |
The name of an existing table to add the field to. |
| field_name |
The name of the field to add. |
| field_type |
The data type of the new field. Any EventQL data type is allowed. |
| repeated |
Boolean. If true, the field type is specified as repeated. |
| optional |
Boolean. If true, the field is marked as optional. |
Example Request
>> POST /api/v1/tables/add_field HTTP/1.1
>> Content-Type: application/json
>> Content-Length: ...
>>
>> {
>> "table": "my_sensor",
>> "field_name": "location",
>> "field_type": "STRING",
>> "repeated": false,
>> "optional": true
>> }
Example Response
<< HTTP/1.1 201 Created
<< Content-Length: 0