HomeGuidesAPI ReferenceChangelogDiscussions
GuidesiMIS ProfessionaliMIS EnterpriseClient SupportLog In
Discussions
These docs are for v20.3.44. Click to read the latest docs for v20.3.192.

Discussions

Ask a Question
Back to All

REST API - POST VERB : JSON --> How can we easily create a JSON Object of UD Defined MultiInstance Table.

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
           }
        }
     ]
  }
}```