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

Discussions

Ask a Question

Access Rest Api from Javascript - CORS exception

Hello, I'm starting to use the Rest Api, but from the begining I'm facing a problem with CORS. Using javascript I'm able to get the token from https://mysite.com/imis/token After that, I get the access_token for the subsequent calls, but it I do a simple call to https://mysite.com/imis/api/party/900111 I get this error in my browser Console "Access to XMLHttpRequest at 'https://mysite.com/imis/api/party/900111' from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource." And this is the JavaScript code I'm trying to execute: =============================== $.ajax("https://mysite.com/imis/api/party/900111", { type : "PUT", contentType: "application/json", data: JSON.stringify({ "$type": "Asi.Soa.Membership.DataContracts.PersonData, Asi.Soa.Membership.Contracts", "PersonName": { "$type": "Asi.Soa.Membership.DataContracts.PersonNameData, Asi.Soa.Membership.Contracts", "FirstName": "Peter", "LastName": "Carlton", "NamePrefix": "Mr." }, "PartyId": "900111"}), dataType: "json", crossDomain: true, headers: { "RequestVerificationToken": response.access_token, "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Headers": "x-requested-with" }, success: function(data){ console.log(data); } }) Thank you!
ANSWERED

Inventory management through the REST API

Hello, Like this person asked: https://developer.imis.com/discuss/5f05f424deecb9005e833f0d I too was wanting to manage inventory via the API. Usually I'm able to fumble my way through despite the documentation by looking at the data returned back from various GETs but in this case it's to no avail. Is there an example I can work from? And is there any reason why GetProductTransactionByGroup returns 501? Am I malforming the query? Thank you.
ANSWERED

Get Additional Party Information from GroupMember

Hi, I'm currently using the following API request: https://{{URL}}/api/GroupMember/?GroupId=COMMITTEE/TEST01 to get members information. Within the party information that's being returned, is it possible to get additional party information? In my case, I was hoping to get the primary organization returned in the party information using this API request. Is that possible? For an example of what's being returned: "Party": { "$type": "Asi.Soa.Membership.DataContracts.PartySummaryData, Asi.Contracts", "CityName": "New York", "CountryName": "United States", "CountrySubEntityName": "NY", "Email": "[email protected]", "Phone": "111-111-1111", "PartyId": "122122", "Id": "122122", "UniformId": "1fcf1e18-084c-454b-a274-30de3fc9aa84", "Status": { "$type": "Asi.Soa.Membership.DataContracts.PartyStatusData, Asi.Contracts", "PartyStatusId": "A", "Name": "Active", "Description": "Active" }, "Name": "TEST TEST", "Sort": "TEST,TEST", "IsMarkedForDelete": false }, An example of what I want returned: "Party": { "$type": "Asi.Soa.Membership.DataContracts.PartySummaryData, Asi.Contracts", "CityName": "New York", "CountryName": "United States", "CountrySubEntityName": "NY", "Email": "[email protected]", "Phone": "111-111-1111", "PartyId": "122122", "Id": "122122", "UniformId": "1fcf1e18-084c-454b-a274-30de3fc9aa84", "Status": { "$type": "Asi.Soa.Membership.DataContracts.PartyStatusData, Asi.Contracts", "PartyStatusId": "A", "Name": "Active", "Description": "Active" }, "Name": "TEST TEST", "Sort": "TEST,TEST", "IsMarkedForDelete": false, "PrimaryOrganization": { "$type": "Asi.Soa.Membership.DataContracts.PrimaryOrganizationInformationData, Asi.Contracts", "OrganizationPartyId": "5267", "Name": "TEST", "Title": "TEST" }, },

UserRoles

Hi ASI Support, I am trying to get all users with SysAdmin Roles and opening some functionality that is available for only SysAdmins. While trying REST API Endpoints, I discovered two bugs, here are the details: BUG - 1 `https://URL/api/User/:PartyID` This Endpoint has a Role property but returns null for the user, which definitely has a SysAdmin role and also OnBehalfOf Role. Also, in iMIS SysAdmin Role Key is "8e5c7c1d-170b-4294-b646-2e60d2091df8" So, I tried validating the same user with the following endpoint and it validates that this user has SysAdmin Role. `https://URL/api/UserRole/~8e5c7c1d-170b-4294-b646-2e60d2091df8|e982d078-994a-4bf9-b424-1010e64097d4` I think this is a bug at `api/User` Endpoint which does not return the correct Roles for a user. `https://URL/api/User/:PartyID` BUG - 2 Another bug is TWO different kinds of JSON Responses returned by `api/User` Endpoint. Steps to create: 1. Identify any Full User in the system under Security and note down its Username, PartyID and Roles. 2. Query for `https://URL/api/User/PartyID`, you will see JSON response(First Kind) which has the Roles and fewer properties about that user. 3. Query for `https://URL/api/User?UserName=eq:Username` and you will see a different JSON because it is searching all Users in the system, which is fine. 4. But now run the Query in Step 2 again, the JSON response(Second Kind) will be changed and have more properties similar to the response returned in Step-3, Roles Property which was correct in Step-2 and now are always null(which is Bug -1) This was identified in Service Pack O. Let me know if need a demo!

Why would I use REST?

Hi everyone! I'll get right to the point. Why would I bother with all the great Http Requests included in the iMIS SDK, when I cannot write a custom app with a fetch pointing to my iMIS instance on the same server? I have seen other answers on this forum referring to security risks? Isn't this what the token authentication is for? I am so confused and frustrated with the iMIS SDK, as I can only properly use it in POSTMAN, but not on my app hosted on IIS. Maybe I have missed something big here. Would really appreciate someone telling me what that is.
ANSWERED

Event Combo Order Issue

So I am trying to get the following coding to work and we are getting an error on the server saying System Argument Exception The registration option id is invalid Parameter Name: registrationoptionfunctionid I have tried to find these codes using our product code from the products table and then also ran a get event using the EventID..where do you get these values from? Thanks, Leo { "$type": "Asi.Soa.Events.DataContracts.EventRegistrationRequest, Asi.Contracts", "Waitlist": false, "EntityTypeName": "EventRegistration", "OperationName": "RegisterEvent", "RegistrationType": 3, "EventId": "254928", "RegistrationOptionFunctionId": "254928/WEBCE", "FunctionId": "254928/WEBCE", "RegistrantId": "958603", "RegisteredBy": "958603", "BillTo": "958603" }

Custom PA task display list

Hi, I created a view and associated BO from the TaskDefinition table that allowed me to create an IQA to replicate a more user friendly PA task list. This allows us to find tasks much more easily using IQA search criteria functionality. However, I have noticed an issue with Alert display tasks opened from my IQA. When I open an alert display task from the IQA, the alert sets associated with the specific task don't show up when the task is opened (they do display correctly when the same task is opened from the built-in PA task list). I constructed the link in the IQA to be almost the same as that in the built-in list but there are a few small differences. Example link from custom IQA task list: <a href="javascript:ShowDialog_NoReturnValue('/iParts/Common/Tasks/TaskEditDialog.aspx?TaskDefinitionId=419DB503-D3D5-45C9-B4CF-513961FB01D3&amp;iMode=Edit&amp;iOperation=Edit&amp;TemplateType=E&amp;IsPopup=true',null,'90%25','90%25','Task',null,'E',refreshPATaskList,null,false,true,null,null);">ACN_FollowUp_ReturnedMail</a> Equivalent link in built-in PA task list: <a href="javascript:ShowDialog_NoReturnValue('/iParts/Common/Tasks/TaskEditDialog.aspx?TaskDefinitionId=419db503-d3d5-45c9-b4cf-513961fb01d3&amp;iMode=Edit&amp;iOperation=Edit&amp;TemplateType=E&amp;IsPopup=true',null,'90%25','90%25','Task',null,'E',DialogWindowCallback,null,false,true,null,null);">ACN_FollowUp_ReturnedMail</a> Does anyone have any advice around this? Many thanks, Robbie

Expire the token manually

Hi is there an endpoint to expire a token or remove a token from iMIS on the server side?

Panel Sources via REST API

We are trying to call a Panel Source using REST to add some data, but having issues. All Panel definitions should have associated Business Objects in iMIS Cloud, right? We have 3 panels in particular where this doesn't seem to be the case, and I see you can no longer auto-generate business objects from User defined tables/sources using the "Build All" button that used to exist in iMIS 2017. Any guidance here?
ANSWERED

Update member password

I want to update user password. But i have only Member Number and Email? Can I update user password with the above two parameters if user has forgotten the password. Is there any rest api for this. Thanks