Foreign Keys 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 foreign keys.

GET v1/foreignkeys

Obtains a list of relationships.

If successful, the response from the server provides a list of relationships with details about each one of them.

GET v1/models/<model id>/foreignkeys

Obtains a list of relationships of the model with the specified ID.

If successful, the response from the server provides a list of relationships with details about each one of them.

GET v1/foreignkeys/<id>

Obtains information about the relationship with the specified ID.

Foreign Keys Fields

Foreign Keys resources may provide the following fields:

Item Example Description

"id"

76

An integer that uniquely identifies the relationship.

"businessName"

"Orders to Address"

The business name of the relationship.

"constraintName"

"FK_Orders_to_Address"

The constraint name of the relationship.

"description"

"Identifies shipping address for order deliveries"

A description of the relationship.

"relationshipType"

"Non-Identifying"

The type of the relationship.

"existence"

"Optional"

The existence of the relationship.

"cardinality"

"Zero or More"

The cardinality of the relationship.

"verbPhrase"

"delivered to"

The verb phrase for the relationship.

"inverseVerbPhrase"

"receives delivery from"

The inverse verb phrase for the relationship.

"logicalOnly"

"False"

Set to "True" if the relationship is set to Logical Only.

"physicalOnly"

"False"

Set to "True" if the relationship is set to Physical Only.

"logicalPhysical"

"Logical"

Indicates the type of model containing the relationship.

"notes"

"Null address indicates the default shipping address for the customer should be used."

Some notes about the relationship.

"url"

"/v1/foreignkeys/76"

Path relative to the Team Server root API URL that points to the entry of the relationship 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 relationship resource at http://teamserver.example.com/api/v1/entities/76 .

"link"

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

Path relative to the Team Server root URL that points to the page of the relationship.

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 relationship at http://teamserver.example.com/object/view.spg?key=76 .

"createdAt"

1369928964

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

"diagramId"

2

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

"diagram"

"Adventure Works.DM1"

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

"diagramURL"

"/v1/diagrams/2"

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

"diagramLink"

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

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

"modelId"

3

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

"model"

"Logical"

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

"modelURL"

"/v1/models/3"

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

"modelLink"

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

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

"parentId"

108

The ID of the entity or table that is the parent of the relationship. See "id" in the Entity API or Table API.

"childId"

109

The ID of the entity or table that is the child of the relationship. See "id" in the Entity API or Table API.

"parentEntityName"

"Orders"

The logical name of the parent table of the relationship. See "name" in the Entity API.

"childEntityName"

"Address"

The logical name of the child table of the relationship. See "name" in the Entity API.

"parentTableName"

"ORDERS"

The physical name of the parent table of the relationship. See "name" in the Table API.

"childTableName"

"ADDR"

The physical name of the child table of the relationship. See "name" in the Table API.

"parentURL"

"/v1/entities/108"

API path of the entity or table that is the parent of the relationship. See "url" in the Entity API or Table API.

"childURL"

"/v1/entities/109"

API path of the entity or table that is the child of the relationship. See "url" in the Entity API or Table API.

"parentLink"

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

Relative URL of the entity or table that is the parent of the relationship. See "link" in the Entity API or Table API.

"childLink"

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

Relative URL of the entity or table that is the child of the relationship. See "link" in the Entity API or Table 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 relationship. 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 relationship. Each entry provides the following fields:

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

See the Security Property API for more information.

"submodels"

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

A list of models that are children of the relationship. 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 relationship. 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"

"Foreign Key"

The type of the resource. Its value is always "Foreign Key" for relationship resources.

See Also