Column API

From TeamServer ER/Studio
Jump to: navigation, search

Go Up to API Reference

This part of the Team Server API allows you to work with columns.

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

"id"

1002

An integer that uniquely identifies the column.

"name"

"AddressID"

The name of the column.

"description"

"Primary key for Address records."

A description of the column.

"notes"

"New values should always be higher than the higher existing value."

Some notes about the column.

"schema"

"Person"

The schema of the table that contains the column.

"domain"

""

The domain of the column.

"datatype"

"int"

The type of the value of the column.

"keytype"

"Non-Inherited Key"

The type of key of the column.

"primaryKey"

"True"

Whether or not the column is part of the primary key of its parent table.

"foreignKey"

"False"

Whether or not the column is a foreign key.

"isNullable"

"NOT NULL"

Whether or not the value of the column can be none, null.

"scale"

""

The scale of the column.

"length"

""

The maximum length of the value of the column.

"default"

""

The default value of the column, if any.

"url"

"/v1/columns/1002"

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 .

"link"

"/object/view.spg?key=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 .

"createdAt"

1369928964

The date when the column was created, in Unix time (seconds since 1970).

"diagramId"

2

The ID of the diagram containing the column. See "id" in the Diagram API.

"diagram"

"Adventure Works.DM1"

The name of the diagram containing the column. See "name" in the Diagram API.

"diagramURL"

"/v1/diagrams/2"

API path of the diagram containing the column. See "url" in the Diagram API.

"diagramLink"

"/object/view.spg?key=2"

Relative URL of the diagram containing the column. See "link" in the Diagram API.

"modelId"

5

The ID of the model containing the column. See "id" in the Model API.

"model"

"Adventure Works"

The name of the model containing the column. See "name" in the Model API.

"modelURL"

"/v1/models/5"

API path of the model containing the column. See "url" in the Model API.

"modelLink"

"/object/view.spg?key=5"

Relative URL of the model containing the column. See "link" in the Model API.

"entityName"

"Address"

The name of the entity implemented by the table that contains the column. See "name" in the Entity API.

"tableId"

108

The ID of the table that contains the column. See "id" in the Table API.

"tableName"

"Address"

The name of the table that contains the column. See "name" in the Table API.

"tableURL"

"/v1/columns/108"

API path of the table that contains the column. See "url" in the Table API.

"tableLink"

"/object/view.spg?key=108"

Relative URL of the table that contains the column. See "link" in the Table API.

"attributeName"

"Adventure Works.DM1"

The name of the attribute implemented by the column. See "name" in the Attribute API.

"attachments"

[ { "id": "3790", "link": "/object/view.spg?key=3790", "name": "Post transformation tasks", "value": "", "dictionary": "Adventure Works_DD", "datatype": "Text", "type": "Pre and Post Operations" }, // … ]

A list of attachments of the column. Each entry provides the following fields:

  • id
  • name
  • value
  • type
  • datatype
  • dictionary
  • link

See the Attachment API for more information.

"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" }, // … ]

A list of security properties of the column. Each entry provides the following fields:

  • id
  • name
  • value
  • type
  • datatype
  • dictionary
  • link

See the Security Property API for more information.

"submodels"

[ { "id": "30108", "description": "", "link": "/object/view.spg?key=30108", "name": "Main Model", "image": "/getDiagImage.spg?image=8b13b1e8ad4b4b1a86f9291c2d6ff1ea" }, // … ]

A list of models that are children of the column. Each entry provides the following fields:

  • id
  • name
  • description
  • image
  • link

See the Model API for more information.

"alerts"

[ { "securityproperty": [ { "id": "3804" } ], "id": "54", "alertText": "This ER object has a moderate security level.", "alertType": "Value", "alertLevel": "Info", "type": "Alert", "alertValue": "Moderate" }, // … ]

A list of alerts that affect the column. Each entry provides the following fields:

  • id
  • alertType
  • alertValue (only if "alertType": "Value")
  • alertLevel
  • alertText
  • securityproperty
  • type

See the Alert API for more information.

"type"

"Column"

The type of the resource. Its value is always "Column" for column resources.

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"
    }
}

See Also

Personal tools
Product Videos