Discussions
Posting to a multi instance panel
Hi,
We are trying to POST to a multi instance panel and we are getting mixed results where sometimes our requests work and other times it doesn't. When we do get an error, we see a 403 response. We think it has something to do with the ID, as it seems posting to certain IDs work but others don't. However, we haven't seen consistent results either.
What should we be doing to avoid an error?
Example where it works:
jQuery.ajax("https://njcaastaging.imiscloud.com/api/NJCAA_ASC_P_LOIHistory2", {
type: "POST",
contentType: "application/json",
headers: {
"RequestVerificationToken": document.getElementById("__RequestVerificationToken").value
},
"data": JSON.stringify({
"$type": "Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts",
"Properties": {
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values": [{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "ID",
"Value": "23228"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "StudentID",
"Value": "1234"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "AthleticDirector",
"Value": "1234"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "AthleticDirectorSignature",
"Value": "Billy Bob Smith Jones"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "AthleticDirectorSignDate",
"Value": "4/22/2019"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Date",
"Value": "4/22/2019"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Division",
"Value": "I"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Scholarship",
"Value": "Tutiton & Board"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "SchoolYear",
"Value": "2019-2020"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Sport",
"Value": "Mens Baseball I"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Terms",
"Value": "asdfghjkldfkglhbjgkjfasbgkl.jsangbk.ljfagnakjfbgnadhg"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "AcademicTerm",
"Value": "Fall,Spring"
}
]}})});
Example where it does not work:
jQuery.ajax("https://njcaastaging.imiscloud.com/api/NJCAA_ASC_P_LOIHistory2", {
type: "POST",
contentType: "application/json",
headers: {
"RequestVerificationToken": document.getElementById("__RequestVerificationToken").value
},
"data": JSON.stringify({
"$type": "Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts",
"Properties": {
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values": [{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "ID",
"Value": "23233"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "StudentID",
"Value": "1234"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "AthleticDirector",
"Value": "1234"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "AthleticDirectorSignature",
"Value": "Billy Bob Smith Jones"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "AthleticDirectorSignDate",
"Value": "4/22/2019"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Date",
"Value": "4/22/2019"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Division",
"Value": "I"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Scholarship",
"Value": "Tutiton & Board"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "SchoolYear",
"Value": "2019-2020"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Sport",
"Value": "Mens Baseball I"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Terms",
"Value": "asdfghjkldfkglhbjgkjfasbgkl.jsangbk.ljfagnakjfbgnadhg"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "AcademicTerm",
"Value": "Fall,Spring"
}
]}})});
Kind regards,
Julie