Db2

  • 1.  API error getCredentialInternal can not find credentials

    Posted Mon March 16, 2020 04:23 PM
    Hi all,

    I try to use API of DMC.

    When i use the API "Lists all schemas in the database"  (example)

    curl -X GET \
    https://{HOSTNAME}/dbapi/v4/schemas \
    -H 'authorization: Bearer {AUTH_TOKEN}' \
    -H 'content-type: application/json' \
    -H 'x-db-profile: SOME_STRING_VALUE'

    I receive this error:

    {
    "trace":"",
    "errors":[{"code":"required_credential_not_found",
    "message":"HWCCON0071E: Failed to create connection for the profile XBODI because the login credentials are invalid or missing.",
    "target":{"type":"","name":""},
    "more_info":""}]
    }

    In DMC logs:

    DS_System (208349) XBODI dbm_batch_usr_tst Mar 16, 2020 6:12:35 PM [9745896aa62f810de1064f99a9584e62] WARNING CredentialApi::getCredentialInternal can not find credentials for profile XBODI

    Why i receive this error?

    Thanks for support,
    Best regards
    MM


    ------------------------------
    MM
    ------------------------------

    #Db2


  • 2.  RE: API error getCredentialInternal can not find credentials

    Posted Tue March 17, 2020 09:42 AM
    Hi Mario,

    From the error message, seems that the XBODI connection profile's username or password is invalid.

    Could you please open Home->Settings->Connection profile page, click XBODI and then click 'Test connection' under the 'Enable operation' section to check whether the username and password can be used to connect this connection profile.

    Any questions or advice are welcome.

    Thanks.

    ------------------------------
    YAN YAN HAN
    ------------------------------



  • 3.  RE: API error getCredentialInternal can not find credentials

    Posted Wed March 18, 2020 10:32 AM
    Thanks you. I have solve!
    The problem was that i add the database with my personal user and run the batch with tecnical user. 

    Thanks
    Best Regards
    MM

    ------------------------------
    mario marfella
    ------------------------------



  • 4.  RE: API error getCredentialInternal can not find credentials

    Posted Tue March 17, 2020 09:43 AM
    Hello Mario,

    From the error message, seems that the connection profile XBODI's username or password is invalid.
    Could you please open Connection Porfile page,  select XBODI and then click 'Test Connection' button under the Enable operation section?
    If the connection profile can be connected successfully, then it's ok. If the connection profile can't be connected successfully, please modify the usename or password so that the connection profile can be connected successfully. And then save it.

    Any questions please let me know.
    Thanks.

    ------------------------------
    YAN YAN HAN
    ------------------------------