Application API publish has errors.
ssg log contains
2024-04-18T15:58:51.893-0400 WARNING 344 com.l7tech.server.policy.assertion.ServerAuditDetailAssertion: -5: Error code 300 when calling OTK's Portal API Key Sync
2024-04-18T15:58:51.946-0400 INFO 344 com.l7tech.external.assertions.evaluatejsonpathexpressionv2.JsonPathEvaluator: JSON payload rejected because it contains trailing tokens: {
"portal_sync": {
"syncType": "incremental",
"deletedIdErrors": [],
"newOrUpdatedEntitiesErrors": [08c3d7f2-d0fa-40b5-b43b-dd54d79cf9cc, 144d9d01-e205-419e-b753-e647d6622eb3, 18167c78-a133-49e9-a3e1-63242bb8cb26, 18ce1d14-80ad-4aee-a088-26a3a8a65bad, 25c294fb-2168-4044-8ce6-1fcc05cd22ef, 76b44dd4-56a0-4d76-afc3-0bbfb21f9974, 80043ead-60f6-46c1-87f1-a6ed246020a1, 8c149d3e-dde4-4407-a986-b305d1e011b2, 9b4646b6-bc1f-46ba-9e69-fc8964b298f5, b79e3052-8e1a-48a0-8b79-dcbc7d0d1413, b8b201ca-64f8-4b19-8c23-5996b238aed9, d1684888-7581-4d31-898a-239cfdb4a8e7, d20cd328-3f0d-4949-9d25-d0c1fa2ed613, d9765f43-8873-435d-8b12-a512c09afc2e, e43db7b8-c7c0-45f8-be45-8527901047d2, e919d229-49cb-423c-9c77-0b58bc9f68ce, fec27398-0a7e-4651-90e5-dbc15d6f070d]
}
}
2024-04-18T15:58:51.952-0400 INFO 222 com.l7tech.external.assertions.portaldeployer.server.client.MessageProcessor: Target request to https://localhost:8443/portalman/api-keys/storage failed. Response code: 500, response body: {
"portal_sync": {
"syncType": "incremental",
"deletedIdErrors": [],
"newOrUpdatedEntitiesErrors": [08c3d7f2-d0fa-40b5-b43b-dd54d79cf9cc, 144d9d01-e205-419e-b753-e647d6622eb3, 18167c78-a133-49e9-a3e1-63242bb8cb26, 18ce1d14-80ad-4aee-a088-26a3a8a65bad, 25c294fb-2168-4044-8ce6-1fcc05cd22ef, 76b44dd4-56a0-4d76-afc3-0bbfb21f9974, 80043ead-60f6-46c1-87f1-a6ed246020a1, 8c149d3e-dde4-4407-a986-b305d1e011b2, 9b4646b6-bc1f-46ba-9e69-fc8964b298f5, b79e3052-8e1a-48a0-8b79-dcbc7d0d1413, b8b201ca-64f8-4b19-8c23-5996b238aed9, d1684888-7581-4d31-898a-239cfdb4a8e7, d20cd328-3f0d-4949-9d25-d0c1fa2ed613, d9765f43-8873-435d-8b12-a512c09afc2e, e43db7b8-c7c0-45f8-be45-8527901047d2, e919d229-49cb-423c-9c77-0b58bc9f68ce, fec27398-0a7e-4651-90e5-dbc15d6f070d]
}
Portal 5.x, SaaS Portal
The custom field data created using old UI contains null value. This will cause the sync fail.
Reedit the API contains custom field with null value uisng UI and save the data or use PAPI to modify data:
Example:
[
{
"customFieldUuid": "5e3170ab-fe7b-4754-92e5-cc30d834bff6",
"value": "DEV"
},
{
"customFieldUuid": "d88bc3b4-6124-458f-b949-dd1c758c355f"
},
{
"customFieldUuid": "13128db7-2674-4212-aa42-892609f2dcb8",
"value": "{\"ppm\":\"myservice\"}"
}
]
Note there is no "value": part for d88bc3b4-6124-458f-b949-dd1c758c355f.
Modify it to
[
{
"customFieldUuid": "5e3170ab-fe7b-4754-92e5-cc30d834bff6",
"value": "DEV"
},
{
"customFieldUuid": "d88bc3b4-6124-458f-b949-dd1c758c355f",
"value": ""
},
{
"customFieldUuid": "13128db7-2674-4212-aa42-892609f2dcb8",
"value": "{\"ppm\":\"myservice\"}"
}
]