|
10 | 10 | HYPERNODE_API_APP_EAV_DESCRIPTION_ENDPOINT = "/v2/app/eav_descriptions/" |
11 | 11 | HYPERNODE_API_APP_FLAVOR_ENDPOINT = "/v2/app/{}/flavor/" |
12 | 12 | HYPERNODE_API_APP_FLOWS_ENDPOINT = "/logbook/v1/logbooks/{}/flows" |
13 | | -HYPERNODE_API_BRANCHER_APP_ENDPOINT = "/v2/brancher/app/{}/" |
14 | | -HYPERNODE_API_BRANCHER_ENDPOINT = "/v2/brancher/{}/" |
15 | 13 | HYPERNODE_API_APP_NEXT_BEST_PLAN_ENDPOINT = "/v2/app/{}/next_best_plan/" |
| 14 | +HYPERNODE_API_APP_ORDER_ENDPOINT = "/v2/app/order/" |
16 | 15 | HYPERNODE_API_APP_PRODUCT_LIST_ENDPOINT = "/v2/product/app/{}/" |
17 | 16 | HYPERNODE_API_APP_XGRADE_CHECK_ENDPOINT = "/v2/app/xgrade/{}/check/{}/" |
18 | 17 | HYPERNODE_API_APP_XGRADE_ENDPOINT = "/v2/app/xgrade/{}/" |
19 | 18 | HYPERNODE_API_BACKUPS_ENDPOINT = "/v2/app/{}/backup/" |
| 19 | +HYPERNODE_API_BLOCK_ATTACK_DESCRIPTION_ENDPOINT = "/v2/app/block_attack_descriptions/" |
| 20 | +HYPERNODE_API_BRANCHER_APP_ENDPOINT = "/v2/brancher/app/{}/" |
| 21 | +HYPERNODE_API_BRANCHER_ENDPOINT = "/v2/brancher/{}/" |
20 | 22 | HYPERNODE_API_PRODUCT_APP_DETAIL_ENDPOINT = "/v2/product/app/{}/current/" |
21 | 23 | HYPERNODE_API_PRODUCT_LIST_ENDPOINT = "/v2/product/" |
22 | 24 | HYPERNODE_API_PRODUCT_PRICE_DETAIL_ENDPOINT = "/v2/product/{}/with_price/" |
23 | 25 | HYPERNODE_API_VALIDATE_APP_NAME_ENDPOINT = "/v2/app/name/validate/" |
24 | 26 | HYPERNODE_API_WHITELIST_ENDPOINT = "/v2/whitelist/{}/" |
25 | | -HYPERNODE_API_APP_ORDER_ENDPOINT = "/v2/app/order/" |
26 | 27 |
|
27 | 28 |
|
28 | 29 | class HypernodeAPIPython: |
@@ -404,6 +405,22 @@ def get_product_info_with_price(self, product_code, error_to_raise=None): |
404 | 405 | raise error_to_raise |
405 | 406 | return response |
406 | 407 |
|
| 408 | + def get_block_attack_descriptions(self): |
| 409 | + """ |
| 410 | + Get the block attack descriptions. These can be used to block attacks |
| 411 | + by automatically placing an NGINX snippet in /data/web/nginx if the |
| 412 | + specified block is compatible with the current NGINX configuration. |
| 413 | + Example: |
| 414 | + > client.requests("GET", "/v2/app/block_attack_descriptions/").json() |
| 415 | + > { |
| 416 | + > 'BlockSqliBruteForce': 'Attempts to deploy NGINX rules to block suspected (blind) SQL injection attack', |
| 417 | + > ... |
| 418 | + > } |
| 419 | +
|
| 420 | + :return obj response: The request response object |
| 421 | + """ |
| 422 | + return self.requests("GET", HYPERNODE_API_BLOCK_ATTACK_DESCRIPTION_ENDPOINT) |
| 423 | + |
407 | 424 | def get_whitelist_options(self, app_name): |
408 | 425 | """ |
409 | 426 | Get whitelist options for app. Retrieve the options for specifying |
|
0 commit comments