Column API
Go Up to API Reference
This part of the Team Server API allows you to work with columns.
Contents
GET v1/tables/<table id>/columns
Obtains a list of columns of the table with the specified ID.
If successful, the response from the server provides a list of columns with details about each one of them.
GET v1/columns/<id>
Obtains information about the column with the specified ID.
Column Fields
Column resources in Column API requests and responses can include any combination of the following fields:
Item | Example | Description |
---|---|---|
|
|
An integer that uniquely identifies the column. |
|
|
The name of the column. |
|
|
A description of the column. |
|
|
Some notes about the column. |
|
|
The schema of the table that contains the column. |
|
|
The domain of the column. |
|
|
The type of the value of the column. |
|
|
The type of key of the column. |
|
|
Whether the column is part of the primary key of its parent table. |
|
|
Whether the column is a foreign key. |
|
|
Whether the value of the column can be none, null. |
|
|
The scale of the column. |
|
|
The maximum length of the value of the column. |
|
|
The default value of the column, if any. |
|
|
Path relative to the Team Server root API URL that points to the entry of the column 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 column resource at http://teamserver.example.com/api/v1/columns/1002 . |
|
|
Path relative to the Team Server root URL that points to the page of the column. 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 column at http://teamserver.example.com/object/view.spg?key=1002 . |
|
|
The date when the column was created, in Unix time (seconds since 1970). |
|
|
The ID of the diagram containing the column. See |
|
|
The name of the diagram containing the column. See |
|
|
API path of the diagram containing the column. See |
|
|
Relative URL of the diagram containing the column. See |
|
|
The ID of the model containing the column. See |
|
|
The name of the model containing the column. See |
|
|
API path of the model containing the column. See |
|
|
Relative URL of the model containing the column. See |
|
|
The name of the entity implemented by the table that contains the column. See |
|
|
The ID of the table that contains the column. See |
|
|
The name of the table that contains the column. See |
|
|
API path of the table that contains the column. See |
|
|
Relative URL of the table that contains the column. See |
|
|
The name of the attribute implemented by the column. See |
|
|
A list of attachments of the column. Each entry provides the following fields:
See the Attachment API for more information. |
|
|
A list of security properties of the column. Each entry provides the following fields:
See the Security Property API for more information. |
|
|
A list of models that are children of the column. Each entry provides the following fields:
See the Model API for more information. |
|
|
A list of alerts that affect the column. Each entry provides the following fields:
See the Alert API for more information. |
|
|
The type of the resource. Its value is always "Column" for column resources. |
|
|
Set to "True" if the relationship is set to Logical Only. |
|
|
Set to "True" if the relationship is set to Physical Only. |
Example Response
This is an example response from a GET v1/tables/<table id>/columns call:
{
"metadata_": {
"limit": 25,
"totalCount": 8,
"offset": 0
},
"columns": [
{
"scale": "",
"diagramURL": "/v1/diagrams/2",
"model": "Adventure Works",
"link": "/object/view.spg?key=1002",
"tableURL": "/v1/tables/108",
"type": "Column",
"schema": "Person",
"id": 1002,
"tableId": 108,
"modelURL": "/v1/models/5",
"alerts": [],
"description": "Primary key for Address records.",
"tableName": "Address",
"createdAt": 1369928964,
"diagramLink": "/object/view.spg?key=2",
"name": "AddressID",
"modelLink": "/object/view.spg?key=5",
"domain": "",
"isNullable": "NOT NULL",
"length": "",
"attachments": [],
"diagramId": 2,
"foreignKey": "False",
"securityproperties": [],
"url": "/v1/columns/1002",
"attributeName": "AddressID",
"modelId": 5,
"default": "",
"keytype": "Non-Inherited Key",
"submodels": [
{
"id": "3048",
"description": "",
"link": "/object/view.spg?key=3048",
"name": "Main Model",
"image": "/getDiagImage.spg?image=013208b00fcb42b091b0be14d439ac3a"
},
// …
],
"primaryKey": "True",
"datatype": "int",
"diagram": "Adventure Works.DM1",
"notes": "",
"tableLink": "/object/view.spg?key=108"
},
// …
]
}
This is from a GET v1/columns/<id> call:
{
"column": {
"scale": "",
"diagramURL": "/v1/diagrams/2",
"model": "Adventure Works",
"link": "/object/view.spg?key=1002",
"tableURL": "/v1/tables/108",
"type": "Column",
"schema": "Person",
"id": 1002,
"tableId": 108,
"modelURL": "/v1/models/5",
"alerts": [],
"description": "Primary key for Address records.",
"tableName": "Address",
"createdAt": 1369928964,
"diagramLink": "/object/view.spg?key=2",
"name": "AddressID",
"modelLink": "/object/view.spg?key=5",
"domain": "",
"isNullable": "NOT NULL",
"length": "",
"attachments": [],
"diagramId": 2,
"foreignKey": "False",
"securityproperties": [],
"url": "/v1/columns/1002",
"attributeName": "AddressID",
"modelId": 5,
"default": "",
"keytype": "Non-Inherited Key",
"submodels": [
{
"id": "3048",
"description": "",
"link": "/object/view.spg?key=3048",
"name": "Main Model",
"image": "/getDiagImage.spg?image=013208b00fcb42b091b0be14d439ac3a"
},
// …
],
"primaryKey": "True",
"datatype": "int",
"diagram": "Adventure Works.DM1",
"notes": "",
"tableLink": "/object/view.spg?key=108"
}
}