API Connect

 View Only
  • 1.  retrieve modified date of API

    Posted Fri January 27, 2023 04:16 PM
    Hi Team,

    Can you please advise if I can make use of any apic cli commands to retrieve product modified date.
    apic products:list-all command does not return field "modified"

    Thanks & Regards
    Gayathri


  • 2.  RE: retrieve modified date of API

    User Group Leader
    Posted Tue January 31, 2023 02:23 PM

    Hi Sadhana, 

    our team said that it does return the field "update_at" which is the last modified date 

    is this what you were looking for or something more specific so that I could go back to our team and discuss? 

    Best, 

    Gabriel 



    ------------------------------
    Gabriel Marte Blanco
    Austin TX
    ------------------------------



  • 3.  RE: retrieve modified date of API

    Posted Wed February 01, 2023 10:32 AM
    Hi Gabriel,

    Thank you for the reply.I am unable to retrieve update_at field using apic:products:list or list-all or get.
    Below are the fields being returned:
    Productname,version,state and product url
    finance:1.0.0 [state: published] https://myserver.com/api/catalogs/dce12994-a6a1-487b-83b6-c73bd8498799/006827d5-9e82-427a-abe6-be5b126210f7/products/0f0af980-f505-4f36-b09c-d7b1c9c1a2f2
    Please advise me if I can use any other command to retrieve update_at.

    Thanks & Regards
    Sadhana

    ------------------------------
    Sadhana Guduru
    ------------------------------



  • 4.  RE: retrieve modified date of API

    Posted Wed February 01, 2023 11:28 AM
    Hello Sadhana,
    Try this:
    apic products:list-all -s mgmtServer  --catalog sandbox --scope catalog -o yourOrg --format json

    Adding "--format json" will output a detailed JSON response, like this:

    {
    "type": "product",
     ...
    "state": "published",
    "scope": "catalog",
    ...
    "created_at": "2022-09-16T08:56:27.000Z",
    "updated_at": "2022-09-16T08:56:27.000Z",
    ...
    }

    ------------------------------
    Sila Kissuu
    IBM Expertise Connect
    ------------------------------



  • 5.  RE: retrieve modified date of API

    Posted Thu February 02, 2023 03:25 AM
    This is great advice from Sila.
    I'd recommend using `--format json` or `--format yaml` on all CLI commands as you will get far more content back, both when commands are successful and when errors occur.

    ------------------------------
    Chris Dudley
    ------------------------------



  • 6.  RE: retrieve modified date of API

    Posted Thu February 02, 2023 09:05 AM
    Thank you Sila/Chris,
    I am able to retrieve the values using --format.

    ------------------------------
    Sadhana Guduru
    ------------------------------