Ask a Question

REST Endpoint to Authenticate Users

I am looking for the endpoint to authenticate members. I have used this endpoint https://xxxxxx.imiscloud.com/asi.scheduler_iaei/Token To receive the token to call REST services. It doesn't appear to work as an endpoint for general users.

Unsupported Media Error -- Can we get a simple C# PUT example that uses something other than REST SHARP?

I couldn't resist formatting my question in the Bruce Wilson style (that he hat-tipped back to me. Thanks Bruce ha)... Can we get a simple C# REST PUT example that does not use REST Sharp. Maybe something that uses HttpClient? I get Unsupported Media Type no matter what I do. I think it has to do with Encoding or Charset but I don't know which one to send.... This code is the latest I produced to get the Unsupported Media Error static async Task createEvent(string id) { //ZEX18AB197 //ZPEX182820 var settings = new JsonSerializerSettings(); settings.TypeNameHandling = TypeNameHandling.Objects; // Create the client using (var client = new HttpClient()) { // Format headers client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); //client.DefaultRequestHeaders.AcceptCharset.Add(new StringWithQualityHeaderValue("UTF8")); // Request token, and append to headers await AddTokenToHeaders(client); EventData eventNew = new EventData(); var responseEvent = await client.GetAsync(baseUrl + EVENT_REST_QUERY + "/" + id); if (responseEvent.IsSuccessStatusCode) { // Deserialize response to DataContract eventNew = await responseEvent.Content.ReadAsAsync<EventData>(); } EventFunctionData eventFunction = new EventFunctionData(); eventFunction.Description = "TestFunc3"; eventFunction.EventFunctionCode = "TestFunc3"; eventFunction.EventFunctionId = "TestFunc3"; eventNew.Functions.Add(eventFunction); string Serialized = JsonConvert.SerializeObject(eventNew); HttpContent content = new StringContent(Serialized, System.Text.Encoding.Unicode, "application/json"); //byte[] encodedBytes = System.Text.Encoding.UTF8.GetBytes(json); //System.Text.Encoding.Convert(System.Text.Encoding.UTF8, System.Text.Encoding.Unicode, encodedBytes); var response = await client.PutAsync(baseUrl + EVENT_REST_QUERY + "/" + id, content); if (response.IsSuccessStatusCode) { // Deserialize response to DataContract eventNew = await response.Content.ReadAsAsync<EventData>(); } } } This results in a Unsported Media Type error on PUT Thanks

REST API: Create User & Password

Is it possible to Create a User and insert a Password for a new contact? If so, can you provide some sample code? This is actually a follow up to a Curl question posted by Jack.

REST API The requested resource does not support http method 'OPTIONS'

I am trying to make a REST API call using AJAX to IMIS using bearer token (which is retrieved using C#) from another site. In other words I am making REST API call to IMIS scheduler endpoint from a different domain. I know I need to handle the CORS issue so I put in the statements like <add name="Access-Control-Allow-Origin" value="*" /> <add name="Access-Control-Allow-Methods" value="*" /> .... and stuff like that. But I am still getting 405 ERROR from the response saying "The requested resource does not support http method 'OPTIONS'". Does anyone get the same issue and have that resolved successfully ?

Getting 405 Error on Party endpoint using Postman/PUT

Hello, I have a valid Bearer token under the MANAGER account, and I can do GETs all day, but when I try to do the simplest of PUT operations, I'm getting a "The requested resource does not support http method 'PUT'." message. I'm using GitHub examples from a previous Innovations. Here are my Raw headers: {"$type": " Asi.Soa.Membership.DataContracts.PersonData, Asi.Soa.Membership.Contracts", "PersonName": { "$type": "Asi.Soa.Membership.DataContracts.PersonNameData, Asi.Contracts", "FirstName": "Douglas", "InformalName": "Dougie", } I'm using the iMIS demo DB. I've messed around a bunch with the web config, thinking maybe the PUT command was not being preflighted or CORS approved, but everything looks good there. Also, can anyone help with the derivation of the $type parameter, is it needed/required for PUT requests, where is the value derived from and how do I know if I'm using the proper $type values? I've messed around a bunch with those as well, but no luck. One other question, is there a reason I can't do a Get from the Organization endpoint? Just 500 errors on that. I'm using Axios/Vue to create an app, and Axios is also giving me the same error as Postman when trying a Put operation with similar parameters. Appreciate everyone's help, I'm hoping it's something simple I'm overlooking. Thanks.

Can we get a simple pure Javascript example of Adding the RequestVerificationToken to headers for GET

Can we get an quick example of GET a Party with Authorization token added to request header in Javascript for demonstration purposes? Is the Header token key name "RequestVerificationToken" or is it "Authorization"?

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?

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