ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

API Portal HUB configuration gives 500 Internal Server Error

book

Article ID: 213710

calendar_today

Updated On:

Products

CA API Developer Portal

Issue/Introduction

While working on the deployment of the Hub API, to test its operation one must declare the Hub on the Portal.
The below syntax results in a 500 internal server error:

 curl --include   --header "Authorization:Bearer <value>"  --header "Content-Type:application/json;charset=UTF-8" \   

--data '{
"Name":"APIHUB_SETTINGS",
"Uuid": "UID",
"Value": {
"name": "apihubtest",
"host": "localhost:3123",
"forgotpasswordPath": "/#/new-password",
"signuppath": "/#/account-setup"
}}'
\

--request PUT "https://portal-host:443/portail/Settings('APIHUB_SETTING

Environment

Release : 5.0

Component : API PORTAL

Resolution

Please try below syntax instead:

curl --include   --header "Authorization:Bearer <value>"  --header "Content-Type:application/json;charset=UTF-8" \ 
  --data '{
  "Name": "APIHUB_SETTINGS",
    "Uuid": "UID",
    "Value": "[{
\"name\": \"apihubtest\",
\"host\": \"http://localhost:3123/\",
\"signuppath\": \"account-setup\",
\"forgetpasswordPath\": \"newpassword\"}]"
}' \ 
  --request PUT "https://portal-host:443/portail/Settings('APIHUB_SETTINGS')"