Maximo

 View Only
Expand all | Collapse all

Any APIs for generating the apikeys for OSLC JSON Rest API

  • 1.  Any APIs for generating the apikeys for OSLC JSON Rest API

    Posted Mon September 09, 2024 11:47 AM

    Hello,

    We are going to use one of the scheduler (not the maximo scheduler) applications with MAS 9. That requires all the users of the that app to have the API keys generated. We have approximately ~35-40 users that use that scheduler software.

    Does IBM provide any API or using the automation script by which we can iterate the list of such users and generate the API keys for each user  instead of using MAXIMO UI?

    Please let me know.

    Thanks



    ------------------------------
    Pankaj Bhide
    ------------------------------


  • 2.  RE: Any APIs for generating the apikeys for OSLC JSON Rest API

    Posted Tue September 10, 2024 02:28 AM

    Hi Pankaj,

    have you seen Create/Revoke API Keys piece of documentation?

    In general, if you would wish to create APIKEY for a specific user you can so something like this:

    curl --location 'http://[host]:[port]/maxrest/oslc/os/mxapiapikey?lean=1' \
    --header 'properties: userid,apikey' \
    --header 'Content-Type: application/json' \
    --header 'APIKEY: [APIKEY of the admin user]' \
    --data '{
        "userid": "[userid for which you wish to generate APIKEY]",
        "expiration":[expiration date or -1 for 'never expire']
    }'


    ------------------------------
    Andrzej Więcław
    Maximo Technical Consultant
    AFRY
    Wrocław, Poland
    ------------------------------



  • 3.  RE: Any APIs for generating the apikeys for OSLC JSON Rest API

    Posted Tue September 10, 2024 08:26 AM
    Thanks for information.

    This is very useful.

    Pankaj Bhide