Relationship API

From TeamServer ER/Studio
Jump to: navigation, search

Go Up to API Reference

This part of the Team Server API lets you work with relationship.

GET v1/{element1Type}/{element1Id}/{element2Type}/{element2Id}

Obtains the element with the id {element2Id}from {element2Type} that is related with the element with id {element1Id}from {element1Type}.

GET v1/{element1Type}/{element1Id}/{element2Type}

Obtains the list of elements of type {element2Type} related with id {element1Id} from {element1Type}.

POST v1/{element1Type}/{element1Id}/{element2Type}/{element2Id}

Creates a relationship between elements {element1Id} and {element2Id} with types {element1Type} and {element2Type}.

DELETE v1/{element1Type}/{element1Id}/{element2Type}/{element2Id}

Unrelate element {element1Id} from type {element1Type} with {element2Id} from type {element2Type}.

Relationship Fields

Relationship API requests and responses may include any combination of the following fields:

Item Example Description

"element1Type"

"datasource"

A string that defines the fisrt element type.

"element1Id"

16

An integer that uniquely identifies the element from the first type.

"element2Type"

"logincredential"

A string that defines the second element type.

"element2Id"

9

An integer that uniquely identifies the element from the second type.

See Also