Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

C. Get By ID

a. Using HTTPs

URL :  { REST API Host } / app / { Winbooks OM } / { ID } / Folder/ { FolderCode } ? {parameter : optional}
Method : GET
Header :
    Authorization : Bearer {access_token}
    Accept : application/json

The example below will get the CUSTOMER with ID 79A2E56E-2BE7-4216-BA75-9F9400FB45BD in folder "PARFIWEB_DEMO"

...

//GET ALL THE ACTIVE AND UNLOCK CUSTOMER WITH PAGINATION BY 5            
ICriteria criteria = new CustomerDAO().CreateCriteria();
criteria.Add(Condition.Eq(Customer.Names.IsLocked, false ));
criteria.Add(Condition.Eq(Customer.Names.IsHidden, false ));
criteria.SetFirstResult(1);
criteria.SetMaxResults(5);
IList<Customer> customerCollection = folderPARFIWEB.GetFilterAll<Customer>(criteria);

c. Operators in the ExecuteCriteria

public enum Operator : short
{
Eq = 0,
EqProperty = 1,
Between = 2,
Ge = 3,
GeProperty = 4,
Gt = 5,
GtProperty = 6,
In = 7,
IsNotNull = 8,
IsNotEmpty = 9,
IsNull = 10,
IsEmpty = 11,
IsNotNumeric = 12,
IsNumeric = 13,
Le = 14,
LeProperty = 15,
Like = 16,
Lt = 17,
LtProperty = 18,
Or = 19,
And = 20,
Not = 21,
Select = 22,
Distinct = 23,
SelectTop = 24,
Avg = 25,
Count = 26,
First = 27,
Last = 28,
Max = 29,
Min = 30,
Sum = 31,
GroupBy = 32,
Having = 33,
UCase = 34,
LCase = 35,
Mid = 36,
Len = 37,
Round = 38,
Now = 39,
Format = 40,
CaseWhen = 41,
Cast = 42,
Constant = 43,
FromAlias = 44,
RowNumber = 45,
DateAdd = 46,
DateDiff = 47,
All = 48,
RowCount = 49,
Exists = 50,
Concat = 51,
Left = 52,
Right = 53,
Function = 54,
Abs = 55,
SubQuery = 56,
LTrim = 57,
RTrim = 58,
DatePart = 59,
Union = 60,
UnionAll = 61,
Grouping = 62,
Rank = 63,
DenseRank = 64
}

E. Chunking data

In some cases, the result is a big data with thousand objects inside. Process big data in one time will make API server slow down and also hard for client when getting result. So we need chunking data in multipart.

...