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