Unsolved
10 Posts
0
483
June 9th, 2022 23:00
Mapping changelist lins read using REST api to actual File LIN
API: GET /platform/1/snapshot/changelists/ /lins
Sample Response:
| { "atime":{ "nsec":0, "sec":1651226075 }, "ctime":{ "nsec":0, "sec":1651226075 }, "id":"68756240656", "mtime":{ "nsec":0, "sec":1651226075 }, "path":"/data/test_files", "size":46943, "type":"directory" } |
Need some information to map "id" reported in above response with the actual file LIN.
File deletion case:
| Actual LIN | 4298240583 | 100000000001100011111001001000111 |
| Reported ID | 2305843077985543280 | 10000000000000000000000001000000000011000111110010010001110000 |
(Please note shift by 4 and 61st bit set to one)
File modification case:
| Actual LIN | 4297265041 | 100000000001000110000111110010001 |
| Reported ID | 68756240656 | 1000000000010001100001111100100010000 |
(Please note shift by 4)
Is this a standard mechanism and can we assume same will be applicable in all cases?
No Events found!



tenortim
36 Posts
0
June 13th, 2022 07:00
Hello @SadhanaP ,
yes, that is how the id field works in the v1 changelist API, but may I ask why you are using the old/original version? Are you needing to support very old (at this point, unsupported) releases of OneFS? Unless you are, I would strongly recommend using one of two the newer API endpoints, either
or
In both cases, the new entries endpoint gives much more information, and it provides a lin attribute that is always the lin, separate from the id attribute which, as you saw, also contains hidden flags in the upper byte.
Regards,
Tim
SadhanaP
10 Posts
0
June 16th, 2022 04:00
Hi Tim,
Thanks for the information. I was just exploring the apis, will try to use the suggested api.
Thanks