Forum Discussion

bmoreira2000's avatar
bmoreira2000
Icon for Nimbostratus rankNimbostratus
Feb 18, 2021

"Ordinal" Refers to Policy Rule ID?

In the iControl Rest API, what sets the policy rule ID, is it the ordinal?

I'm trying to sort the list of policies, for each new policy created that is in the last list.

curl -k -X POST \
    -u "${USER}:${PASS}" \
    "https://bipteste/mgmt/tm/ltm/policy/~Common~Drafts~Teste_Bruno/rules" \
    -H 'Accept: */*' \
    -H 'Content-Type: application/json' \
    -d '{
        "name":"svc_teste4", "description":"teste","ordinal":0
}'

I defined that svc_teste4 would be the first one on the list, but he was in the penultimate

1 Reply

  • yeah, well maybe, it does have something to do with the order

     

    https://support.f5.com/csp/article/K19551223

     

    the question is if you can just set it to 0 and expect it to be the first. isn't there another rule already using 0? or perhaps 0 is not allowed.

     

    it might be you have to shift the rest first to then insert at the start.