Problem REST API in AwareIM

If you think that something doesn't work in Aware IM post your message here
Post Reply
cishpix
Posts: 183
Joined: Fri Nov 06, 2015 5:07 am
Location: Indonesia

Problem REST API in AwareIM

Post by cishpix »

Currently I'm still try CRUD in REST Service from AwareIM and the other application is ERPNext.

There are 2 problems and I'm sure it is AwareIM issue because I have test it in other application like Postman
  1. ERPNext will respond the data as array (see the below) when we call GET via REST API service from AwareIM
    the data respond as array when call via REST API
    the data respond as array when call via REST API
    pic1.png (32.01 KiB) Viewed 12230 times
    If we want to get full details of the records then we need include the name into "Base URL" of REST Service in AwareIM. The reply like below
    detail respond when we call a name
    detail respond when we call a name
    pic2.png (145.88 KiB) Viewed 12230 times
    In AwareIM, I want to show all the data as query table. So, I design a process to call first REST Service to GET all the data (array), the second REST Service will called in rule when it get the reply from first REST Service. The problem is AwareIM need around 1 minute to get all details and it just show loading icon. How can I solve it?
  2. When I delete a data, I got an error in AwareIM (see below). The issue can appear when the "Base URL" of Rest Service contain space. How to solve this issue?
    error when delete a record contain space
    error when delete a record contain space
    pic3.png (49.21 KiB) Viewed 12230 times
    It will run well if not contain space.
  3. See the detail respond, how can I input "2020-01-17 18:20:11.982003" into timestamp?
Regards,

Suwandy
-----------------
Kisaran - Indonesia
himanshu
Posts: 729
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: Problem REST API in AwareIM

Post by himanshu »

try to encode URL while posting... like for spaces %20 and for other special characters.
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
cishpix
Posts: 183
Joined: Fri Nov 06, 2015 5:07 am
Location: Indonesia

Re: Problem REST API in AwareIM

Post by cishpix »

himanshu wrote:try to encode URL while posting... like for spaces %20 and for other special characters.
Thanks for your respond and it works (item #2)

Still stuck on item #1 and item #3, any idea?
Regards,

Suwandy
-----------------
Kisaran - Indonesia
himanshu
Posts: 729
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: Problem REST API in AwareIM

Post by himanshu »

item#3
Question: Which database you are using?

if your database MS SQL you just need to change the specific attribute datatype to "datetime2". This will allow saving the your datetime in format (eg: "YYYY-MM-DD hh:mm:ss.nnnnnnn") it means it includes nanoseconds.
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
cishpix
Posts: 183
Joined: Fri Nov 06, 2015 5:07 am
Location: Indonesia

Re: Problem REST API in AwareIM

Post by cishpix »

himanshu wrote:item#3
Question: Which database you are using?
Hi Himanshu, thanks for your respond. I use MariaDB
Regards,

Suwandy
-----------------
Kisaran - Indonesia
himanshu
Posts: 729
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: Problem REST API in AwareIM

Post by himanshu »

Hi Lie,

I believe it supports too...
as said below
https://mariadb.com/kb/en/datetime/
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
cishpix
Posts: 183
Joined: Fri Nov 06, 2015 5:07 am
Location: Indonesia

Re: Problem REST API in AwareIM

Post by cishpix »

himanshu wrote: I believe it supports too...
as said below
https://mariadb.com/kb/en/datetime/
Many thanks for you Himanshu. I have try set the "SQL Type" to datetime(6) (for the attribute) but unfortunately it doesn't work. At least, it doesn't give any error for the timestamp.

I Shall try take a time to look in details.

Do you know how to solve the item#1?
Regards,

Suwandy
-----------------
Kisaran - Indonesia
Post Reply