Deployment Manager
This section describes the following Deployment Manager Procedures:
POST /executeQuery
This API is used to execute query.
Parameters:
None
Request Body
Example Value - Schema
[
“query”: "string",
“standardSQL”: “string”
]
Example
curl -X POST -u admin:admin "http://localhost:9400/rest/deploy/executeQuery" -H "accept: application/json" -H "Content-Type: */*" -d "{\"query\":\"string\",\"standardSql\":\"string\"}"
POST /executeDDL
This API is used to execute DDL commands.
Parameters:
None
Request Body
Example Value - Schema
[
"string"
]
Example to Create Site
curl -X POST -u admin:admin "http://localhost:9400/rest/deploy/executeDDL" -d 'CREATE RESOURCE /mySite OF TYPE "site" SET ANNOTATION "my site annotation" SET PROPERTIES { "host" : "localhost", "port": 9400, "user":"admin", "password":"3217F78A02BBAE0B", "domain":"composite"}'
Example to Create Resource Set
curl -X POST -u admin:admin "http://localhost:9400/rest/deploy/executeDDL" -d 'CREATE RESOURCE /mySite/myResourceSet OF TYPE "resource_set" SET ANNOTATION "my resource set annotation" SET PROPERTIES { "definition" : "{\""includeDependencies\"":\""true\"",\""resourceTrees\"":[{\""path\"":\""/share",\""type\"":\""CONTAINER\""}]}"}'
Example to Create Principal Set
curl -X POST -u admin:admin "http://localhost:9400/rest/deploy/executeDDL" -d 'CREATE RESOURCE /mySourceSite/myPrincipalSet OF TYPE "principal_set" SET PROPERTIES { "definition" : [ "/composite/user/dev"] }'
Example to Create Principal Set Mapping
curl -X POST -u admin:admin "http://localhost:9400/rest/deploy/executeDDL" -d 'CREATE RESOURCE /myTargetSite/mySourceSite OF TYPE "principal_set_mapping" SET ANNOTATION "myAnnotation" SET PROPERTIES { "definition" : { "/composite/user/dev" : "/composite/user/test"}}'
Example to Create Deployment Plan
curl -X POST -u admin:admin "http://localhost:9400/rest/deploy/executeDDL" -d 'CREATE RESOURCE /myTargetSite/mySourceSite/MyDeploymentPlan_PrincipalSet_ADD OF TYPE "deployment_plan" SET ANNOTATION "myAnnotation" SET PROPERTIES { "definition" : "{\""operations\"":{\""principalSet\"":\""myPrincipalSet\"",\""targetOperation\"":\""ADD\""}}"}'
POST /executePlan
This API is used to execute Deployment Plan.
Parameters:
None
Request Body
Example Value - Schema
[
"string"
]
Example
curl -X POST -u admin:admin "http://localhost:9400/rest/deploy/executePlan" -d '/myTargetSite/mySourceSite/DeploymentPlanName'
GET /export_dm_metadata
This API is used to export Deployment Management Artifacts.
Parameters:
Name | Description | Parameter Type | Data Type |
encryptionPassword | Encryption password | query | string |
Example
curl -X GET -u admin:admin "http://localhost:9400/rest/deploy/export_dm_metadata" -H "Content-Type:application/binary"
GET /export_plan_package
This API is used to export Deployment Plan.
Parameters:
Name | Description | Parameter Type | Data Type |
plan | The plan name that will be exported | query | string |
encryptionPassword | Encryption password | query | string |
Example
curl -X GET -u admin:admin "http://localhost:9400/rest/deploy/export_plan_package?plan=planName" -H "Content-Type:application/binary"
POST /import_dm_metadata
This API is used to import Deployment Management Artifacts.
Parameters
Name | Description | Parameter Type | Data Type |
file | The name of the file to be imported. | query | object |
overwrite | Option to indicate whether to overwrite. | query | boolean |
encryptionPassword | Encryption Password | query | string |
ignoreEncryption | Option to indicate whether to ignore encryption errors. | query | boolean |
Note: If the option ignoreEncryption is used, then all backup data will be imported regardless of whether a valid encryption key was provided. This means that the import will not fail. This option can be used to allow partially importing any backed up data. However, the import process will only import data that is not encrypted or can be decrypted using the provided encryption key. All encrypted portions of the backup data that cannot be decrypted will be imported as empty values and the import will otherwise succeed.
This affects all encrypted values in the backup data, which includes, but is not limited to data source and LDAP domain connection passwords.
Example
curl -X POST -u admin:admin "http://localhost:9400/rest/deploy/import_dm_metadata" -H "Content-Type:multipart/form-data" -v -F 'file=@localfilename' -F “ignoreEncryption=true” -X 'overwrite=true/false'
DELETE /purgeLog
This API is used to purge Deployment Logs.
Parameters
Name | Description | Parameter Type | Data Type |
ids | The plan ids | query | string |
begin | The log begin time | query | string |
end | The log end time | query | string |
Example
curl -X DELETE -u admin:admin "http://localhost:9400/rest/deploy/purgeLog" -H "begin:0" -H "end:2408386295553"
GET /validateSite
This API is used to validate Site Information.
Parameters:
Name | Description | Parameter Type | Data Type |
siteName | Name of the site | query | string |
Example
curl -X GET -u admin:admin "http://localhost:9400/rest/deploy/validateSite?siteName=sourceSite"