Databases
Quick Navigation
- GET Databases
- GET Databases/{id}
- GET Assets/{id}/Databases
- POST Assets/{id}/Databases
- PUT Databases/{id}
- DELETE Databases/{id}
For more information on related topics, please see:
GET Databases
Purpose
Returns a list of databases.
Required Permissions
Asset Management (Read).
Request Body
None.
Response Body
Content-Type: application/json
[ { AssetID: int, DatabaseID : int, PlatformID : int, InstanceName : string, IsDefaultInstance : bool, Port : int, Version : string, Template:string }, … ]
Response Codes
201 – Request successful. Databases in the response body.
For more information, please see Common Response Codes.
GET Databases/{id}
Purpose
Returns a database by ID.
Required Permissions
Asset Management (Read).
URL Parameters
id: ID of the database.
Request Body
None.
Response Body
Content-Type: application/json
{ AssetID:int, DatabaseID : int, PlatformID : int, InstanceName : string, IsDefaultInstance : bool, Port : int, Version : string }
Response Codes
201 – Request successful. Databases in the response body.
For more information, please see Common Response Codes.
GET Assets/{id}/Databases
Purpose
Returns a list of databases for the given asset.
Required Permissions
Asset Management (Read).
URL Parameters
id: ID of the asset.
Request Body
None.
Response Body
Content-Type: application/json
[ { AssetID: int, DatabaseID : int, PlatformID : int, InstanceName : string, IsDefaultInstance : bool, Port : int, Version : string, Template:string }, …
Response Codes
201 – Request successful. Databases in the response body.
For more information, please see Common Response Codes.
POST Assets/{id}/Databases
Purpose
Creates a new database in the asset referenced by ID.
Required Permissions
Asset Management (Read/Write).
URL Parameters
id: ID of the asset.
Request Body
Content-Type: application/json
{ PlatformID : int, InstanceName : string, IsDefaultInstance : bool, Port : int, Version : string, Template : string, }
Request Body Details
- PlatformID: (required) ID of the platform
- InstanceName: Name of the database instance. Required when IsDefaultInstance is false. Max string length is 100.
- IsDefaultInstance: True if the database instance is the default instance, otherwise false.
Only MS SQL Server and MySQL platforms support setting this value to true.
- Port: (required) The database port.
- Version: The database version. Max string value is 20.
- Template: The database connection template.
Response Body
Content-Type: application/json
{ AssetID: int, DatabaseID : int, PlatformID : int, InstanceName : string, IsDefaultInstance : bool, Port : int, Version : string, Template:string }
Response Codes
200 – Request successful. Databases in the response body.
For more information, please see Common Response Codes.
PUT Databases/{id}
Purpose
Updates an existing database by ID.
Required Permissions
Asset Management (Read/Write).
URL Parameters
id: ID of the database.
Request Body
Content-Type: application/json
{ PlatformID: int, InstanceName: string, IsDefaultInstance: bool, Port: int, Version: string, Template: string }
Request Body Details
- PlatformID: (required) ID of the platform.
- InstanceName: Name of the database instance. Required when IsDefaultInstance is false. Max string length is 100.
- IsDefaultInstance: True if the database instance is the default instance, otherwise false.
Only MS SQL Server and MySQL platforms support setting this value to true.
- Port: The database port.
- Version: The database version. Max string length is 20.
- Template: The database connection template.
Response Body
Content-Type: application/json
{ AssetID: int, DatabaseID: int, PlatformID: int, InstanceName: string, IsDefaultInstance: bool,Port: int, Version: string, Template: string }
Response Codes
200 – Request successful. Databases in the response body.
For more information, please see Common Response Codes.
DELETE Databases/{id}
Purpose
Deletes a database by ID.
Required Permissions
Asset Management (Read/Write).
URL Parameters
id: ID of the database.
Request Body
None.
Response Body
None.
Response Codes
200 – Request successful.
For more information, please see Common Response Codes.