Cisco Cisco Prime Performance Manager 1.3 Guía Del Desarrollador

Descargar
Página de 29
 
Cisco Prime Performance Manager REST API Guide 
Copyright 2012 Cisco Systems 
- 28 - 
When the report is broken into multiple pages, the “pageIndex” parameter should be used to navigate to 
the next pages.  And the “Content-Range” HTTP header value provides current page number, and how 
many pages the report contains. 
The following table shows a report sample that displays the “pageIndex” request parameter being set to 
page number “3”. And the “Content-Range” header response displays page number 3 of 11 pages total. 
Table 33 - CSV Request / Response Sample Showing Pagination (Content-Range Header) 
 
Request 
GET /ppm/rest/reports/Availability/Interfaces/Interface++Availability?
pageIndex=3
 HTTP/1.1 
Host: ppm-cls-vm05.cisco.com:4440 
Connection: Keep-Alive 
User-Agent: RestClient-Tool 
Response – Notice the “Content-Range” header indicating pagination.
 
HTTP/1.1 206 Partial Content 
Transfer-Encoding: chunked 
Date: Wed, 28 Mar 2012 21:38:10 GMT 
Content-Type: text/csv;charset=UTF-8 
Server: Apache-Coyote/1.1 
Content-Range: pages 3/11 
Cache-Control: no-cache 
 
Device, Interface, Timestamp EDT, Interface Index,Interface Availability Percentage Down,Interface 
Availability Percentage Up,Interface Availability Percentage Timeout 
spgw-o-sami03,testing-GigabitEthernet0/0,04/23/2012 10:00:00,2,0.0,100.0,0.0 
spgw-o-sami03,Loopback50,04/23/2012 10:00:00,5,0.0,100.0,0.0 
spgw-o-sami03,mwtm_test1-GigabitEthernet0/0.10,04/23/2012 10:00:00,6,0.0,100.0,0.0 
spgw-o-sami03,NVI0,04/23/2012 10:00:00,7,0.0,100.0,0.0 
NAM-172.20.110.196,MGMT PORT-MGMT PORT,04/23/2012 10:00:00,1,0.0,100.0,0.0 
NAM-172.20.110.196,DATA PORT 1-DATA PORT 1,04/23/2012 10:00:00,2,0.0,100.0,0.0 
NAM-172.20.110.196,DATA PORT 2-DATA PORT 2,04/23/2012 10:00:00,3,0.0,100.0,0.0 
NAM-172.20.110.196,NDE-172.20.122.2-ID-520-NDE-172.20.122.2-ID-520,04/23/2012 10:00:00,7,0.0,100.0,0.0 
NAM-172.20.110.196,NDE-172.20.122.2-ID-0-NDE-172.20.122.2-ID-0,04/23/2012 10:00:00,8,0.0,100.0,0.0  
. . . . 
. . . . 
8  References 
Fielding, R. T. “Architectural Styles and the Design of Network-based Software Architectures” . Ph.D. 
dissertation, University of California, Irvine, 2000. 
Richardson, L. & Ruby, S. (2007). RESTful Web Services. Sebastopol, CA : O'Reilly Media. 
Bernes-Lee, T., Fielding, R. T., et al. Uniform Resource Identifier (URI): Generic Syntax, RFC 3986
RFC Editor, 2005 (http://www.rfc-editor.org/rfc/rfc3986.txt). 
Request for Comments (RFC) 
9  Glossary 
API: Application Programming Interface 
HTTP: Hypertext Transfer Protocol 
HTTPS: Hypertext Transfer Protocol over Transport Layer Security (TLS)