Sending input parameters

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Bizagi from external applications > Bizagi API > OData services > Basic concepts >

Sending input parameters

Overview

Bizagi features OData services, which handle a comprehensive set of resources related to the Experience design, as described at Bizagi API.

For certain scenarios, typically where you need invoke a service via an HTTP POST, you may need to send out specific information while ensuring that the format and structure you use, complies to what is expected by Bizagi.

Note that the most common data type is Text, which does not need any special treatment or format (other than obviously specifying values inside quotes).

 

This section describes how to send information when considering Dates (i.e, typically the DateTime data type), Files in general (either the Image or Upload data type), or other most common/simpler such as Booleans or Numeric.

 

Values and format for common data types

Whenever sending values for common data types, consider:

For parameters of Boolean type, use "true" or "false" values.

For parameters of Numeric type, specify numbers without any formatting regarding thousands separator and use a dot (.) as decimal separator.

 

Values and format for dates

For parameters of DateTime type, specify dates by using the standard format for interoperability, either in two forms:

To send a date without a specific time, use YYYY-MM-DD (year, month, day).

 

OData_SendDate2

 

To send a date while considering an exact time, use YYYY-MM-DDThh:mm:ss, appending at the end the Time Zone Designator.

The Time Zone Designator takes up 6 characters and starts off with a + or - sign indicating the UTC time zone. For example: +00:00 for time based in London (UK),  +05:30 for time based in Delhi (India), or  -07:00 for time based in San Francisco (US).

 

OData_SendDate1

Consider:

YYYY-MM-DD implies year, month and day, the same as detailed above.

T represents the time component as used in standard ISO 8601 (https://www.w3.org/TR/NOTE-datetime.html).

As detailed in the example at the link, 1994-11-05T08:15:30-05:00 would  correspond to November 5, 1994, 8:15:30 am, US Eastern Standard Time (US Eastern Standard Time being UTC -5).

 

Values and format for images and uploads

For parameters of Image or Upload type, the same format is employed which considers use of bytes encoded in base 64.

The difference when handling Images when compared to Uploads, apart from the fact that an image (*.png, *.jpg, etc) is a subset of an upload (any file with any extension), is simply that Image attributes in Bizagi can hold up a maximum of 1 file; while an Upload may hold unlimited number of files.

 

OData_Files

 

This means that the example above is applicable to data of the type Upload exclusively, in which you would send out values according to this format:

{

 "startParameters": [

         {

                   "xpath": "ContractManagement.Attachments",

         "files": [

                             {

                                 "fileName": "MyFile.jpg",

                                 "data": "/9j/4Q3BRXhpt3jj5Sv...........p9U039vxSXlaSSn/9k="

                             },

                       {

                                 "fileName": "MyDocument.doc",

                                 "data": "/9j/4Q3BRXhpt3jj5Sv...........p9U039vxSXlaSSy/6k="

                       }

                 ]

           }

 ]

}

 

A similar example but applicable to Image data types would be:

{

 "startParameters": [

         {

                   "xpath": "PolicyUnderwriting.Customer.Photo",

         "files": [

                             {

                                 "fileName": "MyPhoto.png",

                                 "data": "/9j/52Hy6Xhpt3jj5Sv...........p9U039vxSXlaSSn/9k="

                             }

                 ]

           }

 ]

}

 

Consider:

fileName: Should specify the name of the file or image, including its extension.

data: Should have the value as the base 64 encoding for the bytes of the file or image.

 

Values and format for entities and collections

Whenever sending values which are entity references in Bizagi (i.e, the Entity data type) or for the Collection data type, consider:

Entities simply receive the value or GUID these should take, as queried beforehand as described at Related entities values.

Collections may receive multiple rows, while making sure that the values for each of the columns are explicitly defined, as queried beforehand as described at Columns in collections.