CX Partner Portal APIs for the Partners
For more information, please visit https://cisco.com
Building the API client library requires:
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency> <groupId>com.cisco.services</groupId> <artifactId>px-cloud-java-sdk</artifactId> <version>1.0.0</version> <scope>compile</scope> </dependency>
Add this dependency to your project's build file:
repositories { mavenCentral() // Needed if the 'px-cloud-java-sdk' jar has been published to maven central. mavenLocal() // Needed if the 'px-cloud-java-sdk' jar has been published to the local maven repo. } dependencies { implementation "com.cisco.services:px-cloud-java-sdk:1.0.0" }
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/px-cloud-java-sdk-1.0.0.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
// Import classes: import com.cisco.px.client.ApiClient; import com.cisco.px.client.ApiException; import com.cisco.px.client.Configuration; import com.cisco.px.client.auth.*; import com.cisco.px.client.models.*; import com.cisco.px.client.api.ContractsDataApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("https://api-cx.cisco.com/px"); // Configure OAuth2 access token for authorization: oAuth2 OAuth oAuth2 = (OAuth) defaultClient.getAuthentication("oAuth2"); oAuth2.setAccessToken("YOUR ACCESS TOKEN"); ContractsDataApi apiInstance = new ContractsDataApi(defaultClient); Integer successTrackId = 56; // Integer | successTrackId Integer puid = 56; // Integer | puid String customerId = "customerId_example"; // String | customerId String guName = "guName_example"; // String | guName Integer limit = 56; // Integer | Integer offset = 56; // Integer | try { DataPaginationResponse result = apiInstance.fetchContractsSummaryUsingGET(successTrackId, puid, customerId, guName, limit, offset); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ContractsDataApi#fetchContractsSummaryUsingGET"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } }
All URIs are relative to https://api-cx.cisco.com/px
Class | Method | HTTP request | Description |
---|---|---|---|
ContractsDataApi | fetchContractsSummaryUsingGET | GET /v2/contracts | Get the list of contracts summary |
CustomerDataApi | fetchContractsDetailsUsingGET | GET /v1/contract/details | Get the list of contracts Details from flat table. It supports pagination , filtering and sorting |
CustomerDataApi | getCustomerReport | GET /v1/customers/{customerId}/reports/{reportId} | Get the report |
CustomerDataApi | getCustomersLifeCycle | GET /v1/customers/{customerId}/lifecycle | Get customer lifecycle |
CustomerDataApi | requestCustomerReport | POST /v1/customers/{customerId}/reports | Request customer data reports as bulk files |
PartnerDataApi | getContracts | GET /v1/contracts | List of contracts |
PartnerDataApi | getCustomers | GET /v1/customers | List of customers |
PartnerDataApi | getSuccessTracks | GET /v1/successTracks | Success Tracks |
PartnerOffersDataApi | getPartnerOffers | GET /v1/partnerOffers | Get Partner Offers |
PartnerOffersSessionsDataApi | getPartnerOffersSessions | GET /v1/partnerOffersSessions | Get Info about Partner Offers Sessions |
CrashRiskApi | assetRiskFactorsUsingGet | GET /v1/customers/{customerId}/insights/crashRisk/assets/{assetIdBase64}/riskFactors | Get risk factors of a device |
CrashRiskApi | assetsCrashedUsingGET | GET /v1/customers/{customerId}/insights/crashRisk/assetsCrashed | Get the list of crashed devices for last given time period |
CrashRiskApi | crashHistoryUsingGET | GET /v1/customers/{customerId}/insights/crashRisk/asset/{assetIdBase64}/crashHistory | Get the device crash-detail - Asset 360(time stamp, reset reason) |
CrashRiskApi | crashRiskAssetsUsingGet | GET /v1/customers/{customerId}/insights/crashRisk/assets | Get devices which are at risk of crash owned by a customer, sorted by risk score in descending order by default |
CrashRiskApi | similarAssetsUsingGet | GET /v1/customers/{customerId}/insights/crashRisk/assets/{assetIdBase64}/similarAssets | Get similar assets based on the similarity score |
FaultsApi | getAffectedAssetsDetailsUsingGET | GET /v1/customers/{customerId}/insights/faults/{faultId}/affectedAssets/{assetName}/faultHistory | Assets Fault History |
FaultsApi | getAffectedAssetsUsingGET | GET /v1/customers/{customerId}/insights/faults/{faultId}/affectedAssets | Affected Assets |
FaultsApi | getFaultsSummaryUsingGET | GET /v1/customers/{customerId}/insights/faults/{faultId}/summary | Fault summary |
FaultsApi | getFaultsUsingGET | GET /v1/customers/{customerId}/insights/faults | Faults details |
SoftwareSuggestionsAPI | getSoftwareGroupAssetsUsingGET | GET /v1/customers/{customerId}/insights/software/softwareGroups/{softwareGroupId}/assets | Asset information in the Software Group |
SoftwareSuggestionsAPI | getSoftwareGroupSuggestionsUsingGET | GET /v1/customers/{customerId}/insights/software/softwareGroups/{softwareGroupName}/suggestions | Software Group suggestions |
SoftwareSuggestionsAPI | getSoftwareGroupsUsingGET | GET /v1/customers/{customerId}/insights/software/softwareGroups | Software Group information |
Authentication schemes defined for the API:
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.
Owner
Contributors
Categories
Products
Business DashboardProgramming Languages
JavaLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community