Creates a data table.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
pairec:CreateTableMeta |
create |
*All Resource
|
None | None |
Request syntax
POST /api/v1/tablemetas HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| Name |
string |
Yes |
The name of the data table. |
table_test |
| ResourceId |
string |
Yes |
The resource ID. To get this ID, call the ListInstanceResources operation. |
reso-2s416t146ffjc3yefx |
| TableName |
string |
Yes |
The name of the table in the database. |
table_mysql |
| Module |
string |
Yes |
The module to which the data table belongs.
|
ABTest |
| InstanceId |
string |
Yes |
The instance ID. To get this ID, call the ListInstances operation. |
pairec-cn-test123 |
| Fields |
array<object> |
Yes |
The list of fields. |
|
|
object |
No |
Field information. |
||
| Name |
string |
Yes |
The name of the field. |
gender |
| Meaning |
string |
Yes |
The business definition of the field. |
this is gender of people |
| Type |
string |
Yes |
The data type of the field. |
BIGINT |
| IsDimensionField |
boolean |
Yes |
Indicates whether the field is a dimension field. |
false |
| DataType |
string |
No |
The logical data type of the field. Valid values:
|
primary_key |
| IsPartitionField |
string |
Yes |
Indicates whether the field is a partition field. |
true |
| Description |
string |
Yes |
The description of the data table. |
this is a test table |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| RequestId |
string |
The request ID. |
728C5E01-ABF6-5AA8-B9FC-B3BA05DECC77 |
| TableMetaId |
string |
The ID of the data table. |
2 |
Examples
Success response
JSON format
{
"RequestId": "728C5E01-ABF6-5AA8-B9FC-B3BA05DECC77",
"TableMetaId": "2"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.