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.
- Return:
List of every scripts.
- Return type:
- 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:
- POST /v1/rating/module_config/pyscripts/scripts¶
Create pyscripts script.
- PUT /v1/rating/module_config/pyscripts/scripts¶
Update pyscripts script.
- DELETE /v1/rating/module_config/pyscripts/scripts¶
Delete the script.
- Parameters:
script_id (
uuid
) – UUID of the script to delete.
- type Script¶
Type describing a script.
Data samples:
- Json
{ "checksum": "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e", "data": "return 0", "name": "policy1", "script_id": "bc05108d-f515-4984-8077-de319cbf35aa" }
- XML
b'<value>\n <script_id>bc05108d-f515-4984-8077-de319cbf35aa</script_id>\n <name>policy1</name>\n <data>return 0</data>\n <checksum>cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e</checksum>\n</value>'
- checksum¶
Checksum of the script data.
- data¶
Data of the script.
- name¶
Name of the script.
- script_id¶
UUID of the script.
- type ScriptCollection¶
Type describing a list of scripts.
Data samples:
- Json
{ "scripts": [ { "checksum": "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e", "data": "return 0", "name": "policy1", "script_id": "bc05108d-f515-4984-8077-de319cbf35aa" } ] }
- XML
b'<value>\n <scripts>\n <item>\n <script_id>bc05108d-f515-4984-8077-de319cbf35aa</script_id>\n <name>policy1</name>\n <data>return 0</data>\n <checksum>cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e</checksum>\n </item>\n </scripts>\n</value>'
- scripts¶
List of scripts.