|
23 | 23 | HYPERNODE_API_BRANCHER_APP_ENDPOINT = "/v2/brancher/app/{}/" |
24 | 24 | HYPERNODE_API_FPM_STATUS_APP_ENDPOINT = "/v2/nats/{}/hypernode.show-fpm-status" |
25 | 25 | HYPERNODE_API_BRANCHER_ENDPOINT = "/v2/brancher/{}/" |
| 26 | +HYPERNODE_API_INSIGHTS_ANNOTATION_LIST_ENDPOINT = "/v2/insights-annotation/" |
26 | 27 | HYPERNODE_API_PRODUCT_APP_DETAIL_ENDPOINT = "/v2/product/app/{}/current/" |
27 | 28 | HYPERNODE_API_PRODUCT_LIST_ENDPOINT = "/v2/product/" |
28 | 29 | HYPERNODE_API_PRODUCT_PRICE_DETAIL_ENDPOINT = "/v2/product/{}/with_price/" |
@@ -925,6 +926,38 @@ def get_fpm_status(self, app_name): |
925 | 926 | "POST", HYPERNODE_API_FPM_STATUS_APP_ENDPOINT.format(app_name) |
926 | 927 | ) |
927 | 928 |
|
| 929 | + def get_insights_annotations(self, params=None): |
| 930 | + """ |
| 931 | + List all custom Insights annotations for the Hypernodes you have |
| 932 | + access to. Only annotations created through the API are listed, |
| 933 | + system annotations generated from platform events are not included. |
| 934 | + Example: |
| 935 | + > client.get_insights_annotations().json() |
| 936 | + > { |
| 937 | + > 'count': 1, |
| 938 | + > 'next': None, |
| 939 | + > 'previous': None, |
| 940 | + > 'results': [ |
| 941 | + > { |
| 942 | + > 'id': 123, |
| 943 | + > 'name': 'Deployed release 1.2.3', |
| 944 | + > 'x_axis': 1756384957, |
| 945 | + > 'app': 'yourhypernodeappname', |
| 946 | + > 'metrics': 'memory_usage', |
| 947 | + > 'created': '2025-08-28T12:42:37Z', |
| 948 | + > 'modified': '2025-08-28T12:42:37Z' |
| 949 | + > } |
| 950 | + > ] |
| 951 | + > } |
| 952 | +
|
| 953 | + :param dict params: Optional query parameters to paginate the |
| 954 | + results with. An example could be: {'limit': 10, 'offset': 20} |
| 955 | + :return obj response: The request response object |
| 956 | + """ |
| 957 | + return self.requests( |
| 958 | + "GET", HYPERNODE_API_INSIGHTS_ANNOTATION_LIST_ENDPOINT, params=params |
| 959 | + ) |
| 960 | + |
928 | 961 | def create_brancher(self, app_name, data): |
929 | 962 | """ |
930 | 963 | Create a new branch (server replica) of your Hypernode. |
|
0 commit comments