Data Source API
Go Up to API Reference
This part of the Team Server API allows you to work with data sources.
Contents
GET v1/datasources
Obtains a list of data sources.
If successful, the response from the server provides a list of data sources with details about each one of them.
GET v1/datasources/<id>
Obtains information about the data source with the specified ID.
POST v1/datasources
Creates a data source. Your request must provide the following fields:
- name
- databaseType
- description (optional)
- stewards (optional)
- Note: You only need to specify either the ID or the name of each steward. For example:
{ "name": "jane" }
- Note: You only need to specify either the ID or the name of each steward. For example:
- properties (optional)
- properties.name (optional)
- properties.value (optional)
- category.name (optional)
- category.id (optional)
- category.color (optional)
- location (optional)
- productionLevel (optional)
- geoLocation.latitude (optional)
- geoLocation.longitude(optional)
- applicationAffinity (optional)
Depending on the specified databaseType you must provide some additional fields as well.
If successful, the response from the server provides all the details about your new data source.
PUT v1/datasources/<id>
Updates the information of a data source. Your request can provide any combination of the following fields:
- name (optional)
- description (optional)
- status (optional)
- stewards (optional)
- Note: You only need to specify either the ID or the name of each steward. For example:
{ "name": "jane" }
- Note: You only need to specify either the ID or the name of each steward. For example:
- abbreviations (optional)
- aliases (optional)
- userData (optional)
- properties (optional)
- properties.name (optional)
- properties.value (optional)
- category.name (optional)
- category.id (optional)
- category.color (optional)
- location (optional)
- productionLevel (optional)
- geoLocation.latitude (optional)
- geoLocation.longitude(optional)
- applicationAffinity (optional)
If successful, the response from the server provides all the details about your modified data source.
DELETE v1/datasources/<id>
Deletes the data source with the specified ID. If successful, the response is {"message":"OK","status":"200"}
.
Data Source Fields
DBMS-Agnostic Fields
Data source resources in Data Source API requests and responses can include any combination of the following fields:
Item | Example | Description |
---|---|---|
|
|
An integer that uniquely identifies the data source. |
|
|
The name of the data source. |
|
|
A description of the data source. |
|
|
The type of database management system (DBMS) of the data source. Supported DBMS are:
|
|
|
Some custom properties of the data source. |
|
|
The date when the data source was created, in Unix time (seconds since 1970). |
|
|
The date when the data source was last modified, in Unix time (seconds since 1970). |
|
|
Path relative to the Team Server root API URL that points to the entry of the data source 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 data source resource at http://teamserver.example.com/api/v1/datasources/33 . |
|
|
Path relative to the Team Server root URL that points to the page of the data source. 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 data source at http://teamserver.example.com/datasource/view.spg?key=33 . |
|
|
A list of people that are stewards of the data source. Each person entry provides the following fields:
|
|
|
The type of the resource. Its value is always "Data Source" for data source resources. |
|
|
Any abbreviations used. |
|
|
|
|
|
|
|
|
Custom properties |
|
|
Property name |
|
|
Property value |
|
|
Category name |
|
|
Category ID |
|
|
Category color |
|
|
Location |
|
|
Production, Test, QA |
|
|
Latitude coordinate (float) |
|
|
Longitude coordinate (float) |
|
|
Application affinities |
|
|
The Data Source creation date. Possible from a GET command. |
|
|
The Data Source latest modified date. Possible from a GET command. |
DBMS-Specific Fields
The following fields are only available for specific types of database management systems (DBMS). See Data Source Fields for a Specific Database Management System for more information.
Item | Example | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example Response
This is an example response from a GET v1/datasources call:
{
"datasources": [
{
"databaseType": "SQL Server",
"port": "1433",
"protocol": "TCP/IP",
"trusted": false,
"link": "/datasource/view.spg?key=34",
"hostname": "127.0.0.1",
"type": "Data Source",
"url": "/v1/datasources/34",
"database": "ReportingDatabase",
"id": 34,
"encryption": true,
"createdAt": 1372171322,
"description": "Database to store progress and status reports.",
"name": "Reporting Database",
"stewards": [
{
"id": "2",
"name": "jane",
"type": "person",
"url": "/v1/people/2"
}
]
},
{
"databaseType": "InterBase",
"port": "3050",
"dialect": "3",
"link": "/datasource/view.spg?key=33",
"hostname": "127.0.0.1",
"type": "Data Source",
"url": "/v1/datasources/33",
"id": 33,
"characterset": "UTF-8",
"createdAt": 1372171125,
"description": "Main database to store user information of any kind.",
"name": "User Database",
"path": "C:\\users.gdb",
"role": "",
"stewards": [
{
"id": "2",
"name": "jane",
"type": "person",
"url": "/v1/people/2"
"status": "Online",
"databaseType" : "SQLServer",
"hostname" : "ss01"
"properties": [
{ "name": "dialect",
"value": "1"]}
"applicationAffinity": [ "Client data", "Marketing"],
"location": "Elche",
"geoLocation" :
{ "latitude" : 90,
"longitude" : 90 },
"productionLevel" : "Development"} }
],
"metadata_": {
"limit": 25,
"totalCount": 2,
"offset": 0
"status": "Online",
} }
}
This is from a GET v1/datasources/<id> call:
{
"datasource": {
"databaseType": "InterBase",
"port": "3050",
"dialect": "3",
"link": "/datasource/view.spg?key=33",
"hostname": "127.0.0.1",
"type": "Data Source",
"url": "/v1/datasources/33",
"id": 33,
"characterset": "UTF-8",
"createdAt": 1372171125,
"description": "Main database to store user information of any kind.",
"name": "User Database",
"path": "C:\\users.gdb",
"role": "",
"stewards": [
{
"id": "2",
"name": "jane",
"type": "person",
"url": "/v1/people/2"
"status": "Online",
"databaseType" : "SQLServer",
"hostname" : "ss01"
"properties": [
{ "name": "dialect",
"value": "1"}],
"applicationAffinity": [ "Client data", "Marketing"],
"location": "Elche",
"geoLocation" :
{ "latitude" : 90,
"longitude" : 90},
"productionLevel" : "Development"}
}
}