Reltio Connect

 View Only
  • 1.  How to get the attribute value on particular date/timestamp

    Reltio Partner
    Posted 02-06-2022 06:22

    Hi Team,

    For entity "OJLJK7N", we have fetched the change history of attribute "ABSCode". From the response of the API , we can make out that the attribute "ABSCode" has changed twice . One on 1515701078782 and another 1533115738988.

     

    Now my requirement is how to get the value of ABSCode attribute on these two timestamps.?

     

     

    API 

    -----------

    GET : {{tenant_url}}/entities/OJLJK7N/_changes?filter=changes(configuration/entityTypes/HCP/attributes/ABSCode)

     

    Response 

    --------------------------

    [
      {
        "timestamp": 1515701078782,
        "user": "abv-hcp-system-prod",
        "type": "ENTITIES_MERGED_ON_THE_FLY",
        "mergeReason": "Merge on the fly",
        "mergeType": "ON_THE_FLY",
        "crosswalks": [
          {
            "uri": "entities/HnG9H8u/crosswalks/WHJ5daa4",
            "type": "configuration/sources/ABS",
            "value": "entities/6gyo7hu|DT_NPI|55",
            "reltioLoadDate": "2018-01-11T20:04:38.782Z",
            "createDate": "2018-01-11T14:04:38.680Z",
            "updateDate": "2018-01-11T14:04:38.680Z",
            "attributes": [
              "entities/HnG9H8u/attributes/Status/gWVimjDt",
              "entities/HnG9H8u/attributes/DataSource/WHJ5dFGm",
              "entities/HnG9H8u/attributes/PrescriberStatus/WHJ5dS3Y",
              "entities/HnG9H8u/attributes/ABSCalculationDate/WHJ5dNnI",
              "entities/HnG9H8u/attributes/ProfileID/WHJ5dB0W",
              "entities/HnG9H8u/attributes/ABSCode/WHJ5dJX2",
              "entities/HnG9H8u/attributes/MDMID/WHJ5d6kG"
            ],
            "singleAttributeUpdateDates": {}
          }
        ]
      },
      {
        "timestamp": 1533115738515,
        "user": "abv-hcp-system-prod",
        "type": "ENTITY_CHANGED"
      },
      {
        "timestamp": 1533115738988,
        "user": "abv-hcp-system-prod",
        "type": "ENTITIES_MERGED_ON_THE_FLY",
        "mergeReason": "Merge on the fly",
        "mergeType": "ON_THE_FLY",
        "crosswalks": [
          {
            "uri": "entities/48s1HcS/crosswalks/6pgdjgmS",
            "type": "configuration/sources/ABS",
            "value": "entities/6gyo7hu|DT_NPI|35",
            "reltioLoadDate": "2018-08-01T09:28:58.988Z",
            "createDate": "2018-08-01T04:28:57.963Z",
            "updateDate": "2018-08-01T04:28:57.963Z",
            "attributes": [
              "entities/48s1HcS/attributes/DataSource/6pgdjCwe",
              "entities/48s1HcS/attributes/MDMID/6pgdirdM",
              "entities/48s1HcS/attributes/ProfileID/6pgdj4Q8",
              "entities/48s1HcS/attributes/PrescriberStatus/6pgdjYFw",
              "entities/48s1HcS/attributes/Status/4XW5M7afn",
              "entities/48s1HcS/attributes/ABSCode/6pgdjLTA",
              "entities/48s1HcS/attributes/ABSCalculationDate/6pgdjPjQ"
            ],
            "singleAttributeUpdateDates": {}
          }
        ]
      }
    ]

     

    Thanks,

    Joycee



    ------------------------------
    Joycee Surin
    Cognizant
    ------------------------------


  • 2.  RE: How to get the attribute value on particular date/timestamp

    Reltio Employee
    Posted 02-07-2022 10:29

    Hi Joycee,

    Reltio uses epoch milisecond time.  Web sites such as https://www.timecalculator.net/milliseconds-to-date can be used to convert this time.  If you are trying to do so programatically, I think this stack overflow gives a good example: https://stackoverflow.com/questions/9754600/converting-epoch-time-to-date-string 

    SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
    sdf.format(new Date(myTimeAsLong));


    ------------------------------
    Gino Fortunato
    Senior Solution Engineer
    Reltio
    ------------------------------



  • 3.  RE: How to get the attribute value on particular date/timestamp

    Reltio Partner
    Posted 02-28-2022 09:43
    Hi Joycee,

    You can use Reltio Get Entity API with "time" parameter to fetch entity snapshot at specific timestamp and then you can validate the value of ABSCode attribute.
    Reltio documentation: https://docs.reltio.com/entitiesapi/getentity.html
    GET {{tenant_url}}/entities/OJLJK7N?time=1515701078782​


    Thanks,
    Angel



    ------------------------------
    Angel Paunov
    Ulpia Tech
    ------------------------------