Data Source Group API
Go Up to Data Source API
This part of the ER/Studio Team Server API lets you work with data sources groups.
Contents
- 1 GET v1/datasourcegroups
- 2 GET v1/datasourcegroups/<id>
- 3 GET v1/datasourcegroups/roots
- 4 POST v1/datasourcegroups
- 5 POST v1/datasourcegroups/<datasourcegroup_id>/datasources/<datasource_id>
- 6 PUT v1/datasourcegroups/<id>
- 7 DELETE v1/datasourcegroups/<id>
- 8 DELETE v1/datasourcegroups/<datasourcegroup_id>/datasources/<datasource_id>
- 9 Data Source Group Fields
- 10 Example Response
- 11 See Also
GET v1/datasourcegroups
Obtains a list of data source groups of the current user without children information.
GET v1/datasourcegroups/<id>
Obtains information about the data source group with the specified ID.
GET v1/datasourcegroups/roots
Obtains a list of root data source groups and also a list of un-grouped data sources for the user on separate arrays.
Note: Ungrouped data sources will be returned just if the user is allowed to get its.
POST v1/datasourcegroups
Creates a data source group. Your request must provide the following fields:
- name
- Note: You only need to specify the new datasource group name.
- description (optional)
- parentId (optional)
- Note: You only need to specify the ID of the datasource group you want to be the parent.
If successful, the response from the server provides all the details about your new data source group.
POST v1/datasourcegroups/<datasourcegroup_id>/datasources/<datasource_id>
Move the data source with <datasource_id> to the data source group with <datasourcegroup_id> even if the data source already belongs to another data source group. If the user is not allowed to perfom this procedure, a forbidden message will be shown.
PUT v1/datasourcegroups/<id>
Updates the information of a data source group. Your request can provide any combination of the following fields:
- name
- Note: You only need to specify the new datasource group name.
- description(optional)
- parentId(optional)
- Note: You only need to specify the ID of the datasourec group you want to be the parent.
If successful, the response from the server provides all the details about your modified data source group.
DELETE v1/datasourcegroups/<id>
Deletes the data source group with the specified ID. When deleting a data source group, all its children will be deleted too.
If successful, the response is {"message":"OK","status":"200"}
.
DELETE v1/datasourcegroups/<datasourcegroup_id>/datasources/<datasource_id>
Remove data source with <datasource_id> from data source group with <datasourcegroup_id>. If the user is not allowed to perfom this procedure, a forbidden message will be shown.
Data Source Group Fields
Data source Group resources in Data Source Group API requests and responses may include any combination of the following fields:
Item | Example | Description |
---|---|---|
|
|
An integer that uniquely identifies the data source group. |
|
|
A String that identifies the data source group with a name. |
|
|
A String which describes the data source group. |
|
|
The type of the resource. Its value is always "DatasourceGroup" for data source group resources. |
|
|
Path relative to the ER/Studio Team Server root API URL that points to the entry of the data source group resource. |
|
|
The date when the data source group was created, in Unix time (seconds since 1970). |
|
|
The date when the data source was last modified, in Unix time (seconds since 1970). |
|
|
Database(*) Path. |
|
|
An integer that identifies the data source group parent Id. |
|
|
List of children of data source group. |
|
|
List of children of data source group that are data source groups. |
|
|
List of children of data source group that are data sources. |
Example Response
This is from a GET v1/datasourcegroups/<id> call:
{
"datasourcegroup" : {
"id" : 1,
"type" : "DatasourceGroup",
“name”: Data source group name,
“description”: Data source group description,
"url" : "/v1/datasourcegroups/1",
"createdAt" : 1320296464,
"modifiedAt" : 1320296466,
"path" : "Production",
"parentId": null,
"children": [
{
"datasourcegroups": [
{
"id" : 11,
"type" : "DatasourceGroup",
“name”: Data source group name,
“description”: Data source group description,
"url" : "http://api.connect.embarcadero.com/v1/datasourcegroups/11",
"createdAt" : 1320296464,
"modifiedAt" : 1320296466,
"path" : "Production/Oracle",
"parentId": 1
},
{
"id" : 12,
"type" : "DatasourceGroup",
“name”: Data source group name,
“description”: Data source group description,
"url" : "http://api.connect.embarcadero.com/v1/datasourcegroups/12",
"createdAt" : 1320296464,
"modifiedAt" : 1320296466,
"path" : "Production/SQLServer",
"parentId": 1
}
],
"datasources": [
{
"id" : 1234,
"name" : "Data Source Name",
"type" : "Data Source",
"url" : “http://api.connect.embarcadero.com/v1/datasources/1234",
"createdAt" : 1320296464,
"modifiedAt" : 1320296466,
...
}
]
}
]
}