Discussions
REST API - POST VERB : JSON --> How can we easily create a JSON Object of UD Defined MultiInstance Table.
almost 6 years ago by Parteek Chhabra
This is the sample JSON that is needed to create a record in Name_CEU table.
My Question is how can we easily create this for other custom iMIS tables?
"$type":"Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts",
"EntityTypeName":"Name_CEU",
"PrimaryParentEntityTypeName":"Party",
"Identity":{
"$type":"Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts",
"EntityTypeName":"Name_CEU",
"IdentityElements":{
"$type":"System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
"$values":[
"23179",
"2"
]
}
},
"PrimaryParentIdentity":{
"$type":"Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts",
"EntityTypeName":"Party",
"IdentityElements":{
"$type":"System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
"$values":[
"23179"
]
}
},
"Properties":{
"$type":"Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values":[
{
"$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name":"CEU_Course"
},
{
"$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name":"CEU_Date_Reported"
},
{
"$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name":"CEU_Event"
},
{
"$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name":"CEU_Followup"
},
{
"$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name":"CEU_Hours",
"Value":{
"$type":"System.Double",
"$value":10
}
},
{
"$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name":"CEU_Notes",
"Value":"These are some notes on the subject!"
},
{
"$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name":"CEU_Source"
},
{
"$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name":"CEU_Type"
},
{
"$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name":"CEU_Year"
},
{
"$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name":"PartyId",
"Value":"23179"
},
{
"$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name":"SEQN",
"Value":{
"$type":"System.Int32",
"$value":2
}
}
]
}
}```