B.3.5. “point”参数

在这个例子中,客户在第一首歌曲后在“Foo-One”播放列表中插入新的歌曲条目。

客户端请求:

  1. POST /restconf/data/example-jukebox:jukebox/\
  2. playlist=Foo-One?insert=after&point=\
  3. %2Fexample-jukebox%3Ajukebox\
  4. %2Fplaylist%3DFoo-One%2Fsong%3D1 HTTP/1.1
  5. Host: example.com
  6. Content-Type: application/yang-data+json
  7. {
  8. "example-jukebox:song" : [
  9. {
  10. "index" : 2,
  11. "id" : "/example-jukebox:jukebox/library/artist[name='Foo Fighters']/album[name='Wasting Light']/song[name='Bridge Burning']"
  12. }
  13. ]
  14. }

服务器响应:

  1. HTTP/1.1 201 Created
  2. Date: Thu, 26 Jan 2017 20:56:30 GMT
  3. Server: example-server
  4. Last-Modified: Thu, 26 Jan 2017 20:56:30 GMT
  5. Location: https://example.com/restconf/data/example-jukebox:jukebox/playlist=Foo-One/song=2
  6. ETag: "abcada438af"
  7. mi