PyScripts Module REST API

GET /v1/rating/module_config/pyscripts/scripts

Get the script list

Parameters:
  • no_data (bool) – Set to True to remove script data from output.

  • deleted (bool) – Show deleted mappings.

  • start (datetime) – Mappings with start after date.

  • end (datetime) – Mappings with end before date.

  • updated_by (str) – user uuid to filter on.

  • created_by (str) – user uuid to filter on.

  • deleted_by (str) – user uuid to filter on.

  • description (str) – mapping that contains the text in description.

  • is_active (bool) – only active mappings.

Return:

List of every scripts.

Return type:

ScriptCollection

GET /v1/rating/module_config/pyscripts/scripts/(script_id)

Return a script.

Parameters:
  • script_id (uuid) – UUID of the script to filter on.

Return type:

Script

POST /v1/rating/module_config/pyscripts/scripts

Create pyscripts script.

Parameters:
  • force (bool) – Allows start and end in the past.

  • script_data (Script) – Informations about the script to create.

Return type:

Script

PUT /v1/rating/module_config/pyscripts/scripts

Update pyscripts script.

Parameters:
  • script_id (uuid) – UUID of the script to update.

  • script_data (Script) – Script data to update.

Return type:

Script

DELETE /v1/rating/module_config/pyscripts/scripts

Delete the script.

Parameters:
  • script_id (uuid) – UUID of the script to delete.

class cloudkitty.rating.pyscripts.datamodels.script.Script(**kw)[source]

Type describing a script.

checksum

Checksum of the script data.

created_at

The date the rule was created.

created_by

The id of the user who created the rule.

data

Data of the script.

deleted

The date the rule was deleted.

deleted_by

The id of the user who deleted the rule.

description

The description of the rule.

end

Must be None or a date in the future. To set a date in the past, use the force parameter in the POST query.

name

Name of the script.

script_id

UUID of the script.

start

Must be None or a date in the future. To set a date in the past, use the force parameter in the POST query.

updated_by

The id of the user who last updated the rule.

class cloudkitty.rating.pyscripts.datamodels.script.ScriptCollection(**kw)[source]

Type describing a list of scripts.

scripts

List of scripts.