API Details

CiscoSupportAPI

The CiscoSupportAPI class creates “session objects” for wrapping support APIs. Each support API endpoint is available to an instance of the ciscosupportsdk.

from ciscosupportsdk.api import CiscoSupportAPI

cs = CiscoSupportAPI(CS_API_KEY, CS_API_SECRET)
class ciscosupportsdk.api.CiscoSupportAPI(client_id: str, client_secret: str)

Bases: object

Cisco Support API wrapper.

Creates a session for all API calls through a CiscoSupportAPI object. The ‘session’ handles authentication and communication to the API. Each of the support APIs are added to this object in a hierarchical structure.

asd

class ciscosupportsdk.api.asd.AutomatedSoftwareDistributionApi(session: ciscosupportsdk.apisession.ApiSession)

Bases: object

Cisco Automated Software Distribution service provides software information and download URLs to assist you in upgrading your device/application to the latest version.

get_bug_details(bug_ids: list[str]) None

Returns detailed information for the specified bug ID or IDs.

Param

bug_ids: list[str]: Identifier of the bug or bugs for which to return detailed information. A maximum of five (5) bug IDs can be submitted separated by a comma.

Return type

Bug

bug

Used to makes calls to the BugApi endpoint.
>>> cs = CiscoSupportAPI(CS_API_KEY, CS_API_SECRET)
>>> cs.bug
<ciscosupportsdk.api.bug.BugApi object at 0x10451eb20>
class ciscosupportsdk.api.bug.BugApi(session: ciscosupportsdk.apisession.ApiSession)

Bases: object

Cisco defects (or bugs) are made visible to customers and partners through the use of the Bug Search Tool (BST) application. The objective of the Cisco Bug API is to provide an entry point into the Bug Search Tool for customers and partners to view bug details and perform bug searches while integrating the search results into their own interfaces and applications.

get_bug_details(bug_ids: list[str]) Iterable[ciscosupportsdk.models.bug.Bug]

Returns detailed information for the specified bug ID or IDs.

Param

bug_ids: list[str]: Identifier of the bug or bugs for which to return detailed information. A maximum of five (5) bug IDs can be submitted separated by a comma.

Return type

Bug

get_bugs_by_keyword(keyword: str, status: Optional[ciscosupportsdk.models.bug.Status] = None, modified_date: Optional[ciscosupportsdk.models.bug.DateModified] = None, severity: Optional[ciscosupportsdk.models.bug.Severity] = None, sort_by: Optional[ciscosupportsdk.models.bug.SortBy] = None) Iterable[ciscosupportsdk.models.bug.Bug]

Returns detailed information for the bugs associated with the specified keyword.

Param

keyword: str: Keyword or keywords for which to return details on associated bugs. Multiple words can be submitted

Param

status: Status: Status of the bug; only bugs with the specified status are returned.

Param

modified_date: DateModified: Last modified date of the bug; only bugs modified within the specified time are returned.

Param

severity: Severity: Severity of the bug; only bugs with the specified severity are returned.

Param

sort_by: SortBy: Parameter on which to sort the results.

Return type

ProductBug

get_bugs_by_product_and_affected_release(product_series: str, affected_releases: list[str], status: ciscosupportsdk.models.bug.Status = None, modified_date: ciscosupportsdk.models.bug.DateModified = None, severity: ciscosupportsdk.models.bug.Severity = None, sort_by: ciscosupportsdk.models.bug.SortBy = None) Iterable[ciscosupportsdk.models.bug.Bug]

Returns detailed information for the bugs associated with the specified hardware product series and affected software release or releases.

get_bugs_by_product_and_fixed_release(product_series: str, fixed_in_releases: list[str], status: ciscosupportsdk.models.bug.Status = None, modified_date: ciscosupportsdk.models.bug.DateModified = None, severity: ciscosupportsdk.models.bug.Severity = None, sort_by: ciscosupportsdk.models.bug.SortBy = None) Iterable[ciscosupportsdk.models.bug.Bug]

Returns detailed information for the bugs associated with the specified hardware product series and affected software release or releases.

get_bugs_by_product_id(base_pid: str, status: Optional[ciscosupportsdk.models.bug.Status] = None, modified_date: Optional[ciscosupportsdk.models.bug.DateModified] = None, severity: Optional[ciscosupportsdk.models.bug.Severity] = None, sort_by: Optional[ciscosupportsdk.models.bug.SortBy] = None) Iterable[ciscosupportsdk.models.bug.Bug]

Returns detailed information for the bugs associated with the specified base product ID.

Param

base_pid: str: Identifier of the base product for which to return details on associated bugs. Only one base product ID can be submitted.

Param

status: Status: Status of the bug; only bugs with the specified status are returned.

Param

modified_date: DateModified: Last modified date of the bug; only bugs modified within the specified time are returned.

Param

severity: Severity: Severity of the bug; only bugs with the specified severity are returned.

Param

sort_by: SortBy: Parameter on which to sort the results.

Return type

ProductBug

get_bugs_by_product_id_and_release(base_pid: str, software_releases: list[str], status: ciscosupportsdk.models.bug.Status = None, modified_date: ciscosupportsdk.models.bug.DateModified = None, severity: ciscosupportsdk.models.bug.Severity = None, sort_by: ciscosupportsdk.models.bug.SortBy = None) Iterable[ciscosupportsdk.models.bug.Bug]

Returns detailed information for the bugs associated with the specified base product ID.

Param

base_pid: str: Identifier of the base product for which to return details on associated bugs. Only one base product ID can be submitted.

Param

status: Status: Status of the bug; only bugs with the specified status are returned.

Param

modified_date: DateModified: Last modified date of the bug; only bugs modified within the specified time are returned.

Param

severity: Severity: Severity of the bug; only bugs with the specified severity are returned.

Param

sort_by: SortBy: Parameter on which to sort the results.

Return type

ProductBug

get_bugs_by_product_name_and_affected_release(product_name: str, affected_releases: list[str], status: ciscosupportsdk.models.bug.Status = None, modified_date: ciscosupportsdk.models.bug.DateModified = None, severity: ciscosupportsdk.models.bug.Severity = None, sort_by: ciscosupportsdk.models.bug.SortBy = None) Iterable[ciscosupportsdk.models.bug.Bug]

Returns detailed information for the bugs associated with the specified product name and affected software release or releases.

get_bugs_by_product_name_and_fixed_release(product_name: str, fixed_in_releases: list[str], status: ciscosupportsdk.models.bug.Status = None, modified_date: ciscosupportsdk.models.bug.DateModified = None, severity: ciscosupportsdk.models.bug.Severity = None, sort_by: ciscosupportsdk.models.bug.SortBy = None) Iterable[ciscosupportsdk.models.bug.Bug]

Returns detailed information for the bugs associated with the specified product name and affected software release or releases.

case

class ciscosupportsdk.api.case.CaseApi(session: ciscosupportsdk.apisession.ApiSession)

Bases: object

The Cisco Support Case API v3 provides a powerful, convenient, and simple way to interact with the Cisco Support Case Manager tool and aims to improve the partner and customer experience by enabling you to access case information instantly, programmatically, and in bulk.

get_case_details(case_id: str) ciscosupportsdk.models.case.CaseDetail

Returns detailed information for the specified case.

Param

case_id: str: Identifier of the case for which to return results.

get_case_summary(case_ids: list[str], sort_by: ciscosupportsdk.models.case.SortCaseBy = SortCaseBy.UPDATED_DATE) Iterable[ciscosupportsdk.models.case.Case]

Returns brief information for the specified case or cases.

Param

case_ids: list[str]: Identifier of the case or cases for which to return results. Multiple values must be specified within a comma-separated list and cannot exceed 30 IDs.

Param

sort_by: SortCaseBy: Order in which the results should be sorted.

get_cases_by_contract_id(contract_ids: list[str], date_created_from: str = None, date_created_to: str = None, status_flag: ciscosupportsdk.models.case.CaseStatusFlag = CaseStatusFlag.OPEN) Iterable[ciscosupportsdk.models.case.Case]

Returns summary information for cases associated with the specified contract or contracts.

Param

contract_ids: list[str]: Identifier of the user or users for which to return results. A maximum of 10 may be passed.

Param

date_created_from: str: Beginning date (in UTC) of the range in which to search. For example: 2013-04-23T11:00:14Z Note: The maximum date range currently supported is 90 days.

Param

date_created_to: str: End date (in UTC) of the range in which to search. For example: 2013-04-23T11:00:14Z Note: The maximum date range currently supported is 90 days.

Param

status_flag: CaseStatusFlag: Return only cases associated with the specified status.

get_cases_by_user_id(user_ids: list[str], date_created_from: str = None, date_created_to: str = None, status_flag: ciscosupportsdk.models.case.CaseStatusFlag = CaseStatusFlag.OPEN) Iterable[ciscosupportsdk.models.case.Case]

Returns summary information for cases associated with the specified contract or contracts.

Param

user_ids: list[str]: Identifier of the user or users for which to return results. A maximum of 10 may be passed.

Param

date_created_from: str: Beginning date (in UTC) of the range in which to search. For example: 2013-04-23T11:00:14Z Note: The maximum date range currently supported is 90 days.

Param

date_created_to: str: End date (in UTC) of the range in which to search. For example: 2013-04-23T11:00:14Z Note: The maximum date range currently supported is 90 days.

Param

status_flag: CaseStatusFlag: Return only cases associated with the specified status.

eox

class ciscosupportsdk.api.eox.EoxApi(session: ciscosupportsdk.apisession.ApiSession)

Bases: object

The Cisco EoX API provides access to Cisco End of Life product data.

Using the EoX Service API, customers and partners can request Cisco EoX product information for both hardware and software using a variety of input mechanisms.

get_by_dates(start_date: Union[str, None.datetime.date], end_date: Union[str, None.datetime.date], eox_attribs: list[ciscosupportsdk.models.eox.EoxAttrib]) Iterable[ciscosupportsdk.models.eox.EoxRecord]

Get EoX notices for all products by date.

Returns all active and inactive EoX records for all products with the specified eoxAttrib value within an inclusive date range. If you do not specify an eoxAttrib value, this method returns records with an updated time stamp within the specified date range.

Note: This method can be used to retrieve records based on any date listed in the EoX record. For example, if you specify a date range and enter EO_SALE_DATE and EO_LAST_SUPPORT_DATE as the eoxAttrib values, this method returns records with an end of sale date or last date of support within the specified date range. This feature allows you to target specific date ranges within each attribute without having to pull the entire database.

Parameters
  • start_date – Start date of the date range of records to return in the following format: YYYY-MM-DD. For example: 2010-01-01

  • end_date – End date of the date range of records to return in the following format: YYYY-MM-DD. For example: 2010-01-01

Returns

Iterable[EoxRecord]

Raises
  • EoxError, ValueError – Depending on errors with input or processing

  • the request on the server.

get_by_serial_number(serial_numbers: list[str]) Iterable[ciscosupportsdk.models.eox.EoxRecord]

Returns the EoX record for products with the specified serial numbers.

Parameters

serial_numbers – Device serial number or numbers for which to return results. You can enter up to 20 serial numbers (each with a maximum length of 40) separated by commas.

Returns

Iterable[EoxRecord]

Raises

EoxError, ValueError

get_by_software_release(software_releases: list[ciscosupportsdk.models.eox.SoftwareRelease]) Iterable[ciscosupportsdk.models.eox.EoxRecord]

Returns the EoX record for products associated with the specified software release and (optionally) the specified operating system.

Parameters

software_release – A combination of software release and operating system. Up to 20 combinations may be used and each may return multiple entires.

Returns

Iterable[EoxRecord]

Raises

EoxError, ValueError

exception ciscosupportsdk.api.eox.EoxError

Bases: Exception

Server side errors in processing the request throw an EoxError.

If you see one of these, make sure to look at the message body to see why the error occurred.

product_information

class ciscosupportsdk.api.productinformation.ProductInformationApi(session: ciscosupportsdk.apisession.ApiSession)

Bases: object

The Cisco Product Information API looks up details on products using serial numbers and product IDs.

get_info_by_product_id(product_ids: list[str]) Iterable[ciscosupportsdk.models.productinformation.ProductInformationRecord]

Returns product information associated with the specified product identifier or identifiers.

get_info_by_serial(serial_numbers: list[str]) Iterable[ciscosupportsdk.models.productinformation.ProductInformationRecord]

Returns product information associated with the specified serial ] number or numbers.

get_mdf_by_product_id(product_ids: list[str]) Iterable[ciscosupportsdk.models.productinformation.ProductMDFRecord]

Returns metadata framework (MDF) identifiers associated with the specified product identifier or identifiers.Returns metadata framework (MDF) identifiers associated with the specified product identifier or identifiers.

serial_information

class ciscosupportsdk.api.serialnumbertoinformation.SerialNumberToInformationAPI(session: ciscosupportsdk.apisession.ApiSession)

Bases: object

The Cisco Serial Number to Information API assists customers and partners in identifying an orderable PID and coverage status based on a serial number.

get_coverage_owner_status(serial_numbers: list[str]) Iterable[ciscosupportsdk.models.serialnumbertoinformation.CoverageOwnerStatus]

Returns the orderable PID for the specified device serial number.

Param

serial_numbers: list[str]: Device serial number or numbers for which to return results. You can enter up to 75 serial numbers (each with a maximum length of 40) separated by commas.

Return type

Iterable[OrderableProductList]

get_coverage_status(serial_numbers: list[str]) Iterable[ciscosupportsdk.models.serialnumbertoinformation.CoverageStatus]

Returns coverage status for a set of serial numbers.

Param

serial_numbers: list[str]: Device serial number or numbers for which to return results. You can enter up to 75 serial numbers (each with a maximum length of 40) separated by commas.

Return type

Iterable[CoverageStatus]

get_coverage_summary_by_serial(serial_numbers: list[str]) Iterable[ciscosupportsdk.models.serialnumbertoinformation.CoverageSummary]

Returns coverage status, warranty, and product identifier details for a set of serial numbers.

Param

serial_numbers: list[str]: Device serial number or numbers for which to return results. You can enter up to 75 serial numbers (each with a maximum length of 40) separated by commas.

Return type

Iterable[CoverageSummary]

get_orderable_pids(serial_numbers: list[str]) Iterable[ciscosupportsdk.models.serialnumbertoinformation.OrderableProductList]

Returns the orderable PID for the specified device serial number.

Param

serial_numbers: list[str]: Device serial number or numbers for which to return results. You can enter up to 75 serial numbers (each with a maximum length of 40) separated by commas.

Return type

Iterable[OrderableProductList]

serviceorderreturn

class ciscosupportsdk.api.serviceorderreturn.ServiceOrderReturnApi(session: ciscosupportsdk.apisession.ApiSession)

Bases: object

The Cisco Service Order Return (RMA) API provides a powerful, convenient, and simple way to interact with the Cisco RMA service and enables you to access RMA information instantly, programmatically, and in bulk.

The Cisco Service Order Return (RMA) API is stateless, externally accessible, and delivered as a REST web service, which allows you to build innovative RMA applications and portals

get_rma_details_by_rma_number(rma_number: str) Iterable[ciscosupportsdk.models.serviceorderreturn.Rma]

Returns detailed information about the specified RMA.

Param

rma_number: str: Identifier of the RMA for which to return details. Note: Currently, only one RMA Number is required and accepted. In the future, multiple RMA numbers will be supported.

Return type

Iterable[Rma]

get_rma_details_by_user_id(user_id: str, from_date: Optional[str] = None, to_date: Optional[str] = None, status: Optional[str] = None, sort_by: Optional[str] = None) Iterable[ciscosupportsdk.models.serviceorderreturn.User]

Returns a list of RMAs associated with the specified user. By default, the last 30 days of RMAs for a user is returned.

Param

user_id: list[str]: Identifier of the user for which to return associated RMAs. Note: Only 1 user ID is accepted; currently, multiple user IDs are not supported.

Return type

Iterable[Rma]

suggestion

class ciscosupportsdk.api.softwaresuggestion.SoftwareSuggestionApi(session: ciscosupportsdk.apisession.ApiSession)

Bases: object

The process of selecting the appropriate software upgrade path for your environment can be complex. The Cisco Software Suggestions streamline the software selection process by providing the necessary information to assist you in making intelligent choices for upgrading your software.

get_compatible_by_mdf_id(mdf_id: str, current_image: Optional[str] = None, current_release: Optional[str] = None, supported_features: Optional[list[str]] = None, supported_hardware: Optional[list[str]] = None) Iterable[ciscosupportsdk.models.softwaresuggestion.Suggestion]

Returns compatible and suggested software releases for a product given its mdf identifier (mdfId) and specific software attributes.

Param

mdfIds: list[str]: Base mdf IDs for which to return suggested software releases. A maximum of 10 mdf Ids are allowed.

get_compatible_by_product_id(product_id: str, current_image: Optional[str] = None, current_release: Optional[str] = None, supported_features: Optional[list[str]] = None, supported_hardware: Optional[list[str]] = None) Iterable[ciscosupportsdk.models.softwaresuggestion.Suggestion]

Returns compatible and suggested software releases for a product given its product identifier (PID) and specific software attributes.

Param

mdfIds: list[str]: Base mdf IDs for which to return suggested software releases. A maximum of 10 mdf Ids are allowed.

get_suggestions_and_image_by_mdf_ids(mdf_ids: list[str]) Iterable[ciscosupportsdk.models.softwaresuggestion.Suggestion]

Returns a list of Cisco suggested software releases and images for a list of mdf IDs.

Param

product_ids: list[str]: Base product IDs for which to return suggested software releases. A maximum of 10 PIDs are allowed.

get_suggestions_and_image_by_product_ids(product_ids: list[str]) Iterable[ciscosupportsdk.models.softwaresuggestion.Suggestions]

Returns a list of Cisco suggested software releases and images for a list of product IDs.

Param

product_ids: list[str]: Base product IDs for which to return suggested software releases. A maximum of 10 PIDs are allowed.

get_suggestions_by_mdf_ids(mdf_ids: list[str]) Iterable[ciscosupportsdk.models.softwaresuggestion.Suggestion]

Returns a list of Cisco suggested software releases and NO images for a list of mdf IDs.

Param

product_ids: list[str]: Base product IDs for which to return suggested software releases. A maximum of 10 PIDs are allowed.

get_suggestions_by_product_ids(product_ids: list[str]) Iterable[ciscosupportsdk.models.softwaresuggestion.Suggestions]

Returns a list of Cisco suggested software releases (without images) for a list of product IDs.

Param

product_ids: list[str]: Base product IDs for which to return suggested software releases. A maximum of 10 PIDs are allowed.

rma

While known as an RMA to many customers and partners, the service endpoint here is described above in serviceorderreturn. This member is here for convenience and references the same API endpoint.