Hi,
I wish to have your advice on exposing collection data from the APIs. Its recommended in oada standard that,
for example. /bookmarks/irrigation/machines . .should have response some thing similar to,
{
“_id”: “20kldfjwie”,
“_rev”: “3-kdfj02klsjdf”,
“_meta”: {
“_metaid”: “20kldfjwie”,
“_rev”: “1-we8dfoij23l”
},
“name”: “irrigators”,
“list”: {
"<device-id-1>": {
"_id": "abc123", _rev: “1-53554t4yh4v2302”
},
"<device-id-2>": {
"_id": "def456", _rev: “4-dfg3rthdfbe5t”
}
}
}
and then /bookmarks/irrigation/machines/list/<device-id-1> would be resource /resources/abc123.
Normally in.net an object collection are exposed either by indexes or key-value pair which are built in...
sample json:
{
“_id”: “20kldfjwie”,
“_rev”: “3-kdfj02klsjdf”,
“_meta”: {
“_metaid”: “20kldfjwie”,
“_rev”: “1-we8dfoij23l”
},
“name”: “irrigators”,
“list”: [2] {
0: {
key: "<device-id-1>",
_value : {
"_id": "abc123", _rev: “1-53554t4yh4v2302”
}
},
1: {
key: "<device-id-2>",
_value : {
"_id": "xyz123", _rev: “2-53554t4yh4v2302”
}
}
}
}
where the key will be the resource key and by searching list[<device-id-1>] would find { "_id": "abc123", _rev: “1-53554t4yh4v2302”}
using this resource key "<device-id-1>" in /bookmarks/irrigation/machines/list/<device-id-1> would retrieve the same as
/resources/abc123.
Queries :
1. I would like to know whether this key-value pair will get serialized in the test suit and in any of non .net client application.
2. If not i would like to know your recommendation in this and the data type you use in the test suit.
3. I also wish to know the language used to build the test suit.
Thanks,
Jiaudheen A
1. I would like to know whether this key-value pair will get serialized in the test suit and in any of non .net client application.
2. If not i would like to know your recommendation in this and the data type you use in the test suit.
3. I also wish to know the language used to build the test suit.