# Create table by selection

Information note**LOCKED.**   
  
This API is extremely reliable and will not be broken unless absolutely necessary.

## Method

POST

## Path

/qrs/selection/{id}/[type]/table?filter={filter}&skip={skip}&take={take}&sortColumn={sortColumn}&orderAscending={orderAscending}

## Description

Add a new table definition from the selection set identified by `{id}`.

Optionally, include an empty GUID in the API call. Optionally, filter the columns in the table.

Tables are used to list specific properties for entities.

The `Name` property must not include spaces.

Use `[columnType]` in the following way:

* When `[columnType]` is set to `Property`, the `Definition` property must contain the property name.
* When `[columnType]` is set to `Function`, the `Definition` property must contain the function that produces the column values. Initially, the supported functions only include `count([type1], [type2],…)`.
* When `[columnType]` is set to `List`, the `Definition` property must contain the list item type and the list property must be specified as a list of columns.

## Body

`TableDefinition:`

```
{
   "id": "00000000-0000-0000-0000-000000000000",
   "type": "...",
   "columns":
      [
         {
            "name": "...",
            "columnType": Property/Function/List,
            "definition": "[property name]/[function name]/[list item type]",
            "list":
               [
                  { <columns> }
               ]
         },
            ...
      ]
}
```

## Return value

`ITable:`

```
{
   "id": "00000000-0000-0000-0000-000000000000",
   "type": "...",
   "columnNames":
      [
         "name1",
         "name2",
         ...
      ],
   "rows":
      [
         {
            [
               "item1.1",
               "item1.2",
               ...
            ]
         },
         {
            [
               "item2.1",
               "item2.2",
               ...
            ]
         },
         ...
      ]
}
```

## Optional parameters

* `{filter}`: See [Filtering](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-Filtering.htm).
* `{skip}`: See [Table pagination](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-Table-Pagination.htm).
* `{take}`: See [Table pagination](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-Table-Pagination.htm).
* `{sortColumn}`: See [Table pagination](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-Table-Pagination.htm).
* `{orderAscending}`: See [Table pagination](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-Table-Pagination.htm).