These docs are for v20.3.44. Click to read the latest docs for v20.3.186.

Discussions

Ask a Question
Back to All

REST API Cannot update property in user defined table

Hello, I am attempting to update a property "WEB_PASSWORD" in a User Defined Table we have called "General". When I run the API request this is the response I get:

Entity type General does not have an identity property and can't be updated.

{"$type":"Asi.Soa.Core.DataContracts.ValidateResultsData, Asi.Contracts","IsValid":false,"ValidationResults":{"$type":"Asi.Soa.Core.DataContracts.ValidationResultsData, Asi.Contracts","Errors":{"$type":"Asi.Soa.Core.DataContracts.ValidationResultDataCollection, Asi.Contracts","$values":[{"$type":"Asi.Soa.Core.DataContracts.ValidationResultData, Asi.Contracts","Message":"Entity type General does not have an identity property and can't be updated."}]},"Warnings":{"$type":"Asi.Soa.Core.DataContracts.ValidationResultDataCollection, Asi.Contracts","$values":[]}}}

I get a similar response for any other table I try updating in this fashion - is my syntax incorrect?

HTTP PUT: https://{{IMISurl}}/Asi.Scheduler_iMIS_TEST/api/general/309442

{
"$type": "Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts",
"EntityTypeName": "General",
"PrimaryParentEntityTypeName": "Party",
"Identity": {
"$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts",
"EntityTypeName": "General",
"IdentityElements": {
"$type": "System.Collections.ObjectModel.Collection1[[System.String, mscorlib]], mscorlib", "$values": [ "309442" ] } }, "PrimaryParentIdentity": { "$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts", "EntityTypeName": "Party", "IdentityElements": { "$type": "System.Collections.ObjectModel.Collection1[[System.String, mscorlib]], mscorlib",
"$values": [
"309442"
]
}
},
"Properties": {
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Web_Password",
"Value": "TestPassword"
}
]
}
}