Table API
Go Up to API Reference
This part of the Team Server API allows you to work with tables.
Contents
GET v1/tables
Obtains a list of tables.
If successful, the response from the server provides a list of tables with details about each one of them.
GET v1/models/<model id>/tables
Obtains a list of tables of the model with the specified ID.
If successful, the response from the server provides a list of tables with details about each one of them.
GET v1/tables/<id>
Obtains information about the table with the specified ID.
Table Fields
Table resources in Table API requests and responses can include any combination of the following fields:
Item | Example | Description |
---|---|---|
|
|
An integer that uniquely identifies the table. |
|
|
The name of the table. |
|
|
A description of the table. |
|
|
The schema of the table. |
|
|
Some notes about the table. |
|
|
Path relative to the Team Server root API URL that points to the entry of the table resource. For example, if the Team Server root API URL is http://teamserver.example.com/api , the example value here determines that you can access the table resource at http://teamserver.example.com/api/v1/tables/108 . |
|
|
Path relative to the Team Server root URL that points to the page of the table. For example, if the Team Server root URL is http://teamserver.example.com , the example value here determines that you can access the page of the table at http://teamserver.example.com/object/view.spg?key=108 . |
|
|
The date when the table was created, in Unix time (seconds since 1970). |
|
|
The ID of the diagram containing the table. See |
|
|
The name of the diagram containing the table. See |
|
|
API path of the diagram containing the table. See |
|
|
Relative URL of the diagram containing the table. See |
|
|
The ID of the model containing the table. See |
|
|
The name of the model containing the table. See |
|
|
API path of the model containing the table. See |
|
|
Relative URL of the model containing the table. See |
|
|
The name of the entity implemented by the table. See |
|
|
A list of columns of the table. Each entry provides the following fields:
See the Column API for more information. |
|
|
A list of attachments of the table. Each entry provides the following fields:
See the Attachment API for more information. |
|
|
A list of security properties of the table. Each entry provides the following fields:
See the Security Property API for more information. |
|
|
A list of models that are children of the table. Each entry provides the following fields:
See the Model API for more information. |
|
|
A list of alerts that affect the table. Each entry provides the following fields:
See the Alert API for more information. |
|
|
The type of the resource. Its value is always "Table" for table resources. |
Example Response
This is an example response from a GET v1/tables call:
{
"tables": [
{
"diagramURL": "/v1/diagrams/2",
"model": "Adventure Works",
"link": "/object/view.spg?key=108",
"columns": [
{
"scale": "",
"securityproperties": [],
"attributeLink": "/object/view.spg?key=411",
"link": "/object/view.spg?key=1000",
"attributeId": 411,
"type": "Column",
"url": "/v1/columns/1000",
"id": "1000",
"attributeName": "AddressLine2",
"default": "",
"keytype": "Non-Inherited Non-Key",
"createdAt": 1369928964,
"description": "Second street address line.",
"primaryKey": "False",
"name": "AddressLine2",
"domain": "",
"isNullable": "NULL",
"length": "60",
"attachments": [],
"datatype": "nvarchar",
"notes": "",
"attributeURL": "/v1/attributes/411",
"foreignKey": "False"
},
// …
],
"type": "Table",
"schema": "Person",
"id": 108,
"modelURL": "/v1/models/5",
"alerts": [],
"createdAt": 1369928964,
"description": "Street address information for customers, employees, and vendors.",
"name": "Address",
"modelLink": "/object/view.spg?key=5",
"diagramLink": "/object/view.spg?key=2",
"attachments": [],
"diagramId": 2,
"securityproperties": [
{
"id": "3804",
"link": "/object/view.spg?key=3804",
"name": "Security Impact",
"value": "Moderate",
"dictionary": "Adventure Works_DD",
"datatype": "Text List",
"type": "Data Security Classification"
},
// …
],
"url": "/v1/tables/108",
"entityName": "Address",
"modelId": 5,
"submodels": [
{
"id": "3048",
"description": "",
"link": "/object/view.spg?key=3048",
"name": "Main Model",
"image": "/getDiagImage.spg?image=013208b00fcb42b091b0be14d439ac3a"
},
// …
],
"diagram": "Adventure Works.DM1",
"notes": ""
},
// …
],
"metadata_": {
"limit": 25,
"totalCount": 120,
"offset": 0
}
}
This is from a GET v1/tables/<id> call:
{
"table": {
"diagramURL": "/v1/diagrams/2",
"model": "Adventure Works",
"link": "/object/view.spg?key=108",
"columns": [
{
"scale": "",
"securityproperties": [],
"attributeLink": "/object/view.spg?key=189",
"link": "/object/view.spg?key=997",
"attributeId": 189,
"type": "Column",
"url": "/v1/columns/997",
"id": "997",
"attributeName": "rowguid",
"default": "",
"keytype": "Non-Inherited Non-Key",
"createdAt": 1369928964,
"description": "ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.",
"primaryKey": "False",
"name": "rowguid",
"domain": "",
"isNullable": "NOT NULL",
"length": "",
"attachments": [],
"datatype": "uniqueidentifier",
"notes": "",
"attributeURL": "/v1/attributes/189",
"foreignKey": "False"
},
// …
],
"type": "Table",
"schema": "Person",
"id": 108,
"modelURL": "/v1/models/5",
"alerts": [],
"createdAt": 1369928964,
"description": "Street address information for customers, employees, and vendors.",
"name": "Address",
"modelLink": "/object/view.spg?key=5",
"diagramLink": "/object/view.spg?key=2",
"attachments": [],
"diagramId": 2,
"securityproperties": [
{
"id": "3804",
"link": "/object/view.spg?key=3804",
"name": "Security Impact",
"value": "Moderate",
"dictionary": "Adventure Works_DD",
"datatype": "Text List",
"type": "Data Security Classification"
},
// …
],
"entityURL": "/v1/entities/40",
"url": "/v1/tables/108",
"entityName": "Address",
"modelId": 5,
"submodels": [
{
"id": "3048",
"description": "",
"link": "/object/view.spg?key=3048",
"name": "Main Model",
"image": "/getDiagImage.spg?image=013208b00fcb42b091b0be14d439ac3a"
},
// …
],
"diagram": "Adventure Works.DM1",
"notes": ""
}
}