API call fails - Object type xxxxx is an abstract type (KBA9941)
KBA
KBA# 9941
Issue
If the syntax of an API call is incorrect then the call will fail. For example,
curl -v POST -k --data @- http://de-engine.mycompany.com/resources/json/delphix/database/ORACLE_DB_CONTAINER-44/sync -b ~/cookies.txt -H "Content-Type: application/json" <<EOF
{
"type": "OracleSyncParameters"
}
EOF
Fails:
{"type":"ErrorResult","status":"ERROR","error":{"type":"APIError","details":{"type":{"details":"Object type \"OracleSyncParameters\" is an abstract type. Expected a concrete type derived from \"SyncParameters\".","action":null,"id":"exception.validation.object.type.abstract","commandOutput":null,"diagnoses":null}},"action":"Check your input parameters and try again."
Applicable Delphix Versions
- Click here to view the versions of the Delphix engine to which this article applies
-
Date Release Feb 13, 2023 8.0.0.0 Jan 12, 2023 7.0.0.0 Releases Prior to 2023 Major Release All Sub Releases 6.0 6.0.0.0, 6.0.1.0, 6.0.1.1, 6.0.2.0, 6.0.2.1, 6.0.3.0, 6.0.3.1, 6.0.4.0, 6.0.4.1, 6.0.4.2, 6.0.5.0, 6.0.6.0, 6.0.6.1, 6.0.7.0, 6.0.8.0, 6.0.8.1, 6.0.9.0, 6.0.10.0, 6.0.10.1, 6.0.11.0, 6.0.12.0, 6.0.12.1, 6.0.13.0, 6.0.13.1, 6.0.14.0, 6.0.15.0, 6.0.16.0, 6.0.17.0, 6.0.17.1, 6.0.17.2
5.3
5.3.0.0, 5.3.0.1, 5.3.0.2, 5.3.0.3, 5.3.1.0, 5.3.1.1, 5.3.1.2, 5.3.2.0, 5.3.3.0, 5.3.3.1, 5.3.4.0, 5.3.5.0, 5.3.6.0, 5.3.7.0, 5.3.7.1, 5.3.8.0, 5.3.8.1, 5.3.9.0 5.2
5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1
5.1
5.1.0.0, 5.1.1.0, 5.1.2.0, 5.1.3.0, 5.1.4.0, 5.1.5.0, 5.1.5.1, 5.1.6.0, 5.1.7.0, 5.1.8.0, 5.1.8.1, 5.1.9.0, 5.1.10.0
5.0
5.0.1.0, 5.0.1.1, 5.0.2.0, 5.0.2.1, 5.0.2.2, 5.0.2.3, 5.0.3.0, 5.0.3.1, 5.0.4.0, 5.0.4.1, 5.0.5.0, 5.0.5.1, 5.0.5.2, 5.0.5.3, 5.0.5.4
Resolution
The syntax of an API call may change with new API versions. In the above example there was an API syntax change for 'type' in version 1.11.8, Delphix Release 6.0.8.0 where:
"type": "OracleSyncParameters"
Changed to:
"type": "OracleSyncFromExternalParameters"
By updating the API call to reflect this change, the API call will succeed. For example:
curl -v POST -k --data @- http://de-engine.mycompany.com/resources/json/delphix/database/ORACLE_DB_CONTAINER-44/sync -b ~/cookies.txt -H "Content-Type: application/json" <<EOF
{
"type": "OracleSyncFromExternalParameters"
}
EOF
Troubleshooting
API version information is documented in the online documentation - https://cd.delphix.com/docs/latest/api-version-information
API changes within each version are also documented - https://cd.delphix.com/docs/latest/api-changes
The online API documentation is also available through the Engine UI:
Additionally, the CLI can be used to determine the syntax of an API call by setting trace to true.
For example:
de-engine> setopt trace=true
de-engine database 'DBOMSR8A1718' sync *> commit
=== POST /resources/json/delphix/database/ORACLE_DB_CONTAINER-44/sync ===
{
"type": "OracleSyncFromExternalParameters"
}
=== RESPONSE ===
{
"type": "OKResult",
"status": "OK",
"result": "",
"job": "JOB-1317",
"action": "ACTION-2352"
}
If this is a scripted operation, then it is also possible to set the API version you wish to use at authentication. Please see https://cd.delphix.com/docs/latest/api-cookbook-authentication for more detail.
Related Articles
The following article may provide more information or related information to this article: