### Create OnboardingHardwareInventory from JSON and Dict - Python Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/OnboardingHardwareInventory.md Demonstrates how to create an instance of the OnboardingHardwareInventory model from a JSON string or a Python dictionary. It also shows how to convert an existing instance back into a JSON string or a dictionary. ```python from graphiant_sdk.models.onboarding_hardware_inventory import OnboardingHardwareInventory # TODO update the JSON string below json_string = "{}" # create an instance of OnboardingHardwareInventory from a JSON string onboarding_hardware_inventory_instance = OnboardingHardwareInventory.from_json(json_string) # print the JSON string representation of the object print(OnboardingHardwareInventory.to_json()) # convert the object into a dict onboarding_hardware_inventory_dict = onboarding_hardware_inventory_instance.to_dict() # create an instance of OnboardingHardwareInventory from a dict onboarding_hardware_inventory_from_dict = OnboardingHardwareInventory.from_dict(onboarding_hardware_inventory_dict) ``` -------------------------------- ### Get Alarms and Events using Graphiant SDK Python Source: https://context7.com/graphiant-inc/graphiant-sdk-python/llms.txt This example shows how to retrieve active alarms and alarm history using the Graphiant SDK. It makes separate calls to list active alarms and get alarm history, printing details for each alarm and history entry. Includes error handling for ApiException. ```python import graphiant_sdk from graphiant_sdk.exceptions import ApiException # Assuming 'api' and 'bearer_token' are already initialized # api = graphiant_sdk.ApiClient(...) # bearer_token = "your_bearer_token" # Get active alarms try: alarms = api.v1_alarms_list_get(authorization=bearer_token) print(f"Active alarms: {len(alarms.alarms)}") for alarm in alarms.alarms: print(f"Alarm: {alarm.alarm_type}") print(f" Severity: {alarm.severity}") print(f" Device: {alarm.device_id}") print(f" Message: {alarm.message}") print(f" Time: {alarm.timestamp}") print("---") except ApiException as e: print(f"Failed to get alarms: {e}") # Get alarm history try: alarm_history = api.v1_alarm_history_get(authorization=bearer_token) for entry in alarm_history.history: print(f"{entry.timestamp}: {entry.alarm_type} - {entry.action}") except ApiException as e: print(f"Failed to get alarm history: {e}") ``` -------------------------------- ### Print JSON Representation of StatsmonBandwidthtrackerBwUsageBySite in Python Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/StatsmonBandwidthtrackerBwUsageBySite.md Provides an example of how to get the JSON string representation of a StatsmonBandwidthtrackerBwUsageBySite object. This is useful for logging, debugging, or sending the object's data in a JSON format. ```python from graphiant_sdk.models.statsmon_bandwidthtracker_bw_usage_by_site import StatsmonBandwidthtrackerBwUsageBySite # Assuming statsmon_bandwidthtracker_bw_usage_by_site_instance is already created # print the JSON string representation of the object print(StatsmonBandwidthtrackerBwUsageBySite.to_json()) ``` -------------------------------- ### Create V1QosCircuitProfilesGetResponse from JSON and Dict Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1QosCircuitProfilesGetResponse.md Demonstrates how to instantiate V1QosCircuitProfilesGetResponse from a JSON string or a dictionary. It also shows how to convert the object to a dictionary and back. ```python from graphiant_sdk.models.v1_qos_circuit_profiles_get_response import V1QosCircuitProfilesGetResponse # TODO update the JSON string below json_string = "{}" # create an instance of V1QosCircuitProfilesGetResponse from a JSON string v1_qos_circuit_profiles_get_response_instance = V1QosCircuitProfilesGetResponse.from_json(json_string) # print the JSON string representation of the object print(V1QosCircuitProfilesGetResponse.to_json()) # convert the object into a dict v1_qos_circuit_profiles_get_response_dict = v1_qos_circuit_profiles_get_response_instance.to_dict() # create an instance of V1QosCircuitProfilesGetResponse from a dict v1_qos_circuit_profiles_get_response_from_dict = V1QosCircuitProfilesGetResponse.from_dict(v1_qos_circuit_profiles_get_response_dict) ``` -------------------------------- ### Instantiate V1DeviceRoutingOspfv2AreaLsdbGetResponse from JSON in Python Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1DeviceRoutingOspfv2AreaLsdbGetResponse.md Demonstrates how to create an instance of V1DeviceRoutingOspfv2AreaLsdbGetResponse from a JSON string. It also shows how to convert the object to a dictionary and back. ```python from graphiant_sdk.models.v1_device_routing_ospfv2_area_lsdb_get_response import V1DeviceRoutingOspfv2AreaLsdbGetResponse # TODO update the JSON string below json = "{}" # create an instance of V1DeviceRoutingOspfv2AreaLsdbGetResponse from a JSON string v1_device_routing_ospfv2_area_lsdb_get_response_instance = V1DeviceRoutingOspfv2AreaLsdbGetResponse.from_json(json) # print the JSON string representation of the object print(V1DeviceRoutingOspfv2AreaLsdbGetResponse.to_json()) # convert the object into a dict v1_device_routing_ospfv2_area_lsdb_get_response_dict = v1_device_routing_ospfv2_area_lsdb_get_response_instance.to_dict() # create an instance of V1DeviceRoutingOspfv2AreaLsdbGetResponse from a dict v1_device_routing_ospfv2_area_lsdb_get_response_from_dict = V1DeviceRoutingOspfv2AreaLsdbGetResponse.from_dict(v1_device_routing_ospfv2_area_lsdb_get_response_dict) ``` -------------------------------- ### Convert V1TroubleshootingEnterprisePostResponseSiteSummary to JSON - Python Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1TroubleshootingEnterprisePostResponseSiteSummary.md Demonstrates how to get the JSON string representation of a V1TroubleshootingEnterprisePostResponseSiteSummary object using the `to_json` class method. This is useful for sending the object's data in a JSON format, for example, in an API request. It requires an instance of the model. ```python from graphiant_sdk.models.v1_troubleshooting_enterprise_post_response_site_summary import V1TroubleshootingEnterprisePostResponseSiteSummary # Assume v1_troubleshooting_enterprise_post_response_site_summary_instance is an existing instance # For example: json_string = "{}" v1_troubleshooting_enterprise_post_response_site_summary_instance = V1TroubleshootingEnterprisePostResponseSiteSummary.from_json(json_string) # print the JSON string representation of the object print(V1TroubleshootingEnterprisePostResponseSiteSummary.to_json()) ``` -------------------------------- ### Serialize V1GlobalLanSegmentsVrfIdDevicesGetResponseEntry to JSON (Python) Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1GlobalLanSegmentsVrfIdDevicesGetResponseEntry.md Shows how to get the JSON string representation of a V1GlobalLanSegmentsVrfIdDevicesGetResponseEntry object using the `to_json` method. This is useful for sending the object data in a JSON format, for example, in an API request body. The model contains optional fields like device_id, host_name, num_interfaces, site, and status. ```python from graphiant_sdk.models.v1_global_lan_segments_vrf_id_devices_get_response_entry import V1GlobalLanSegmentsVrfIdDevicesGetResponseEntry # Assuming v1_global_lan_segments_vrf_id_devices_get_response_entry_instance is already created # print the JSON string representation of the object print(V1GlobalLanSegmentsVrfIdDevicesGetResponseEntry.to_json()) ``` -------------------------------- ### Python: Create V1OnboardingCloudinitGetResponse from JSON Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1OnboardingCloudinitGetResponse.md Demonstrates how to create an instance of V1OnboardingCloudinitGetResponse from a JSON string using the `from_json` class method. It also shows how to convert the object to a dictionary and back. ```python from graphiant_sdk.models.v1_onboarding_cloudinit_get_response import V1OnboardingCloudinitGetResponse # TODO update the JSON string below json = "{}" # create an instance of V1OnboardingCloudinitGetResponse from a JSON string v1_onboarding_cloudinit_get_response_instance = V1OnboardingCloudinitGetResponse.from_json(json) # print the JSON string representation of the object print(V1OnboardingCloudinitGetResponse.to_json()) # convert the object into a dict v1_onboarding_cloudinit_get_response_dict = v1_onboarding_cloudinit_get_response_instance.to_dict() # create an instance of V1OnboardingCloudinitGetResponse from a dict v1_onboarding_cloudinit_get_response_from_dict = V1OnboardingCloudinitGetResponse.from_dict(v1_onboarding_cloudinit_get_response_dict) ``` -------------------------------- ### Create OnboardingPrivateGcsDetails from JSON and Dict (Python) Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/OnboardingPrivateGcsDetails.md Demonstrates how to instantiate the OnboardingPrivateGcsDetails model from a JSON string or a Python dictionary. It also shows how to convert the model instance back into a JSON string or a dictionary. This is useful for data serialization and deserialization. ```python from graphiant_sdk.models.onboarding_private_gcs_details import OnboardingPrivateGcsDetails # TODO update the JSON string below json_string = "{}" # create an instance of OnboardingPrivateGcsDetails from a JSON string onboarding_private_gcs_details_instance = OnboardingPrivateGcsDetails.from_json(json_string) # print the JSON string representation of the object print(OnboardingPrivateGcsDetails.to_json()) # convert the object into a dict onboarding_private_gcs_details_dict = onboarding_private_gcs_details_instance.to_dict() # create an instance of OnboardingPrivateGcsDetails from a dict onboarding_private_gcs_details_from_dict = OnboardingPrivateGcsDetails.from_dict(onboarding_private_gcs_details_dict) ``` -------------------------------- ### ManaV2NullableOspfDeadIntervalValue Usage Example Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/ManaV2NullableOspfDeadIntervalValue.md Provides examples of how to use the ManaV2NullableOspfDeadIntervalValue model, including instantiation from JSON and dictionary, and conversion between formats. ```APIDOC ## ManaV2NullableOspfDeadIntervalValue Usage Example ### Description Provides examples of how to use the ManaV2NullableOspfDeadIntervalValue model, including instantiation from JSON and dictionary, and conversion between formats. ### Code Example ```python from graphiant_sdk.models.mana_v2_nullable_ospf_dead_interval_value import ManaV2NullableOspfDeadIntervalValue # TODO update the JSON string below json_string = "{}" # Create an instance of ManaV2NullableOspfDeadIntervalValue from a JSON string mana_v2_nullable_ospf_dead_interval_value_instance = ManaV2NullableOspfDeadIntervalValue.from_json(json_string) # Print the JSON string representation of the object print(ManaV2NullableOspfDeadIntervalValue.to_json()) # Convert the object into a dict mana_v2_nullable_ospf_dead_interval_value_dict = mana_v2_nullable_ospf_dead_interval_value_instance.to_dict() # Create an instance of ManaV2NullableOspfDeadIntervalValue from a dict mana_v2_nullable_ospf_dead_interval_value_from_dict = ManaV2NullableOspfDeadIntervalValue.from_dict(mana_v2_nullable_ospf_dead_interval_value_dict) ``` ``` -------------------------------- ### Install Graphiant SDK Python Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/README.md Installs the graphiant-sdk package from PyPI using pip. This is the first step to using the Graphiant SDK in your Python projects. ```bash pip install graphiant-sdk ``` -------------------------------- ### Create and Convert OnboardingInventory Instance (Python) Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/OnboardingInventory.md Demonstrates how to create an OnboardingInventory instance from a JSON string and a dictionary. It also shows how to convert the instance back to a JSON string and a dictionary. This functionality is useful for data serialization and deserialization. ```python from graphiant_sdk.models.onboarding_inventory import OnboardingInventory # TODO update the JSON string below json = "{}" # create an instance of OnboardingInventory from a JSON string onboarding_inventory_instance = OnboardingInventory.from_json(json) # print the JSON string representation of the object print(OnboardingInventory.to_json()) # convert the object into a dict onboarding_inventory_dict = onboarding_inventory_instance.to_dict() # create an instance of OnboardingInventory from a dict onboarding_inventory_from_dict = OnboardingInventory.from_dict(onboarding_inventory_dict) ``` -------------------------------- ### Instantiate ManaV2IPsecBgpRouteConfig from JSON and Dict (Python) Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/ManaV2IPsecBgpRouteConfig.md Demonstrates how to create an instance of ManaV2IPsecBgpRouteConfig from a JSON string or a Python dictionary. It also shows how to convert an existing instance back into a dictionary or a JSON string. ```python from graphiant_sdk.models.mana_v2_i_psec_bgp_route_config import ManaV2IPsecBgpRouteConfig # TODO update the JSON string below json_string = "{}" # create an instance of ManaV2IPsecBgpRouteConfig from a JSON string mana_v2_i_psec_bgp_route_config_instance = ManaV2IPsecBgpRouteConfig.from_json(json_string) # print the JSON string representation of the object print(ManaV2IPsecBgpRouteConfig.to_json()) # convert the object into a dict mana_v2_i_psec_bgp_route_config_dict = mana_v2_i_psec_bgp_route_config_instance.to_dict() # create an instance of ManaV2IPsecBgpRouteConfig from a dict mana_v2_i_psec_bgp_route_config_from_dict = ManaV2IPsecBgpRouteConfig.from_dict(mana_v2_i_psec_bgp_route_config_dict) ``` -------------------------------- ### Install and Run pip-audit Dependency Scanner (Bash) Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/SECURITY.md These bash commands show how to install pip-audit, audit project dependencies for vulnerabilities, and generate a requirements file with vulnerability descriptions. ```bash # Install pip install pip-audit # Audit dependencies pip-audit # Generate requirements file pip-audit --desc -r requirements.txt ``` -------------------------------- ### Scan Dependencies for Vulnerabilities with Safety (Bash) Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/SECURITY.md Demonstrates how to install the `safety` tool and use it to check installed Python packages against a database of known vulnerabilities. This is essential for dependency security. ```bash pip install safety safety check ``` -------------------------------- ### Instantiate V1DevicesSummaryGetResponseSiteSummary from JSON (Python) Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1DevicesSummaryGetResponseSiteSummary.md Demonstrates how to create an instance of V1DevicesSummaryGetResponseSiteSummary from a JSON string using the `from_json` method. It also shows how to convert the object to a dictionary and back using `to_dict` and `from_dict`. ```python from graphiant_sdk.models.v1_devices_summary_get_response_site_summary import V1DevicesSummaryGetResponseSiteSummary # TODO update the JSON string below json = "{}" # create an instance of V1DevicesSummaryGetResponseSiteSummary from a JSON string v1_devices_summary_get_response_site_summary_instance = V1DevicesSummaryGetResponseSiteSummary.from_json(json) # print the JSON string representation of the object print(V1DevicesSummaryGetResponseSiteSummary.to_json()) # convert the object into a dict v1_devices_summary_get_response_site_summary_dict = v1_devices_summary_get_response_site_summary_instance.to_dict() # create an instance of V1DevicesSummaryGetResponseSiteSummary from a dict v1_devices_summary_get_response_site_summary_from_dict = V1DevicesSummaryGetResponseSiteSummary.from_dict(v1_devices_summary_get_response_site_summary_dict) ``` -------------------------------- ### Create and Convert OnboardingCloudInitConfiguration in Python Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/OnboardingCloudInitConfiguration.md Demonstrates how to create an instance of OnboardingCloudInitConfiguration from a JSON string and a dictionary. It also shows how to convert the instance back to JSON and a dictionary. This functionality is crucial for data serialization and deserialization when interacting with the Graphiant API. ```python from graphiant_sdk.models.onboarding_cloud_init_configuration import OnboardingCloudInitConfiguration # TODO update the JSON string below json_string = "{}" # create an instance of OnboardingCloudInitConfiguration from a JSON string onboarding_cloud_init_configuration_instance = OnboardingCloudInitConfiguration.from_json(json_string) # print the JSON string representation of the object print(OnboardingCloudInitConfiguration.to_json()) # convert the object into a dict onboarding_cloud_init_configuration_dict = onboarding_cloud_init_configuration_instance.to_dict() # create an instance of OnboardingCloudInitConfiguration from a dict onboarding_cloud_init_configuration_from_dict = OnboardingCloudInitConfiguration.from_dict(onboarding_cloud_init_configuration_dict) ``` -------------------------------- ### Install and Run Bandit Security Linter (Bash) Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/SECURITY.md These bash commands show how to install the Bandit security linter using pip, run a security scan on the 'graphiant_sdk/' directory, and generate an HTML report. ```bash # Install pip install bandit # Run security scan bandit -r graphiant_sdk/ # Generate HTML report bandit -r graphiant_sdk/ -f html -o bandit-report.html ``` -------------------------------- ### Get JSON string representation of V2ExtranetConsumersUsageTopPostResponse in Python Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V2ExtranetConsumersUsageTopPostResponse.md Demonstrates how to get the JSON string representation of a V2ExtranetConsumersUsageTopPostResponse object. This is useful for logging, debugging, or sending the object's data as a JSON payload. Requires an instance of the model. ```python from graphiant_sdk.models.v2_extranet_consumers_usage_top_post_response import V2ExtranetConsumersUsageTopPostResponse # Assume v2_extranet_consumers_usage_top_post_response_instance is already created # For example: json_string = "{}" v2_extranet_consumers_usage_top_post_response_instance = V2ExtranetConsumersUsageTopPostResponse.from_json(json_string) # print the JSON string representation of the object print(V2ExtranetConsumersUsageTopPostResponse.to_json()) ``` -------------------------------- ### Instantiate V1DeviceRoutingVrfBgpRouteCountPostRequest from JSON and Dict in Python Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1DeviceRoutingVrfBgpRouteCountPostRequest.md Demonstrates how to create an instance of V1DeviceRoutingVrfBgpRouteCountPostRequest from a JSON string or a dictionary. It also shows how to convert the object back to JSON and a dictionary. ```python from graphiant_sdk.models.v1_device_routing_vrf_bgp_route_count_post_request import V1DeviceRoutingVrfBgpRouteCountPostRequest # TODO update the JSON string below json_string = "{}" # create an instance of V1DeviceRoutingVrfBgpRouteCountPostRequest from a JSON string v1_device_routing_vrf_bgp_route_count_post_request_instance = V1DeviceRoutingVrfBgpRouteCountPostRequest.from_json(json_string) # print the JSON string representation of the object print(V1DeviceRoutingVrfBgpRouteCountPostRequest.to_json()) # convert the object into a dict v1_device_routing_vrf_bgp_route_count_post_request_dict = v1_device_routing_vrf_bgp_route_count_post_request_instance.to_dict() # create an instance of V1DeviceRoutingVrfBgpRouteCountPostRequest from a dict v1_device_routing_vrf_bgp_route_count_post_request_from_dict = V1DeviceRoutingVrfBgpRouteCountPostRequest.from_dict(v1_device_routing_vrf_bgp_route_count_post_request_dict) ``` -------------------------------- ### Install and Run Safety Dependency Vulnerability Scanner (Bash) Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/SECURITY.md These bash commands illustrate how to install the Safety dependency vulnerability scanner using pip, check current project dependencies, and scan dependencies listed in a requirements file. ```bash # Install pip install safety # Check dependencies safety check # Check with requirements file safety check -r requirements.txt ``` -------------------------------- ### Instantiate V1DevicesSummaryGetResponseSiteSummaryDeviceSummary from JSON (Python) Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1DevicesSummaryGetResponseSiteSummaryDeviceSummary.md Demonstrates how to create an instance of V1DevicesSummaryGetResponseSiteSummaryDeviceSummary from a JSON string using the `from_json` method. It also shows how to convert the object back to a dictionary and instantiate from a dictionary. ```python from graphiant_sdk.models.v1_devices_summary_get_response_site_summary_device_summary import V1DevicesSummaryGetResponseSiteSummaryDeviceSummary # TODO update the JSON string below json = "{}" # create an instance of V1DevicesSummaryGetResponseSiteSummaryDeviceSummary from a JSON string v1_devices_summary_get_response_site_summary_device_summary_instance = V1DevicesSummaryGetResponseSiteSummaryDeviceSummary.from_json(json) # print the JSON string representation of the object print(V1DevicesSummaryGetResponseSiteSummaryDeviceSummary.to_json()) # convert the object into a dict v1_devices_summary_get_response_site_summary_device_summary_dict = v1_devices_summary_get_response_site_summary_device_summary_instance.to_dict() # create an instance of V1DevicesSummaryGetResponseSiteSummaryDeviceSummary from a dict v1_devices_summary_get_response_site_summary_device_summary_from_dict = V1DevicesSummaryGetResponseSiteSummaryDeviceSummary.from_dict(v1_devices_summary_get_response_site_summary_device_summary_dict) ``` -------------------------------- ### Instantiate ManaV2OspFv2Process from JSON and Dict (Python) Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/ManaV2OspFv2Process.md Demonstrates how to create an instance of ManaV2OspFv2Process from a JSON string or a dictionary. It also shows how to convert an existing instance back into a dictionary or a JSON string. ```python from graphiant_sdk.models.mana_v2_osp_fv2_process import ManaV2OspFv2Process # TODO update the JSON string below json_string = "{}" # create an instance of ManaV2OspFv2Process from a JSON string mana_v2_osp_fv2_process_instance = ManaV2OspFv2Process.from_json(json_string) # print the JSON string representation of the object print(ManaV2OspFv2Process.to_json()) # convert the object into a dict mana_v2_osp_fv2_process_dict = mana_v2_osp_fv2_process_instance.to_dict() # create an instance of ManaV2OspFv2Process from a dict mana_v2_osp_fv2_process_from_dict = ManaV2OspFv2Process.from_dict(mana_v2_osp_fv2_process_dict) ``` -------------------------------- ### V1ExtranetsB2bPeeringMatchServiceToCustomerIdGetResponse Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1ExtranetsB2bPeeringMatchServiceToCustomerIdGetResponse.md Details about the V1ExtranetsB2bPeeringMatchServiceToCustomerIdGetResponse model, including its properties and usage examples. ```APIDOC ## V1ExtranetsB2bPeeringMatchServiceToCustomerIdGetResponse ### Description This model represents the response for getting B2B peering match service to customer details. ### Properties #### customer_name - **Type**: string - **Description**: The name of the customer. - **Notes**: [optional] #### match_details - **Type**: ManaV2B2bExtranetMatchServiceToCustomer - **Description**: Detailed information about the match. - **Notes**: [optional] #### match_id - **Type**: integer - **Description**: The unique identifier for the match. - **Notes**: [optional] #### service_name - **Type**: string - **Description**: The name of the service. - **Notes**: [optional] #### status - **Type**: string - **Description**: The status of the match. - **Notes**: [optional] ### Request Example ```json { "customer_name": "example_customer", "match_details": {}, "match_id": 123, "service_name": "example_service", "status": "active" } ``` ### Response #### Success Response (200) - **customer_name** (string) - The name of the customer. - **match_details** (ManaV2B2bExtranetMatchServiceToCustomer) - Detailed information about the match. - **match_id** (integer) - The unique identifier for the match. - **service_name** (string) - The name of the service. - **status** (string) - The status of the match. #### Response Example ```json { "customer_name": "example_customer", "match_details": {}, "match_id": 123, "service_name": "example_service", "status": "active" } ``` ``` -------------------------------- ### Instantiate V1DevicesGetResponse from JSON and Dictionary (Python) Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1DevicesGetResponse.md Demonstrates how to create an instance of V1DevicesGetResponse from a JSON string and a Python dictionary. It also shows how to convert the object back to a JSON string and a dictionary. This functionality is useful for data serialization and deserialization when interacting with APIs. ```python from graphiant_sdk.models.v1_devices_get_response import V1DevicesGetResponse # TODO update the JSON string below json_string = "{}" # create an instance of V1DevicesGetResponse from a JSON string v1_devices_get_response_instance = V1DevicesGetResponse.from_json(json_string) # print the JSON string representation of the object print(V1DevicesGetResponse.to_json()) # convert the object into a dict v1_devices_get_response_dict = v1_devices_get_response_instance.to_dict() # create an instance of V1DevicesGetResponse from a dict v1_devices_get_response_from_dict = V1DevicesGetResponse.from_dict(v1_devices_get_response_dict) ``` -------------------------------- ### V1DeviceRoutingOspfv3AreaidGetResponse Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1DeviceRoutingOspfv3AreaidGetResponse.md Details of the V1DeviceRoutingOspfv3AreaidGetResponse model, including its properties and usage examples. ```APIDOC ## V1DeviceRoutingOspfv3AreaidGetResponse ### Description Represents the response object for retrieving OSPFv3 Area ID information. ### Method N/A (This is a response model, not an endpoint) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "areas": [ "string" ], "page_info": { "next_page_token": "string", "total_count": 0 }, "token": "string" } ``` ### Response #### Success Response (200) - **areas** (List[str]) - List of OSPFv3 areas. [optional] - **page_info** (CommonPageInfo) - Pagination information. [optional] - **token** (str) - Reference to the resultset being queried, this should be sent by the service as part of a previous request and so can be opaque to the client. [optional] #### Response Example ```json { "areas": [ "0", "65535" ], "page_info": { "next_page_token": "abc123xyz", "total_count": 2 }, "token": "opaque-token-string" } ``` ``` -------------------------------- ### V1DeviceRoutingBgpNbrsPerAfiPrefixGetResponse Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1DeviceRoutingBgpNbrsPerAfiPrefixGetResponse.md Details about the V1DeviceRoutingBgpNbrsPerAfiPrefixGetResponse model, including its properties and usage examples. ```APIDOC ## V1DeviceRoutingBgpNbrsPerAfiPrefixGetResponse ### Description This model represents the response structure for an API call that retrieves BGP neighbor information, categorized by Address Family Identifier (AFI) and specific prefixes. ### Method GET (Implied by the response structure, actual HTTP method depends on the specific API endpoint) ### Endpoint (Not specified in the provided text, depends on the API implementation) ### Parameters #### Path Parameters None specified. #### Query Parameters None specified. #### Request Body None specified. ### Request Example ```python # This is a conceptual example based on the model definition. # Actual request would depend on the API endpoint. from graphiant_sdk.models.v1_device_routing_bgp_nbrs_per_afi_prefix_get_response import V1DeviceRoutingBgpNbrsPerAfiPrefixGetResponse # Assuming a JSON payload is received from an API call json_payload = "{}" # Replace with actual JSON data v1_device_routing_bgp_nbrs_per_afi_prefix_get_response_instance = V1DeviceRoutingBgpNbrsPerAfiPrefixGetResponse.from_json(json_payload) ``` ### Response #### Success Response (200) - **prefixes** (List[Routingprefix]) - A list of routing prefixes, where each item contains details about BGP neighbors associated with that prefix. This field is optional. #### Response Example ```json { "prefixes": [ { "prefix": "192.168.1.0/24", "afi": "ipv4", "neighbors": [ { "ip_address": "10.0.0.1", "remote_as": 65001, "state": "Established" } ] } ] } ``` ``` -------------------------------- ### Create OnboardingInterface from JSON and Dict - Python Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/OnboardingInterface.md Demonstrates how to create an OnboardingInterface instance from a JSON string or a dictionary. It also shows how to convert the object back to JSON and a dictionary. ```python from graphiant_sdk.models.onboarding_interface import OnboardingInterface # TODO update the JSON string below json = "{}" # create an instance of OnboardingInterface from a JSON string onboarding_interface_instance = OnboardingInterface.from_json(json) # print the JSON string representation of the object print(OnboardingInterface.to_json()) # convert the object into a dict onboarding_interface_dict = onboarding_interface_instance.to_dict() # create an instance of OnboardingInterface from a dict onboarding_interface_from_dict = OnboardingInterface.from_dict(onboarding_interface_dict) ``` -------------------------------- ### Instantiate V1DeviceRoutingOspfv2AreaNbrGetResponse from JSON in Python Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1DeviceRoutingOspfv2AreaNbrGetResponse.md Demonstrates how to create an instance of V1DeviceRoutingOspfv2AreaNbrGetResponse from a JSON string using the `from_json` method. It also shows how to convert the object back to a dictionary and instantiate from a dictionary. ```python from graphiant_sdk.models.v1_device_routing_ospfv2_area_nbr_get_response import V1DeviceRoutingOspfv2AreaNbrGetResponse # TODO update the JSON string below json_string = "{}" # create an instance of V1DeviceRoutingOspfv2AreaNbrGetResponse from a JSON string v1_device_routing_ospfv2_area_nbr_get_response_instance = V1DeviceRoutingOspfv2AreaNbrGetResponse.from_json(json_string) # print the JSON string representation of the object print(V1DeviceRoutingOspfv2AreaNbrGetResponse.to_json()) # convert the object into a dict v1_device_routing_ospfv2_area_nbr_get_response_dict = v1_device_routing_ospfv2_area_nbr_get_response_instance.to_dict() # create an instance of V1DeviceRoutingOspfv2AreaNbrGetResponse from a dict v1_device_routing_ospfv2_area_nbr_get_response_from_dict = V1DeviceRoutingOspfv2AreaNbrGetResponse.from_dict(v1_device_routing_ospfv2_area_nbr_get_response_dict) ``` -------------------------------- ### StatsmonV2CircuitIncidentsDataSampleIncidents Model Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/StatsmonV2CircuitIncidentsDataSampleIncidents.md Details the properties and provides examples for the StatsmonV2CircuitIncidentsDataSampleIncidents model. ```APIDOC ## StatsmonV2CircuitIncidentsDataSampleIncidents Model ### Description Represents a data sample for circuit incidents in StatsmonV2, containing counts of fair and poor incidents. ### Properties #### Path Parameters None #### Query Parameters None #### Request Body - **num_fair_incidents** (int) - Optional - The number of fair incidents. - **num_poor_incidents** (int) - Optional - The number of poor incidents. ### Request Example ```json { "num_fair_incidents": 10, "num_poor_incidents": 5 } ``` ### Response #### Success Response (200) - **num_fair_incidents** (int) - The number of fair incidents. - **num_poor_incidents** (int) - The number of poor incidents. #### Response Example ```json { "num_fair_incidents": 10, "num_poor_incidents": 5 } ``` ### Usage Example (Python SDK) ```python from graphiant_sdk.models.statsmon_v2_circuit_incidents_data_sample_incidents import StatsmonV2CircuitIncidentsDataSampleIncidents # Example of creating an instance from a JSON string json_data = "{\"num_fair_incidents\": 10, \"num_poor_incidents\": 5}" statsmon_instance = StatsmonV2CircuitIncidentsDataSampleIncidents.from_json(json_data) # Example of converting to a dictionary statsmon_dict = statsmon_instance.to_dict() print(statsmon_dict) # Example of converting back from a dictionary statsmon_from_dict = StatsmonV2CircuitIncidentsDataSampleIncidents.from_dict(statsmon_dict) print(statsmon_from_dict.to_json()) ``` ``` -------------------------------- ### Get JSON string representation of V1DevicesDeviceIdVrfProtocolsGetRequest in Python Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1DevicesDeviceIdVrfProtocolsGetRequest.md Demonstrates how to get the JSON string representation of a V1DevicesDeviceIdVrfProtocolsGetRequest object. This is useful for logging, debugging, or sending the object's data as a JSON payload. The `to_json()` class method is used, which returns the JSON representation of the model. ```python from graphiant_sdk.models.v1_devices_device_id_vrf_protocols_get_request import V1DevicesDeviceIdVrfProtocolsGetRequest # Assuming v1_devices_device_id_vrf_protocols_get_request_instance is an existing object json_string = "{}" v1_devices_device_id_vrf_protocols_get_request_instance = V1DevicesDeviceIdVrfProtocolsGetRequest.from_json(json_string) # print the JSON string representation of the object print(V1DevicesDeviceIdVrfProtocolsGetRequest.to_json()) ``` -------------------------------- ### Create OnboardingPrivateGcsInventoryDetails from JSON and Dict (Python) Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/OnboardingPrivateGcsInventoryDetails.md Demonstrates how to instantiate an OnboardingPrivateGcsInventoryDetails object from a JSON string or a Python dictionary. It also shows how to convert the object back into its JSON string or dictionary representation. This is useful for data serialization and deserialization. ```python from graphiant_sdk.models.onboarding_private_gcs_inventory_details import OnboardingPrivateGcsInventoryDetails # TODO update the JSON string below json_string = "{}" # create an instance of OnboardingPrivateGcsInventoryDetails from a JSON string onboarding_private_gcs_inventory_details_instance = OnboardingPrivateGcsInventoryDetails.from_json(json_string) # print the JSON string representation of the object print(OnboardingPrivateGcsInventoryDetails.to_json()) # convert the object into a dict onboarding_private_gcs_inventory_details_dict = onboarding_private_gcs_inventory_details_instance.to_dict() # create an instance of OnboardingPrivateGcsInventoryDetails from a dict onboarding_private_gcs_inventory_details_from_dict = OnboardingPrivateGcsInventoryDetails.from_dict(onboarding_private_gcs_inventory_details_dict) ``` -------------------------------- ### V1TroubleshootingTopSitesByAlertsPostRequest Model Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1TroubleshootingTopSitesByAlertsPostRequest.md Details about the V1TroubleshootingTopSitesByAlertsPostRequest model, including its properties and usage examples. ```APIDOC ## V1TroubleshootingTopSitesByAlertsPostRequest ### Description Represents the request body for the V1TroubleshootingTopSitesByAlerts endpoint. It allows filtering troubleshooting data by alerts. ### Properties #### Request Body - **filter** (StatsmonTroubleshootingFilter) - Optional - Used to filter the troubleshooting data by alerts. ### Request Example ```python from graphiant_sdk.models.v1_troubleshooting_top_sites_by_alerts_post_request import V1TroubleshootingTopSitesByAlertsPostRequest # Assuming StatsmonTroubleshootingFilter is defined elsewhere # filter_data = StatsmonTroubleshootingFilter(...) # Create an instance of V1TroubleshootingTopSitesByAlertsPostRequest request_body = V1TroubleshootingTopSitesByAlertsPostRequest(filter=filter_data) # Convert to dictionary request_dict = request_body.to_dict() # Convert to JSON string request_json = V1TroubleshootingTopSitesByAlertsPostRequest.to_json(request_body) print(request_json) ``` ### Response This model defines the structure of the request body and does not have a direct success response associated with it. The response would be from the API endpoint that consumes this request body. ``` -------------------------------- ### Instantiate V1SitesGetResponse from JSON and Dict in Python Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1SitesGetResponse.md Demonstrates how to create an instance of V1SitesGetResponse from a JSON string or a dictionary. It also shows how to convert the object back into a JSON string or a dictionary. This functionality is useful for data serialization and deserialization. ```python from graphiant_sdk.models.v1_sites_get_response import V1SitesGetResponse # TODO update the JSON string below json_string = "{}" # create an instance of V1SitesGetResponse from a JSON string v1_sites_get_response_instance = V1SitesGetResponse.from_json(json_string) # print the JSON string representation of the object print(V1SitesGetResponse.to_json()) # convert the object into a dict v1_sites_get_response_dict = v1_sites_get_response_instance.to_dict() # create an instance of V1SitesGetResponse from a dict v1_sites_get_response_from_dict = V1SitesGetResponse.from_dict(v1_sites_get_response_dict) ``` -------------------------------- ### Instantiate V1DeviceSnapshotDeviceIdGetResponse from JSON and Dictionary Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1DeviceSnapshotDeviceIdGetResponse.md Demonstrates how to create an instance of V1DeviceSnapshotDeviceIdGetResponse from a JSON string or a Python dictionary. It also shows how to convert an instance back into a dictionary or JSON string. ```python from graphiant_sdk.models.v1_device_snapshot_device_id_get_response import V1DeviceSnapshotDeviceIdGetResponse # TODO update the JSON string below json_string = "{}" # create an instance of V1DeviceSnapshotDeviceIdGetResponse from a JSON string v1_device_snapshot_device_id_get_response_instance = V1DeviceSnapshotDeviceIdGetResponse.from_json(json_string) # print the JSON string representation of the object print(V1DeviceSnapshotDeviceIdGetResponse.to_json()) # convert the object into a dict v1_device_snapshot_device_id_get_response_dict = v1_device_snapshot_device_id_get_response_instance.to_dict() # create an instance of V1DeviceSnapshotDeviceIdGetResponse from a dict v1_device_snapshot_device_id_get_response_from_dict = V1DeviceSnapshotDeviceIdGetResponse.from_dict(v1_device_snapshot_device_id_get_response_dict) ``` -------------------------------- ### V1SiteIdDetailsInterfacesGetResponse Model Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1SiteIdDetailsInterfacesGetResponse.md Details about the V1SiteIdDetailsInterfacesGetResponse model, including its properties and usage examples. ```APIDOC ## V1SiteIdDetailsInterfacesGetResponse Model ### Description This model represents the response for retrieving site ID details and interfaces. ### Properties #### interfaces (List[str]) - Optional - A list of interface names associated with the site. ### Request Example ```python from graphiant_sdk.models.v1_site_id_details_interfaces_get_response import V1SiteIdDetailsInterfacesGetResponse # TODO update the JSON string below json_string = "{}" # create an instance of V1SiteIdDetailsInterfacesGetResponse from a JSON string v1_site_id_details_interfaces_get_response_instance = V1SiteIdDetailsInterfacesGetResponse.from_json(json_string) ``` ### Response Example ```json { "interfaces": [ "interface1", "interface2" ] } ``` ### Usage Examples ```python from graphiant_sdk.models.v1_site_id_details_interfaces_get_response import V1SiteIdDetailsInterfacesGetResponse # TODO update the JSON string below json = "{}" # create an instance of V1SiteIdDetailsInterfacesGetResponse from a JSON string v1_site_id_details_interfaces_get_response_instance = V1SiteIdDetailsInterfacesGetResponse.from_json(json) # print the JSON string representation of the object print(V1SiteIdDetailsInterfacesGetResponse.to_json()) # convert the object into a dict v1_site_id_details_interfaces_get_response_dict = v1_site_id_details_interfaces_get_response_instance.to_dict() # create an instance of V1SiteIdDetailsInterfacesGetResponse from a dict v1_site_id_details_interfaces_get_response_from_dict = V1SiteIdDetailsInterfacesGetResponse.from_dict(v1_site_id_details_interfaces_get_response_dict) ``` ``` -------------------------------- ### Instantiate V1DevicesDeviceIdCandidateCircuitsGetResponseCircuitInfo from JSON (Python) Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1DevicesDeviceIdCandidateCircuitsGetResponseCircuitInfo.md Demonstrates how to create an instance of the V1DevicesDeviceIdCandidateCircuitsGetResponseCircuitInfo model from a JSON string. It also shows how to convert the object to a JSON string and a dictionary, and how to create an instance from a dictionary. ```python from graphiant_sdk.models.v1_devices_device_id_candidate_circuits_get_response_circuit_info import V1DevicesDeviceIdCandidateCircuitsGetResponseCircuitInfo # TODO update the JSON string below json_string = "{}" # create an instance of V1DevicesDeviceIdCandidateCircuitsGetResponseCircuitInfo from a JSON string v1_devices_device_id_candidate_circuits_get_response_circuit_info_instance = V1DevicesDeviceIdCandidateCircuitsGetResponseCircuitInfo.from_json(json_string) # print the JSON string representation of the object print(V1DevicesDeviceIdCandidateCircuitsGetResponseCircuitInfo.to_json()) # convert the object into a dict v1_devices_device_id_candidate_circuits_get_response_circuit_info_dict = v1_devices_device_id_candidate_circuits_get_response_circuit_info_instance.to_dict() # create an instance of V1DevicesDeviceIdCandidateCircuitsGetResponseCircuitInfo from a dict v1_devices_device_id_candidate_circuits_get_response_circuit_info_from_dict = V1DevicesDeviceIdCandidateCircuitsGetResponseCircuitInfo.from_dict(v1_devices_device_id_candidate_circuits_get_response_circuit_info_dict) ``` -------------------------------- ### V1PolicyRouteTagSetsTagsSummaryGetResponse Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1PolicyRouteTagSetsTagsSummaryGetResponse.md Details about the V1PolicyRouteTagSetsTagsSummaryGetResponse model, including its properties and usage examples. ```APIDOC ## V1PolicyRouteTagSetsTagsSummaryGetResponse ### Description Represents the response object for retrieving a summary of route tag sets. It contains a list of route tag summaries. ### Properties #### tags (List[ManaV2RouteTagSummary]) - Optional - A list of `ManaV2RouteTagSummary` objects, providing details for each route tag. ### Request Example ```python from graphiant_sdk.models.v1_policy_route_tag_sets_tags_summary_get_response import V1PolicyRouteTagSetsTagsSummaryGetResponse # TODO update the JSON string below json_string = "{}" # create an instance of V1PolicyRouteTagSetsTagsSummaryGetResponse from a JSON string response_instance = V1PolicyRouteTagSetsTagsSummaryGetResponse.from_json(json_string) # print the JSON string representation of the object print(V1PolicyRouteTagSetsTagsSummaryGetResponse.to_json()) # convert the object into a dict response_dict = response_instance.to_dict() # create an instance of V1PolicyRouteTagSetsTagsSummaryGetResponse from a dict response_from_dict = V1PolicyRouteTagSetsTagsSummaryGetResponse.from_dict(response_dict) ``` ### Response #### Success Response (200) - **tags** (List[ManaV2RouteTagSummary]) - A list of route tag summaries. #### Response Example ```json { "tags": [ { "tag_id": "string", "tag_name": "string" } ] } ``` ``` -------------------------------- ### Instantiate V1SoftwareRunningSummaryGetResponseVersionSummary from JSON in Python Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1SoftwareRunningSummaryGetResponseVersionSummary.md Demonstrates how to create an instance of V1SoftwareRunningSummaryGetResponseVersionSummary by parsing a JSON string. Requires the graphiant_sdk.models.v1_software_running_summary_get_response_version_summary module. ```python from graphiant_sdk.models.v1_software_running_summary_get_response_version_summary import V1SoftwareRunningSummaryGetResponseVersionSummary # TODO update the JSON string below json = "{}" # create an instance of V1SoftwareRunningSummaryGetResponseVersionSummary from a JSON string v1_software_running_summary_get_response_version_summary_instance = V1SoftwareRunningSummaryGetResponseVersionSummary.from_json(json) ``` -------------------------------- ### V1MonitoringCircuitsSummaryPostRequest Model Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/V1MonitoringCircuitsSummaryPostRequest.md Documentation for the V1MonitoringCircuitsSummaryPostRequest model, including its properties and usage examples. ```APIDOC ## V1MonitoringCircuitsSummaryPostRequest ### Description Represents a request object for retrieving a summary of monitoring circuits. ### Properties #### Path Parameters None #### Query Parameters None #### Request Body - **device_id** (int) - Optional - The ID of the device. - **time_window** (StatsmonTimeWindow) - Optional - The time window for the statistics. ### Request Example ```json { "device_id": 123, "time_window": { "start_time": "2023-01-01T00:00:00Z", "end_time": "2023-01-01T01:00:00Z" } } ``` ### Response #### Success Response (200) This model does not define a success response. It is a request model. #### Response Example N/A ``` -------------------------------- ### Create OnboardingCloudInitToken from JSON and Dictionary (Python) Source: https://github.com/graphiant-inc/graphiant-sdk-python/blob/main/docs/OnboardingCloudInitToken.md Demonstrates how to create an instance of the OnboardingCloudInitToken model from a JSON string or a Python dictionary. It also shows how to convert the object back into its JSON string or dictionary representation. This functionality is useful for data serialization and deserialization when interacting with APIs or storing object states. ```python from graphiant_sdk.models.onboarding_cloud_init_token import OnboardingCloudInitToken # TODO update the JSON string below json_string = "{}" # create an instance of OnboardingCloudInitToken from a JSON string onboarding_cloud_init_token_instance = OnboardingCloudInitToken.from_json(json_string) # print the JSON string representation of the object print(OnboardingCloudInitToken.to_json()) # convert the object into a dict onboarding_cloud_init_token_dict = onboarding_cloud_init_token_instance.to_dict() # create an instance of OnboardingCloudInitToken from a dict onboarding_cloud_init_token_from_dict = OnboardingCloudInitToken.from_dict(onboarding_cloud_init_token_dict) ```