Cisco Cisco Prime Home 6.5 Guida Dello Sviluppatore
Cisco Prime Home – Integration Guide
OL-28557-01 v5.0.1
14
• Data retrieved from a GET can be sent directly with a PUT with no
changes.
Most documents have some common fields
Field
Purpose
code
An immutable external identifier, used for integrations
Id
Internal identifier (typically a sequential number), used by Prime
Home
revision A value used for concurrency control of the document. it is
required for updates to the document
Modifying a Document
To make changes to a document follow this procedure:
1.
GET the resource
2.
Make all of the necessary changes to that document within your
application
3.
PUT the document back to the same resource
4.
If you are interested in the status of asynchronous side effects:
a.
The PUT response will contain headers which will indicate a URL
to poll which will indicate status, if there were any asynchronous
side-effects.
b. Poll the provided status URI until it indicates complete.
Creating a New Document
To create a new document, such as a device, follow this procedure:
1.
GET the template of the type of document you wish to create. ex:
http://host/prime-home/api/v1/templates/device
2. Make all of the necessary changes to that template within your
application to set the desired data
3. POST the document to the table of contents of that document type. ex:
http://host/prime-home/api/v1/devices
Deleting a Document
1.
DELETE the url of the document you wish to remove. ex:
http://host/prime-
home/api/v1/subscribers/code:123456789
home/api/v1/subscribers/code:123456789