API - BookIn  Topic is solved

Discussions relating to the REST API of Jiwa 7.

API - BookIn

Postby Riyaz » Sat Jun 30, 2018 1:00 pm

Hi

Need some help finding the api details for BookIn related functions, such as creating new BookIn etc, I couldnt find any reference under this api link http://myjiwaapi/swagger-ui/
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: API - BookIn

Postby Mike.Sheen » Sat Jun 30, 2018 1:08 pm

Hi Riyaz,

We only added book-ins and shipments to the api recently - so dev builds from 07.01.01 onwards will have them - you can get a dev build from the Development Stream tab of our downloads page.

If you just want to take a look without installing anything, then https://api.jiwa.com.au is our demo site on the latest dev build - the SwaggerUI there will show the BookIns routes. You can play with this yourself - the username Admin with password of password should be used for authentication.

Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: API - BookIn

Postby Riyaz » Sat Jun 30, 2018 2:09 pm

Hi Mike

Thanks for the quick response, can you pls also advise I. When this build will be released to the public version.
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: API - BookIn

Postby Mike.Sheen » Sat Jun 30, 2018 5:47 pm

Riyaz wrote:Thanks for the quick response, can you pls also advise I. When this build will be released to the public version.


I can't give you an exact date, but I expect to to be within the next 2 or 3 weeks.

Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: API - BookIn

Postby Riyaz » Tue Jul 03, 2018 12:13 pm

Hi Mike

Have updated or jiwa to version 7.01.05, but the api swagger wont show the BookIn still like it does on the api.jiwa.com.au link , is there anything else to be done to activate it? Pls advise
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: API - BookIn

Postby Mike.Sheen » Tue Jul 03, 2018 12:52 pm

The first thing which comes to mind is If you're using your own copy of the REST API plugin, then we don't touch that when a database is upgraded - we only update our standard REST API plugin code - so if that plugin is not enabled then the new routes won't appear.

Is our standard REST API Plugin enabled in your database? Or are you using your own version/copy?
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: API - BookIn

Postby Riyaz » Tue Jul 03, 2018 1:23 pm

Yes using REST API, noticed that it got disabled after upgrade, had enabled it again, and have also restarted the service. But still the BookIns wont show under auth in Swagger like it does for api.jiwa.com.au link. Pls see screenshots attached
Attachments
jiwaapi2.png
jiwaapi1.png
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: API - BookIn

Postby Mike.Sheen » Tue Jul 03, 2018 1:24 pm

Can you show me the plugin maintenance form with the REST API plugin loaded?
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: API - BookIn

Postby Riyaz » Tue Jul 03, 2018 1:30 pm

Have attached it
Attachments
jiwaapi3.png
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: API - BookIn

Postby Mike.Sheen » Tue Jul 03, 2018 1:47 pm

Ok - can you look around line 1395 in the code of that plugin, you should see a block of code like this:

Code: Select all
#region "Landed Cost"
   #region "BookIns"
      #region "{Main}"
         AppHost.RegisterService<LandedCostBookInServices>();
         AppHost.Routes.Add(typeof(LandedCostBookInGETRequest), "/BookIns/{BookInID}", "GET", "Retrieves a book in.", "");
         AppHost.Routes.Add(typeof(LandedCostBookInPATCHRequest), "/BookIns/{BookInID}", "PATCH", "Updates a book in.", "");
         AppHost.Routes.Add(typeof(LandedCostBookInSAVERequest), "/BookIns/Save", "GET", "Saves a stateful book in.", "Requires a request header of 'jiwa-stateful' be set to 'true', and also that a stateful book in item exists.");
         AppHost.Routes.Add(typeof(LandedCostBookInABANDONRequest), "/BookIns/Abandon", "DELETE", "Abandons a stateful book in.", "Requires a request header of 'jiwa-stateful' be set to 'true', and also that a stateful book in item exists.");
         AppHost.Routes.Add(typeof(LandedCostBookInCREATEFromShipmentIDRequest), "/BookIns/FromShipmentID/{ShipmentID}", "POST", "Creates a book in from the supplied shipment id.", "");
         AppHost.Routes.Add(typeof(LandedCostBookInCREATEFromShipmentNoRequest), "/BookIns/FromShipmentNo/{ShipmentNo}", "POST", "Creates a book in from the supplied shipment no.", "");
         AppHost.Routes.Add(typeof(LandedCostBookInACTIVATERequest), "/BookIns/Activate/{BookInID}", "POST", "Activates a book in.", "");
      #endregion


Do you see that? Where it's adding the bookin routes?
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Next

Return to REST API

Who is online

Users browsing this forum: No registered users and 2 guests