Changed ID values of Genre objects to UUIDs and decreased depth of the POSTed Genre object to match the maximum depth of DELETE
38 lines
1.3 KiB
HTTP
38 lines
1.3 KiB
HTTP
#################################################
|
|
#
|
|
# Genres
|
|
#
|
|
|
|
GET http://localhost:4004/odata/v4/test/Genres?
|
|
###
|
|
|
|
GET http://localhost:4004/odata/v4/test/Genres?
|
|
&$filter=parent_ID eq null&$select=name
|
|
&$expand=children($select=name)
|
|
###
|
|
|
|
POST http://localhost:4004/odata/v4/test/Genres?
|
|
Content-Type: application/json
|
|
|
|
{ "ID":"100aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "name":"Some Sample Genres...", "children":[
|
|
{ "ID":"101aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "name":"Cat", "children":[
|
|
{ "ID":"102aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "name":"Kitty", "children":[
|
|
{ "ID":"103aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "name":"Aristocat" },
|
|
{ "ID":"104aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "name":"Kitty Bat" } ]},
|
|
{ "ID":"105aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "name":"Catwoman", "children":[
|
|
{ "ID":"106aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "name":"Catalina" } ]} ]},
|
|
{ "ID":"107aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "name":"Catweazle" }
|
|
]}
|
|
###
|
|
|
|
GET http://localhost:4004/odata/v4/test/Genres(100aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa)?
|
|
&$expand=children
|
|
&$expand=children($expand=children($expand=children($expand=children)))
|
|
###
|
|
|
|
DELETE http://localhost:4004/odata/v4/test/Genres(103aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa)
|
|
###
|
|
|
|
DELETE http://localhost:4004/odata/v4/test/Genres(100aaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa)
|
|
###
|