Provisioning DB2 databases
Use the following procedures to provision a DB2 database:
The base URL for the API is:
Creating a DB2 instance
Use the following procedure to create a DB2 instance.
Syntax
Method
POST
Required parameters
The required parameters are as follows:
- inst_name—Use the display name of the instance.
node—Use the fully qualified nodeId.
- version—Use the DB2 version for which you want to create the instance.
- template_id—Use the ID provided in the templates of BDA interface.
Optional parameters
Use the parameter override_values to override the custom field values in the supplied DB2 template. You must provide values in this field when the following conditions exist:
- The custom fields are not defined in the supplied template.
- You have not provided the default values in the supplied template.
Example API response
A sample response is as follows:
"status": "success",
"status_code": 200,
"data": {
"job_id": "479",
"result": "Please check job '479' for info!!"
}
}
Example API command
A sample example is as follows:
Creating a DB2 database
Use the following procedure to create a DB2 database.
Syntax
Method
POST
Required parameters
The required parameters are as follows:
- db_name—Use the display name of the database.
- inst_name—Use the display name of the instance.
node—Use the fully qualified nodeId.
- version—Use the DB2 version for which you want to create the database.
- template_id—Use the ID provided in the templates of BDA interface.
Optional parameters
Use the parameter override_values to override the custom field values in the supplied DB2 template. You must provide values in this field when the following conditions exist:
- The custom fields are not defined in the supplied template.
- You have not provided the default values in the supplied template.
Example API response
A sample response is as follows:
"status": "success",
"status_code": 200,
"data": {
"job_id": "479",
"result": "Please check job '479' for info!!"
}
}
Example API command
A sample example is as follows:
Starting a DB2 instance
Use the following procedure to start a DB2 instance.
Syntax
Method
POST
Required parameters
The required parameters are as follows:
- inst_name—Use the display name of the instance.
node—Use the fully qualified nodeId.
- node_ip—Use the IP address of the Agent.
- hostname—Use the host name of the Agent node.
Example API response
A sample response is as follows:
"status": "success",
"status_code": 200,
"data": {
"job_id": "479",
"result": "Please check job '479' for info!!"
}
}
Example API command
A sample example is as follows:
Stopping a DB2 instance
Use the following procedure to stop a DB2 instance.
Syntax
Method
POST
Required parameters
The required parameters are as follows:
- inst_name—Use the display name of the instance.
node—Use the fully qualified nodeId.
- node_ip—Use the IP address of the Agent.
- hostname—Use the host name of the Agent node.
Example API response
A sample response is as follows:
"status": "success",
"status_code": 200,
"data": {
"job_id": "479",
"result": "Please check job '479' for info!!"
}
}
Example API command
A sample example is as follows:
Removing a DB2 database
Use the following procedure to remove a DB2 database.
Syntax
Method
POST
Required parameters
The required parameters are as follows:
- db_name—Use the display name of the database.
- inst_name—Use the display name of the instance.
node—Use the fully qualified nodeId.
- template_id—Use the ID provided in the templates of BDA interface.
Example API response
A sample response is as follows:
"status": "success",
"status_code": 200,
"data": {
"job_id": "479",
"result": "Please check job '479' for info!!"
}
}
Example API command
A sample example is as follows:
Removing a DB2 instance
Use the following procedure to remove a DB2 instance.
Syntax
Method
POST
Required parameters
The required parameters are as follows:
- inst_name—Use the display name of the instance.
node—Use the fully qualified nodeId.
- template_id—Use the ID provided in the templates of BDA interface.
Example API response
A sample response is as follows:
"status": "success",
"status_code": 200,
"data": {
"job_id": "479",
"result": "Please check job '479' for info!!"
}
}
Example API command
A sample example is as follows:
Related topic