Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Create Virtual Table

POST/api/v2/connectivity/connections/{connectionRid}/virtualTables
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Creates a new Virtual Table from an upstream table. The VirtualTable will be created in the specified parent folder and can be queried through Foundry's data access APIs.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:connectivity-virtual-table-write.

Path parameters

connectionRid
string

The Resource Identifier (RID) of a Connection (also known as a source).

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Request body

CreateVirtualTableRequest
object
Hide child attributes

Hide child attributes

markings
list<MarkingId>
optional
Show child attributes

Show child attributes

parentRid
string

The unique resource identifier (RID) of a Folder.

name
string

The name of a VirtualTable.

config
union
Show child attributes

Show child attributes

Response body

VirtualTable
object

The created VirtualTable

Hide child attributes

Hide child attributes

rid
string

The Resource Identifier (RID) of a registered VirtualTable.

name
string

The name of a VirtualTable.

parentRid
string

The unique resource identifier (RID) of a Folder.

config
union
Show child attributes

Show child attributes

markings
list<MarkingId>
optional
Show child attributes

Show child attributes

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ \t-H "Content-type: application/json" \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/connectivity/connections/ri.magritte..source.c078b71b-92f9-41b6-b0df-3760f411120b/virtualTables?preview=true" \ -d '{"markings":["18212f9a-0e63-4b79-96a0-aae04df23336"],"parentRid":"ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791","name":"my_table"}'

Response

Copied!
1 2 3 4 5 6 7 8 { "markings": [ "18212f9a-0e63-4b79-96a0-aae04df23336" ], "parentRid": "ri.compass.main.folder.c410f510-2937-420e-8ea3-8c9bcb3c1791", "name": "my_table", "rid": "ri.foundry.main.table.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da" }

Error responses

Error Name
InvalidVirtualTableConnectionError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe specified connection is invalid or inaccessible.
Parametersconnection, reason
VirtualTableAlreadyExistsError CodeCONFLICT
Status Code409
DescriptionA VirtualTable with the same name already exists in the parent folder.
ParametersparentRid, name
VirtualTableRegisterFromSourcePermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionUser lacks permission to use the specified connection for virtual table registration.
Parameters
CreateVirtualTablePermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not create the VirtualTable.
ParametersconnectionRid
ConnectionNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given Connection could not be found.
ParametersconnectionRid