Ask a Question

How to relate Party to User using REST?

There doesn't seem to be a good, natural way to get from a Party to a User. If I know the login (such as if they logged to my application/web service), I can retrieve /api/user?Username=Equal:{username} to discover their ID and then retrieve the Party. If it's for a single user, not a big deal. If I need something from Party in order to display information about a list of users, that looks like a lot of individual calls to /api/party/{id}. If I'm starting from a party (or a list of parties), I don't see a good way to discover which ones have a user, other than asking over and over again for users with the ID I'm interested in, and then recognizing the 404 as parties with no user. Again, lots of extra requests if I'm displaying a list. Heaven forbid I should be looking specifically for parties without a login. Would I be better off creating an IQA query and retrieving that? What about if the client app is logging into REST as the user? Is there a good way to retrieve the party object (or even the user object) for the logged in user?

Autofac Exception thrown while attempting to create a Cart Object from a Web Application

When I try creating the Cart Object, this following Autofac Exception is thrown "The requested service 'Asi.Core.Client.ICommonServiceHttpClient' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency." Any help towards the resolution of this would deeply appreciated.

Using SSO to provide access to secure areas of both iMis and a 3rd party client site

I'm a bit confused by iMIS' SSO implementation and could use some guidance. I'm working on a setup for a client that uses iMIS and attempting to meet the following request: - user can log in through Client Application/Web site using SSO - On successful login (received valid Token and user is a valid Member, not just an authenticated user), user is then directed to secure area of client application - user can then follow links from that secure area back to iMIS customer site and NOT need to log in again, so long as their token is valid. For nearly all of the implementations that I have done with OAuth2 previously, the flow generally goes: Client application is registered with Host. Client application contacts the host authentication server, and the user logs in via the host system. Host then redirects back to client application and provides an authorization code, and then a subsequent request is issued for a Token. The token can then be used or refreshed to retain access to user data from the host to the client. When I accessed the SSO info for iMIS, it was confusing as it indicates that I need to facilitate the login on the Client side, rather than transition to iMIS and be re-directed back via a redirect URI post authentication. This seems to be counter to most implementations of OAuth2 that I have used. (Here is the SSO documentation I am referencing: https://help.imis.com/imis2017/Features/RiSE/Maintenance/Single_Sign_On.htm) If I am responsible for creating the login prompt (rather than using the host login), and simply using the API to facilitate authentication, I can successfully execute this through the API, but then how do I subsequently use the Token to access other pages on the iMIS site side without requiring them to log in again?

REST postman Collections for Import

Does anyone know the place from where we can import Postman Collections? I saw at innovations that ASI shares a location from which we can Import Collections... If you know please let me know...

IMIS REST API - Write to Non iMIS Table

Does anyone know if the iMIS REST API can be used to write data to a non IMIS table? We are currently reading data using REST API referencing an IQA. We now need to write to these tables (update and insert). Do we need to make these tables "IMIS" tables to do this? Thanks for your help

Calling an IQA using the REST API

I have created an IQA with a url filter (@url:PartyId) and I am trying to call the IQA with: api/IQA?QueryName=Real_IQA_Path?PartyId=12345. I get a response status code of 500, Internal Server Error. But when I hard code the filter in iMIS and change my call to: api/IQA?QueryName=Real_IQA_Path Then it works just fine. What is the syntax for calling an IQA with a url filter?

REST API Error: ArgumentFault: Incorrect number of identity element

Hello, I am trying to perform a GET request for one of my tables and receive this error: ArgumentFault: Incorrect number of identity element GET URL: {{imisURL}}/Asi.Scheduler_iMIS_TEST/api/SUBSPECIALTY/000002 If I don't identify a specific ID to return the GET request will go through with a response like this: { "$type": "Asi.Soa.Core.DataContracts.PagedResult`1[[Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts]], Asi.Contracts", "Items": { "$type": "System.Collections.Generic.List`1[[Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts]], mscorlib", "$values": [ { "$type": "Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts", "EntityTypeName": "SUBSPECIALTY", "PrimaryParentEntityTypeName": "Party", "Identity": { "$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts", "EntityTypeName": "SUBSPECIALTY", "IdentityElements": { "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib", "$values": [ "000002", "127290" ] } }, "PrimaryParentIdentity": { "$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts", "EntityTypeName": "Party", "IdentityElements": { "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib", "$values": [ "000002" ] } }, "Properties": { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "PartyId", "Value": "000002" }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "SEQN", "Value": { "$type": "System.Int32", "$value": 127290 } }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "SUBSPECIALTY_NAME", "Value": "General" }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "SUBSPECIALTY_OTHER" }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "SUBSPECIALTY_TYPE", "Value": "PRIMARY" } ] } }, } The data structure in SQL is attached as an image. How do I perform a REST GET request for a specific record in this table? Here's the full error response: ArgumentFault: Incorrect number of identity elements: at Asi.Services.Core.EntityServiceToCommonServiceAdapter`1.FindById(Object id) in C:\Builds\208\ScrumV3\sp137_Main10\Sources\MainFoundation\imis.net\Packages\Service\Core\Asi.Services.Core\Core\EntityServiceToCommonServiceAdapter.cs:line 330 at Asi.Services.Core.EntityServiceToCommonServiceAdapter`1.Asi.Soa.Core.ServiceContracts.ICommonService.FindById(Object id) in C:\Builds\208\ScrumV3\sp137_Main10\Sources\MainFoundation\imis.net\Packages\Service\Core\Asi.Services.Core\Core\EntityServiceToCommonServiceAdapter.cs:line 224 at Castle.Proxies.Invocations.ICommonService_FindById.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Asi.Shared.Aspects.CacheAspect.Intercept(IInvocation invocation) in C:\Builds\208\ScrumV3\sp137_Main10\Sources\MainFoundation\imis.net\Packages\Platform\Asi.Shared\Aspects\CacheAspect.cs:line 62 at Castle.DynamicProxy.AbstractInvocation.Proceed() at Asi.Services.Core.Interceptors.CommonSecurityAspect.Intercept(IInvocation invocation) in C:\Builds\208\ScrumV3\sp137_Main10\Sources\MainFoundation\imis.net\Packages\Service\Core\Asi.Services.Core\Core\Interceptors\CommonSecurityAspect.cs:line 61 at Castle.DynamicProxy.AbstractInvocation.Proceed() at Asi.Shared.Aspects.PerformanceAspect.Intercept(IInvocation invocation) in C:\Builds\208\ScrumV3\sp137_Main10\Sources\MainFoundation\imis.net\Packages\Platform\Asi.Shared\Aspects\PerformanceAspect.cs:line 55 at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.ICommonService`1Proxy_2.FindById(Object id) at Asi.Scheduler.Controllers.CommonServiceController.Get(String entityName, String entityId) in C:\Builds\208\ScrumV3\sp137_Main10\Sources\MainFoundation\imis.net\Packages\Service\Asi.Scheduler.Common\Controllers\CommonServiceController.cs:line 165

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" });

REST API with pass-through auth - how do I get logged in user's ID or username?

If I'm using the pass-through auth, with the Request Verification Token, what's the best way to get the ID or username for the currently authenticated user? Thanks! Brian