Open APIs

 View Only
  • 1.  How to model who last changed some data item?

    TM Forum Member
    Posted Mar 30, 2023 05:58

    We need to store and convey in an API information on "who" did the last change on some entity.

    "Who" in quotation marks because it does not have to be a person, but might also be another IT Application, so that RelatedParty is not the solution.

    Is there a solution for this?



    ------------------------------
    Lutz Bettge
    Deutsche Telekom AG
    ------------------------------


  • 2.  RE: How to model who last changed some data item?

    TM Forum Member
    Posted Mar 30, 2023 14:48

    There is a history pattern that's reaching finalization in the v5 API set. Perhaps @Florin Tene can provide more information. The question arises whether we want to extend the modifiedBy to be either a Party/PartyRole or a Resource. Worth a discussion in the Thursday architecture call, I think.



    ------------------------------
    Jonathan Goldberg
    Amdocs Management Limited
    Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
    ------------------------------



  • 3.  RE: How to model who last changed some data item?

    TM Forum Member
    Posted Mar 31, 2023 03:34

    Thank you, I will join the call on Thursday then.
    @Florin Tene : It would also be interesting to know how the History concept works, as we are also working on something. Is there already something to read?



    ------------------------------
    Lutz Bettge
    Deutsche Telekom AG
    ------------------------------



  • 4.  RE: How to model who last changed some data item?

    TM Forum Member
    Posted Mar 31, 2023 13:20

    Thank you for bringing this up.
    I'm also interested in the solution. Would be good to know when it is finalized.



    ------------------------------
    Igor Dubrovin
    Bell Canada
    ------------------------------



  • 5.  RE: How to model who last changed some data item?

    Posted Apr 03, 2023 04:44

    To model who last changed a data item, you can add a "last modified by" field to your data model. This field would capture the user ID or username of the person who made the most recent change to the data item.

    Here's an example:

    Let's say you have a database table for customer information, with columns for name, email address, and phone number. To track who last modified a customer's record, you could add a "last modified by" column to the table, with the data type set to the user ID or username:

    CREATE TABLE customer (
      id INT PRIMARY KEY,
      name VARCHAR(50),
      email VARCHAR(50),
      phone VARCHAR(20),
      last_modified_by VARCHAR(50)
    );

    When a user updates a customer record, you would capture their user ID or username and store it in the "last_modified_by" field:

    sql
    UPDATE customer SET name = 'John Smith', email = 'john.smith@example.com', phone = '555-1234', last_modified_by = 'user123' WHERE id = 1;

    This way, you can keep track of who made the most recent changes to the customer record.
    URL





    ------------------------------
    Sajjad khan
    TO BE VERIFIED
    ------------------------------