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

Discussions

Ask a Question

Trouble posting to multi instance panel source

Hi, We are trying to post to a multi-instance panel source, however, we keep getting a 400 error. Please note that we are on iMIS version 20.2.65.9955. We are able to do GET calls on this panel source fine, but are unable to do any POST calls. Can you please assist? The body we are posting is below. { "$type":"Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts", "EntityTypeName":"AO_SecondaryPatrol", "PrimaryParentEntityTypeName":"Party", "Identity":{ "$type":"Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts", "EntityTypeName":"AO_SecondaryPatrol", "IdentityElements":{ "$type":"System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib", "$values":[ "197018" ] } }, "PrimaryParentIdentity":{ "$type":"Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts", "EntityTypeName":"Party", "IdentityElements":{ "$type":"System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib", "$values":[ "197018" ] } }, "Properties": { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "PartyId", "Value": "197018" }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "PatrollerMemberId", "Value": "258317" } ] } } ) } Kind regards, Julie

Executes a TaskDefinition operation - possible with variables?

Hi I want to execute a Process Automation Task with a POST request to https://yourorgsite.com/api/TaskDefinition/_execute and the body { "$type": "Asi.Soa.Communications.DataContracts.TaskAdhocRequest, Asi.Contracts", "EntityTypeName": "TaskDefinition", "OperationName": "TaskAdhocRequest", "Task": { "$type": "Asi.Soa.Communications.DataContracts.TaskDefinitionData, Asi.Contracts" } } The task would look like this { "$type": "Asi.Soa.Communications.DataContracts.TaskDefinitionData, Asi.Contracts", "TaskDefinitionId": "aa71f95f-4779-4db5-9d4a-dc9f604904ec", "Name": "Send Email from Flowz", "Description": "", "IsActive": true, "Priority": 0, "TaskType": 1, "Triggers": { "$type": "Asi.Soa.Communications.DataContracts.TaskDefinitionTriggerDataCollection, Asi.Contracts", "$values": [] }, "Evaluations": { "$type": "Asi.Soa.Communications.DataContracts.TaskDefinitionEvaluationDataCollection, Asi.Contracts", "$values": [] }, "DataSources": { "$type": "Asi.Soa.Communications.DataContracts.DataSourceDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Communications.DataContracts.DataSourceQueryData, Asi.Contracts", "Query": { "$type": "Asi.Soa.Core.DataContracts.QueryData, Asi.Contracts", "Criteria": { "$type": "Asi.Soa.Core.DataContracts.CriteriaDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Core.DataContracts.CriteriaData, Asi.Contracts", "Operation": 3, "PropertyName": "QueryDocumentVersionKey", "Values": { "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib", "$values": [ "56e9abd1-a01d-4e99-aa52-98aa844603cd" ] } } ] }, "EntityTypeName": "IQA" }, "DataSourceId": "5eefeb65-0390-4ead-a034-51b9bbdf9623", "DataSourceName": "EmailByID" } ] }, "Actions": { "$type": "Asi.Soa.Communications.DataContracts.TaskDefinitionActionDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Communications.DataContracts.TaskDefinitionActionCommunicationJobData, Asi.Contracts", "ActionId": "78675ff1-e8fc-4fa7-9174-cbd4403abf84", "ActionTypeName": "CommunicationJob", "Description": "Sample for CT", "RecipientDatasourceId": "5eefeb65-0390-4ead-a034-51b9bbdf9623", "CommunicationTemplateId": "34236ea0-a33a-4d52-ba2f-02cdd5572458", "ActionNotification": null } ] }, "Notifications": { "$type": "Asi.Soa.Communications.DataContracts.NotificationDefinitionDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Communications.DataContracts.NotificationDefinitionData, Asi.Contracts", "NotificationDefinitionId": "4520a0e3-02d1-4341-bcb1-9d1754d94fb3", "TaskDefinitionId": "aa71f95f-4779-4db5-9d4a-dc9f604904ec", "DefaultTemplate": "", "PersonalizedTemplate": "", "DataSources": { "$type": "Asi.Soa.Communications.DataContracts.DataSourceIdentifiers, Asi.Contracts", "$values": [] } } ] }, "UpdateInformation": { "$type": "Asi.Soa.Core.DataContracts.EntityUpdateInformationData, Asi.Contracts", "CreatedBy": "BRIANM", "CreatedOn": "2021-02-23T14:08:30.173", "UpdatedBy": "BRIANM", "UpdatedOn": "2021-02-23T14:13:16.803" } } It contains a data source (IQA) with a required filter. How can I pass in the filter to the IQA? If I would use the simpler approach by triggering an already setup task, { "$type": "Asi.Soa.Communications.DataContracts.TaskRequest, Asi.Contracts", "EntityTypeName": "TaskDefinition", "OperationName": "TaskAdhocRequest", "TaskDefinitionId": "aa71f95f-4779-4db5-9d4a-dc9f604904ec" } how can I pass in the query parameter? Any pointers are much appreciated! Best, Alex

custom IQA ReST resonse format example for person

We are trying to use a custom IQA to synchronize data between iMIS and our XenForo Forums. I do not have an example of the structure that is returned. It is invoked with the username of the person whose data is being requested. The query uses a custom iBO. I can look at the results of the IQA query in XML and other formats, but not the json file.

API Request Successful but no Data returned

I'm running into an issue on select environments where I make a Get request and it does not show any errors but no data is returned. I have tried multiple endpoints but nothing seems to work. I have seen this before but it randomly just starts working but that's not a great answer. Here is one of the requests I was attempting, any insight is greatly appreciated. jQuery.ajax( "/api/Party?limit=1" , { type: "GET", headers: { "RequestVerificationToken": document.getElementById("__RequestVerificationToken").value }, "dataType": "json", "contentType": "application/json" });

Updating security??

Having trouble finding the right endpoints for updating a user security profile in iMIS cloud (20.3.90.44742). I want to: - change someone from full user to public user and/or - change an expiration date - mark them as disabled Have tried /UserSecurity, it doesn't return the expiration date. /User doesn't seem to allow PUT updates (or a valid _execute option). What am I missing? Thanks much.

iMIS api calls failing on PUT and POST api calls with 400 errors

jQuery.ajax("https://www.test.org/iMIS/api/cs_Event_Speakers", { type : "GET", contentType: "application/json", headers: {"RequestVerificationToken": document.getElementById("__RequestVerificationToken").value}, success: function(data){console.log(data);} }) The following is failing with a 400 error however: var apiData = { Abstract: "test", Agreement: 1, Assistant_Info: 0, Date_Modified: "01-01-2020" Event_Code: 465, File_Location: "C:\Path\To\File", Function_Code: 746, Function_End_Date: 038, Function_Start_Date: "01-01-2020"}; jQuery.ajax("https://www.test.org/iMIS/api/cs_Event_Speakers", { type : "POST", data: apiData, contentType: "application/json", headers: {"RequestVerificationToken": document.getElementById("__RequestVerificationToken").value}, success: function(data){console.log(data);} }) Any help on this would be greatly appreciated!

Register for event function with custom price using REST api

Hi, I want to register a contact for an event function, and to have the price be custom/overriden using the REST api. I know how to register using the EventRegistration functionality, but am not sure about how to register using the Cart to override the price. Can you explain/provide example code on how to do this for iMIS 2017? Thanks, Brian.

Issue in purchasing function in registered event through REST API

I have an existing event registration and want to update that by purchasing new functions. Can anyone help me in fixing my problem? I am sending PUT request to {{URL}}/api/EventRegistration/{{EventRegistrationId}}.

Issue with Serialize and Deserialize the <MonetaryAmountData>.

Hi, I tried to use Json.Net to deserialize the result from the API call, I got the following error: "Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'Asi.Soa.Core.DataContracts.MonetaryAmountData' because the type requires a JSON primitive value (e.g. string, number, boolean, null) to deserialize correctly. To fix this error either change the JSON to a JSON primitive value (e.g. string, number, boolean, null) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object. You could see the same error with this test: string testString = "{ \"$type\":\"System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib\", \"Amount\":345.0, \"Currency\":{ \"$type\":\"Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts\", \"CurrencyCode\":\"AUD\", \"DecimalPositions\":2, \"ExtensionData\":{ \"$type\":\"System.Runtime.Serialization.ExtensionDataObject, System.Runtime.Serialization\" } }, \"IsAmountDefined\":true }"; MonetaryAmountData test = JsonConvert.DeserializeObject<MonetaryAmountData>(testString, settings); It seems that it asks for a primitive string instead of a JSON string. Then, I tried to serialize a MonetaryAmountData object and got "345". And the error became "Newtonsoft.Json.JsonSerializationException: 'Error converting value "345" to type 'Asi.Soa.Core.DataContracts.MonetaryAmountData'. " when to deserialize it, which meant it didn't accept the primitive string. MonetaryAmountData testAmount = new MonetaryAmountData((decimal)345.0, new CurrencyData("AUD")); // testAmount = {345.00}, the currency part was missing. string testSerialize = JsonConvert.SerializeObject(testAmount, Formatting.Indented); // testSerialize = "345", it was a primitive string. MonetaryAmountData testDeserialize = JsonConvert.DeserializeObject<MonetaryAmountData>(testSerialize); Is there anything I am doing wrong? Anyone successfully deserialized JSON to <MonetaryAmountData> object in ASP.NET? Cheers, Fred

CORS Policies and Developing Client-Based iParts

We are attempting to create an iPart that make an API call to a 3rd party endpoint and can successfully make the call using Postman and in the console on the 3rd party's website where the origin is the same. However, if we attempt this call from our iMIS website, we receive a CORS exception because there is no Access-Control-Allow-Origin header in the response. Ultimately, this means that server to server calls are acceptable while client to server calls are not. Is there a way in developing these client-based iParts to make the call server to server so as to avoid the CORS issue? I do not see anything regarding this in the documentation here, https://developer.imis.com/docs/developing-a-client-based-ipart, and it appears that developing webform-based iParts (ASCX), https://developer.imis.com/docs/developing-webform-based-iparts-ascx, is now deprecated and not usable in the cloud.