Forum Discussion

khill's avatar
khill
Mentor
8 years ago

REST API v2 - Rank change date?

Hi everyone,   We are scoping some ideas around Rank reporting to answer questions like "How long do users generally stay in the Newbie rank?", "Are users moving through certain parts of our rankin...
  • TariqHussain's avatar
    8 years ago

    khill- Following details are associated with the user for a rank.

     

    "rank" : {
            "type" : "rank",
            "id" : "27",
            "name" : "Rank Title",
            "position" : 21,
            "bold" : false,
            "color" : "000000",
            "roles_granted" : {
              "query" : "SELECT * FROM roles WHERE ranks_granting.id = '27'"
            },
            "roles_removed" : {
              "query" : "SELECT * FROM roles WHERE ranks_removing.id = '27'"
            },
            "formula_enabled" : false,
            "formula" : "",
            "simple_criteria" : {
              "type" : "simple_rank_criteria",
              "role" : { },
              "user" : { },
              "number_of_posts" : 5,
              "number_of_page_views" : 0,
              "number_of_signins" : 0,
              "minutes_online" : 0,
              "minutes_since_registering" : 5760,
              "simple_formula" : "(posts - deleted_posts >= 5) && (registrationAge >= 5760)"
            }
          }

    You can get above information with following query.

     

    select rank from users

    There is no field like Rank Date. However, you can get the ranking formula and some other details.

     

    https://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=commv2&collection=users#fields-rank