Report Table

The current methods implemented for report tables in the ProcessMaker API designer are listed below:

Report Table:

NameDescriptionType Value
rep_uidReport table UIDStringString
rep_tab_nameReport table nameString"name" or "pmt_NAME" (Text string)
rep_tab_dscReport table descriptionString"Description of Report Table" (Text String)
rep_tab_connectionConnection of the report table, possible values are: "workflow", "rp" and Database connectionsString"workflow" or "h348fd..." (Text String)
rep_tab_typeReport table type, possible values are: "NORMAL" or "GRID"String"NORMAL" ("NORMAL" and "GRID") (unique allowed values)
rep_tab_gridBase grid UID where the report table will be generatedInteger"tr8945m..." (String of 32 characters)
fieldsArray of the report table columnsArrayCheck the next fields
Field Variables
fld_dynField name from a DynaformString"Accepted" (Text String)
fld_nameField name for the table created in mysqlString"Accepted" (Text String)
fld_labelLabel name of the field for the GUI in PMString"Accepted" (Text String)
fld_typeField type in mysql, values: "BOOLEAN", "TINYINT", "SMALLINT", "INTEGER", "BIGINT", "DOUBLE", "FLOAT","REAL", "DECIMAL", "CHAR", "VARCHAR", "LONGVARCHAR", "DATE", "TIME", "DATETIME"String"VARCHAR" (String type mysql field)
fld_sizeField size in mysqlInteger"23" (Numeric)

Get Report Tables List: GET project/{prj_uid}/report-tables

Gets the list of Report Tables in a project.

GET /api/1.0/{workspace}/project/{prj_uid}/report-tables

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of report table objects

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "rep_uid": "12965606852f8dcf2154e21097825813",
        "rep_tab_name": "PMT_EJEMPLO",
        "rep_tab_description": "My table description",
        "rep_tab_class_name": "PmtExample",
        "rep_tab_connection": "workflow",
        "rep_tab_type": "NORMAL",
        "rep_tab_grid": "",
        "rep_num_rows": 2,
        "fields":
        [
           {
               "fld_uid": "64688692552f8de120c57d0031739165",
               "fld_index": "0",
               "fld_name": "APP_UID",
               "fld_description": "APP_UID",
               "fld_type": "VARCHAR",
               "fld_size": "32",
               "fld_null": "0",
               "fld_auto_increment": "0",
               "fld_key": "1",
               "fld_foreign_key": "0",
               "fld_foreign_key_table": "",
               "fld_dyn_name": "",
               "fld_dyn_uid": "",
               "fld_filter": "0"
           }
        ]
     }
 ]

Get Report Table: GET project/{prj_uid}/report-table/{rep_uid}

Gets a specified Report Table.

GET /api/1.0/{workspace}/project/{prj_uid}/report-table/{rep_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
rep_uidStringReport table UID

Result:

TypeDescription
objectReturns a report table object

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "rep_uid": "12965606852f8dcf2154e21097825813",
        "rep_tab_name": "PMT_EJEMPLO",
        "rep_tab_description": "descripcion de la tabla",
        "rep_tab_class_name": "PmtEjemplo",
        "rep_tab_connection": "workflow",
        "rep_tab_type": "NORMAL",
        "rep_tab_grid": "",
        "rep_num_rows": 2,
        "fields":
        [
           {
               "fld_uid": "64688692552f8de120c57d0031739165",
               "fld_index": "0",
               "fld_name": "APP_UID",
               "fld_description": "APP_UID",
               "fld_type": "VARCHAR",
               "fld_size": "32",
               "fld_null": "0",
               "fld_auto_increment": "0",
               "fld_key": "1",
               "fld_foreign_key": "0",
               "fld_foreign_key_table": "",
               "fld_dyn_name": "",
               "fld_dyn_uid": "",
               "fld_filter": "0"
           }
        ]
     }
 ]

Populate Report Table: GET project/{prj_uid}/report-table/{rep_uid}/populate

Repopulates a Report Table with case data. This endpoint deletes the contents of a specified Report Table and then refills it with data from the cases. This endpoint can be called if the data in a Report Table gets out of sync with the data from the cases.

GET /api/1.0/{workspace}/project/{prj_uid}/report-table/{rep_uid}/populate

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
rep_uidStringReport table UID

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)

Get Report Table Data: GET project/{prj_uid}/report-table/{rep_uid}/data

Gets the data from a Report Table. Returns all the rows in a Report Table and a count of the number of rows.

GET /api/1.0/{workspace}/project/{prj_uid}/report-table/{rep_uid}/data

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
rep_uidStringReport table UID

Result:

TypeDescription
objectReturns an object containing data about the report table

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
     "rows": [
        {
            "app_uid":    "16154487852d6e4a63e8974075801312",
            "app_number": "652",
            "app_status": "DRAFT",
            "name":       "Jane Doe",
            "address":    "2132 W. Oak Av.",
            "__index__":  "lqaeqZWWpJyooqbFmNGZ0aOnxpqlnKSdq5aanJajnqY"
        },
        {
            "app_uid": "29839101252b8a4f21dfb22075517639",
            "app_number": "647",
            "app_status": "DRAFT",
            "name":       "Joh Roe",
            "address":    "955 S. Birch St.",
            "__index__": "l6mlp5qTnJaioqbDms2Z1p+lxcjOl6Kdq5aXnZymoK0"
        }
     ],
     "count": 2
 }

Create Report Table: POST project/{prj_uid}/report-table

Creates a new Report Table.

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Structure:

POST /api/1.0/{workspace}/project/{prj_uid}/report-table

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
rep_tab_nameStringReport table name
rep_tab_dscStringReport table description
rep_tab_connectionStringReport table connection, possible values: "workflow", "rp" and database connection
rep_tab_typeStringReport table type, possible values: "NORMAL" or "GRID"
fieldsArrayColumns in the report table. Check their variables in the main table.

Optional Fields:

NameTypeDescription
rep_tab_gridStringBase grid UID where the report table was generated.

Result:

TypeDescription
objectReturns an object containing data about the new repot table.

Example:

Request

 Content-Type: application/json
 [
    {
        "rep_tab_name" : "PMT_TABLA",
        "rep_tab_dsc" : "descripcion de la tabla",
        "rep_tab_connection" : "workflow",
        "rep_tab_type" : "NORMAL",
        "rep_tab_grid" : "",
        "fields":
            [
                {
                    "fld_dyn"  : "combito",
                    "fld_name" : "COMBO1",
                    "fld_label": "COMBO1",
                    "fld_type" : "VARCHAR",
                    "fld_size" : 32
                 },
                 {
                     "fld_name" : "CAMPO",
                     "fld_label": "CAMPITO",
                     "fld_type" : "VARCHAR",
                     "fld_size" : 200
                 }
            ]
     }
 ]

Response

 201 (Created)
 {
    "rep_uid": "72024958352f8f4b5b29e68065335979",
    "rep_tab_name": "PMT_COCHALINLI",
    "rep_tab_description": "table description",
    "rep_tab_class_name": "PmtCochalinli",
    "rep_tab_connection": "workflow",
    "rep_tab_type": "NORMAL",
    "rep_tab_grid": "",
    "rep_num_rows": 2,
    "fields": [
                {
                    "fld_uid": "43224891252f8f4b5b3e7d5064126010",
                    "fld_index": "0",
                    "fld_name": "APP_UID",
                    "fld_description": "APP_UID",
                    "fld_type": "VARCHAR",
                    "fld_size": "32",
                    "fld_null": "0",
                    "fld_auto_increment": "0",
                    "fld_key": "1",
                    "fld_foreign_key": "0",
                    "fld_foreign_key_table": "",
                    "fld_dyn_name": "",
                    "fld_dyn_uid": "",
                    "fld_filter": "0"
                },
                {
                    "fld_uid": "88732448352f8f4b5b54e40018186789",
                    "fld_index": "1",
                    "fld_name": "APP_NUMBER",
                    "fld_description": "APP_NUMBER",
                    "fld_type": "INTEGER"
                    "fld_size": "11",
                    "fld_null": "0",
                    "fld_auto_increment": "0",
                    "fld_key": "0",
                    "fld_foreign_key": "0",
                    "fld_foreign_key_table": "",
                    "fld_dyn_name": "",
                    "fld_dyn_uid": "",
                    "fld_filter": "0"
                },
                {
                    "fld_uid": "28542848352f8f4b5b66c73025097960",
                    "fld_index": "2",
                    "fld_name": "APP_STATUS",
                    "fld_description": "APP_STATUS",
                    "fld_type": "VARCHAR",
                    "fld_size": "10",
                    "fld_null": "0",
                    "fld_auto_increment": "0",
                    "fld_key": "0",
                    "fld_foreign_key": "0",
                    "fld_foreign_key_table": "",
                    "fld_dyn_name": "",
                    "fld_dyn_uid": "",
                    "fld_filter": "0"
                },
                {
                    "fld_uid": "46525369552f8f4b5b7ce74071402298",
                    "fld_index": "3",
                    "fld_name": "COMBO1",
                    "fld_description": "COMBO1",
                    "fld_type": "VARCHAR",
                    "fld_size": "32",
                    "fld_null": "1",
                    "fld_auto_increment": "0",
                    "fld_key": "0",
                    "fld_foreign_key": "0",
                    "fld_foreign_key_table": "",
                    "fld_dyn_name": "combito",
                    "fld_dyn_uid": "combito-dropdown",
                    "fld_filter": "0"
                },
                {
                    "fld_uid": "85085540252f8f4b5b90f02097502798",
                    "fld_index": "4",
                    "fld_name": "CAMPO",
                    "fld_description": "CAMPITO",
                    "fld_type": "VARCHAR",
                    "fld_size": "200",
                    "fld_null": "1",
                    "fld_auto_increment": "0",
                    "fld_key": "0",
                    "fld_foreign_key": "0",
                    "fld_foreign_key_table": "",
                    "fld_dyn_name": "",
                    "fld_dyn_uid": "",
                    "fld_filter": "0"
                }
            ]
 }

Update Report Table: PUT project/{prj_uid}/report-table/{rep_uid}

Updates a specified Report Table.

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Structure:

PUT /api/1.0/{workspace}/project/{prj_uid}/report-table/{rep_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
rep_uidStringReport table UID

Required Fields:

NameTypeDescription
fieldsArrayColumns in the report table. Check their variables in the main table.

Optional Fields:

NameTypeDescription
rep_tab_dscStringReport table description

Result:

TypeDescription
emptyNo return

Example:

Request

 {
    "rep_tab_dsc" : "table description",
    "fields" : [
      {
          "fld_name" : "CAMPO",
          "fld_label" : "CAMPITO",
          "fld_type" : "VARCHAR",
          "fld_size" : 200
       }
    ]
 }

Response

 200 (OK)

Delete a Report Table: DELETE project/{prj_uid}/report-table/{rep_uid}

Deletes a Report Table.

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Structure:

DELETE /api/1.0/{workspace}/project/{prj_uid}/report-table/{rep_uid}

Parameters:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
rep_uidStringReport table UID

Result:

TypeDescription
emptyNo return

Example:

Response

 200 (OK)