Platform O&M/Automated O&M/XML Hook
POSTXML HookSince 5.2.0SynchronousAuth Required
CreateVmUserDefinedXmlHookScript
CreateVmUserDefinedXmlHookScript
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Request Inputs
Body Fields
paramsObjectRequiredRequest body parameter object.
nameStringRequiredThe XML Hook name.
descriptionStringOptional. The detailed information of the XML Hook.
hookScriptStringRequiredThe XML Hook content.
resourceUuidStringOptional. The resource UUID.
tagUuidsListOptional. The tag UUID list.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/vm-instances/xml-hook-script
/zstack/v1/vm-instances/xml-hook-script
Request Example
curl -X POST 'http://{host}/zstack/v1/vm-instances/xml-hook-script' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"name":"<name>","description":"<description>","hookScript":"<hookScript>","resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": {} }Change History
This API has no change history records yet.
