hooks

Hook scripts for specific events.

get /events/scripts/{id}

Get the script file contents.

Arguments
  • idrequiredinteger

    -

  • Authorizationrequiredstring

    OAuth bearer token authorization header.

Definition
get /events/scripts/{id}
Attributes
Example response
"string"

delete /events/scripts/{id}

Delete a script file.

Arguments
  • idrequiredinteger

    -

  • Authorizationrequiredstring

    OAuth bearer token authorization header.

Definition
delete /events/scripts/{id}

patch /events/scripts/{id}

Update or rename a script file.

Arguments
  • idrequiredinteger

    -

  • bodyoptional

    -

  • Authorizationrequiredstring

    OAuth bearer token authorization header.

Definition
patch /events/scripts/{id}

get /events/scripts

List of all script files.

Arguments
  • Authorizationrequiredstring

    OAuth bearer token authorization header.

Definition
get /events/scripts
Attributes
  • idinteger

    -

  • namestring

    -

Example response
[ { "id": 0, "name": "string" } ]

post /events/scripts

Create a script file.

Arguments
  • bodyoptional

    -

  • Authorizationrequiredstring

    OAuth bearer token authorization header.

Definition
post /events/scripts
Attributes
  • idobject

    -

Example response
{ "id": {} }

get /events/hooks/hook-points

List of all available hook points.

Arguments
  • Authorizationrequiredstring

    OAuth bearer token authorization header.

Definition
get /events/hooks/hook-points
Attributes
  • namestring

    -

  • canChooseServerboolean

    True for hook points running on Ceph nodes. False for hook points running on the management node.

  • descriptionstring

    Description of the hook point.

  • parametersarray

    Information on parameters passed to the script.

    • namestring

      -

    • descriptionstring

      -

Example response
[ { "name": "string", "canChooseServer": true, "description": "string", "parameters": [ { "name": "string", "description": "string" } ] } ]

get /events/hooks

List of all installed hook scripts.

Arguments
  • Authorizationrequiredstring

    OAuth bearer token authorization header.

Definition
get /events/hooks
Attributes
  • idinteger

    -

  • scriptIdinteger

    -

  • scriptNamestring

    -

  • eventstring

    [PreNetworkConfig, PostNetworkConfig, PreDaemonStart, PostDaemonStart, PreFormatDisk, PostFormatDisk, PostCephDaemonStart, OnHealthDegrade, OnHealthRecover, PreCrushMapChange, PostCrushMapChange, OnDhcpLeaseUpdate]

  • allServersboolean

    -

  • serverIdsarray

    -

  • serverNamesarray

    -

Example response
[ { "id": 0, "scriptId": 0, "scriptName": "string", "event": "PreNetworkConfig", "allServers": true, "serverIds": [ 0 ], "serverNames": [ "string" ] } ]

post /events/hooks

Install a hook script at a given hook point.

Arguments
  • bodyoptional

    -

  • Authorizationrequiredstring

    OAuth bearer token authorization header.

Definition
post /events/hooks

delete /events/hooks/{id}

Delete a hook event.

Arguments
  • idrequiredinteger

    -

  • Authorizationrequiredstring

    OAuth bearer token authorization header.

Definition
delete /events/hooks/{id}

patch /events/hooks/{id}

Install a hook script at a given hook point.

Arguments
  • idrequiredinteger

    -

  • bodyoptional

    -

  • Authorizationrequiredstring

    OAuth bearer token authorization header.

Definition
patch /events/hooks/{id}

post /events/hooks/{id}/execute

Run a hook script now.

Arguments
  • idrequiredinteger

    -

  • Authorizationrequiredstring

    OAuth bearer token authorization header.

Definition
post /events/hooks/{id}/execute