PM Tables

The following REST endpoints are used to manage PM tables in ProcessMaker:

Permissions:

These endpoints need the following permission:

Permission Needed
PM_SETUP_PM_TABLES

PM Tables:

Name Description Type Value
pmt_tab_name PM Table name String "name" o "pmt_NAME"(String)
pmt_tab_dsc PM Table description String "PM table description"(String)
fields PM Table fields Array
fld_dyn Field name known in a DynaForm String "Acceptance"(String)
fld_name Field name for the MySQL table creation String "ACCEPTED" (String)
fld_label Field label in the PM graphic String "PM Table description"(String)
fld_type MySQL field type, which may be: "BOOLEAN", "TINYINT", "SMALLINT", "INTEGER", "BIGINT", "DOUBLE", "FLOAT", "REAL", "DECIMAL", "CHAR", "VARCHAR", "LONGVARCHAR", "DATE", "TIME" or "DATETIME" String "VARCHAR"(String MySQL type field)
fld_size MySQL field size Integer 23 (Numeric)


Available methods:

PM Tables List: GET /pmtable

Get a list of the PM tables in the workspace. It does not include any Report Tables.

Permission:

Users must have the PM_SETUP_PM_TABLES permission assigned to their role to have access to the endpoint information

Structure:

GET /api/1.0/{workspace}/pmtable

URL Parameters:

Name Description Example
workspace Workspace name /api/1.0/workflow/pmtable

Result:

If successful, the HTTP status is set to 200 (OK) and an array of PM Table objects is returned:

[ Start array.
{ Start PM Table object.
"pmt_uid", Unique ID of the PM Table.
"pmt_tab_name", Table in the wf_{workspace} database.
"pmt_tab_description", Description of the PM Table.
"pmt_tab_class_name", PHP class name for the PM Table.
"pmt_num_rows", Number of records in the PM Table.
"fields": [ An array of fields in the PM Table.
{ Start Field object.
"fld_uid", Unique ID of the field.
"fld_index": Index number of the field, counting from the number 0.
"fld_name": Name of the field in the database.
"fld_description": Label of the field.
"fld_type": Type of the field.
"fld_size": Field size.
"fld_null": Set to "1" if a NULL (empty) value is allowed. Otherwise, set to "0".
"fld_auto_increment": Set to "1" if the field will be auto-incremented. Otherwise, set to "0".
"fld_key": Set to "1" if a key field, meaning that its values are unique. Otherwise, set to "0".
"fld_table_index": Set to "1" if the field will be indexed. Otherwise, set to "0".
}, End Field object.
... Any additional Field objects.
] End array of Field objects.
}, End PM Table object.
... Any additional PM Table objects.
] End array of PM Table objects.

For example:

[
   {
      "pmt_uid":             "33532851355ef56860e8297082884997",
      "pmt_tab_name":        "PMT_CLIENTS",
      "pmt_tab_description": "Table with information about clients",
      "pmt_tab_class_name":  "PmtClients",
      "pmt_num_rows":        28,
      "fields":
      [
         {
            "fld_uid":            "22501963155ef568633c460054115944",
            "fld_index":          "0",
            "fld_name":           "ID",
            "fld_description":    "ID",
            "fld_type":           "BIGINT",
            "fld_size":           "8",
            "fld_null":           "0",
            "fld_auto_increment": "1",
            "fld_key":            "1",
            "fld_table_index":    "0"
         },
         {
            "fld_uid":            "58722687755ef568650b502051774480",
            "fld_index":          "1",
            "fld_name":           "COMPANY_NAME",
            "fld_description":    "CompanyName",
            "fld_type":           "VARCHAR",
            "fld_size":           "50",
            "fld_null":           "0",
            "fld_auto_increment": "0",
            "fld_key":            "0",
            "fld_table_index":    "0"
         }
      ]
   }
]

PHP Example:

Print out the PM Tables and the fields in each table.

$oToken = pmRestLogin("IAIERTORPBHIJZXEPNSUANXLKYPKODJU", "71308091055cb7094026089092397336", "mary", "p4sSw0rD");

$url = "/api/1.0/workflow/pmtable";
$oRet = pmRestRequest("GET", $url, null, $oToken->access_token);

if ($oRet->status == 200) {
   foreach ($oRet->response as $oPmTable) {
      print "Table {$oPmTable->pmt_tab_name}:\n";
      foreach ($oPmTable->fields as $oField) {
         print "\t{$oField->fld_name} ({$oField->fld_type})\n";
      }
   }
}

Get PM Table Structure: GET /pmtable/{pmt_uid}

Get the structure from a specified PM Table, including a list of its fields and their properties.

Permission:

Users must have the PM_SETUP_PM_TABLES permission assigned to their role to have access to the endpoint information

Structure:

GET /api/1.0/{workspace}/pmtable/{pmt_uid}

URL Parameters:

Name Description Example
workspace Workspace name /api/1.0/workflow/pmtable/33532851355ef56860e8297082884997
pmt_uid Unique ID of the PM Table /api/1.0/workflow/pmtable/33532851355ef56860e8297082884997

Result:

If successful, the HTTP status is set to 200 (OK) and a PM Table object is returned, such as:

{
   "pmt_uid":             "33532851355ef56860e8297082884997",
   "pmt_tab_name":        "PMT_CLIENTS",
   "pmt_tab_description": "Table with information about clients",
   "pmt_tab_class_name":  "PmtClients",
   "pmt_num_rows":        28,
   "fields":
   [
      {
         "fld_uid":            "22501963155ef568633c460054115944",
         "fld_index":          "0",
         "fld_name":           "ID",
         "fld_description":    "ID",
         "fld_type":           "BIGINT",
         "fld_size":           "8",
         "fld_null":           "0",
         "fld_auto_increment": "1",
         "fld_key":            "1",
         "fld_table_index":    "0"
      },
      {
         "fld_uid":            "58722687755ef568650b502051774480",
         "fld_index":          "1",
         "fld_name":           "COMPANY_NAME",
         "fld_description":    "CompanyName",
         "fld_type":           "VARCHAR",
         "fld_size":           "50",
         "fld_null":           "0",
         "fld_auto_increment": "0",
         "fld_key":            "0",
         "fld_table_index":    "0"
      }
   ]
}

PHP Example:

Print out the number of records in a PM Table and list the fields in the PM Table.

$oToken = pmRestLogin("IAIERTORPBHIJZXEPNSUANXLKYPKODJU", "71308091055cb7094026089092397336", "mary", "p4sSw0rD");

$tableId = '33532851355ef56860e8297082884997';
$url = "/api/1.0/workflow/pmtable/$tableId";
$oRet = pmRestRequest("GET", $url, null, $oToken->access_token);

if ($oRet->status == 200) {
   print "Table {$oRet->response->pmt_tab_name} has {$oRet->response->pmt_num_rows} records\n";
}

Get PM Table Data: GET /pmtable/{pmt_uid}/data

Get the data (records) from a PM table.

Permission:

Users must have the PM_SETUP_PM_TABLES permission assigned to their role to have access to the endpoint information

Structure:

GET /api/1.0/{workspace}/pmtable/{pmt_uid}/data

URL Parameters:

Name Description Example
workspace Workspace name /api/1.0/workflow/pmtable/33532851355ef56860e8297082884997/data
pmt_uid Unique ID of the PM Table. /api/1.0/workflow/pmtable/33532851355ef56860e8297082884997/data

Optional Parameters:

Name Description Example
filter Value that will be search in all the PMTable's fields. /api/1.0/workflow/pmtable/33532851355ef56860e8297082884997/data?filter=555655656
q={where:spec}stringThis is a generic way to search via the filterType "where" (only this one is supported) and where
spec is the specification of the filter, for example for a where filter, this is a logical condition that the results must match
For example, GET /api/1.0/workflow/pmtable/33532851355ef56860e8297082884997/data?q={"where": {"name": "Felix", "lastname": "Mondaca"}} would return the row of the PM Table that has the values: "Felix", "Mondaca" in the fields "name" and "lastname" respectively .

Result:

If successful, the HTTP status is set to 200 (OK) and an object is returned with the rows of data in the PM Table and the number of rows.

For example:

{
   "rows": [
      {
         "id":           "1",
         "company_name": "Western Fuels Corp.",
         "address":      "235 W. Elm St, Greenwood, NC 34928",
         "has_contract": "1",
         "__index__":    "lg"
      },
      {
         "id":           "2",
         "company_name": "Wrightspeed Transport",
         "address":      "2845 MLK Drive, Los Angeles, CA 28764",
         "has_contract": "0",
         "__index__":    "lw"
      },
      {
         "id":           "3",
         "company_name": "Albemarle Chemical",
         "address":      "2810 E. 26th St., Brooklyn, NY 98245",
         "has_contract": "1",
         "__index__":    "mA"
      }
   ],
   "count": 3
}

Note: The field names are automatically converted to lowercase.

Note: Integers, floating-point numbers (real numbers) and boolean values are converted to strings. In the above example, the id is an integer and the has_contract is a boolean in MySQL. Also, the __index__ field is automatically created by MySQL to index the PM Table.

PHP Example:

Print out the records in a PM Table in an HTML table. First get the structure of the PM Table with GET /api/1.0/workflow/pmtable/{pmt_uid} in order to print out the label (description) of each field in the headers of the HTML table. Then, get the records with GET /api/1.0/workflow/pmtable/{pmt_uid}/data and print out each record as a record in the HTML table.

$oToken = pmRestLogin("IAIERTORPBHIJZXEPNSUANXLKYPKODJU", "71308091055cb7094026089092397336", "mary", "p4sSw0rD");

$tableId = '33532851355ef56860e8297082884997';
$url = "/api/1.0/workflow/pmtable/$tableId";
$oRet = pmRestRequest("GET", $url, null, $oToken->access_token);

if ($oRet->status == 200) {
   $aFields = array(); //array of fields in the PM Table
   print "\n" . '<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse;">' .
      "<tbody>\n<tr>";

   foreach ($oRet->response->fields as $oField) {
      $aFields[] = strtolower($oField->fld_name); //convert field names to lowercase
      print "<th>{$oField->fld_description}</th>";
   }
   print "</tr>\n";

   $url2  = "/api/1.0/workflow/pmtable/$tableId/data";
   $oRet2 = pmRestRequest("GET", $url2, null, $oToken->access_token);

   if ($oRet2->status == 200) {
      foreach ($oRet2->response->rows as $oRow) {
         $aRow = get_object_vars($oRow); //convert object to associative array
         print "<tr>\n";
         foreach ($aFields as $fieldName) {
            print '  <td>' . $aRow[$fieldName] . "</td>\n";
         }
         print "</tr>\n";
      }
   }
   print "</tbody></table>\n";
}

Querying Filter (Where)

A filter of type WHERE can be applied to this endpoint to narrow the endpoint response.

GET /api/1.0/{workspace}/pmtable/{pmt_uid}/data?q= {"where": {"property": "value"}}

If wanting to search for multiple properties, separate them with a "," (comma).

GET /api/1.0/{workspace}/pmtable/{pmt_uid}/data?q= {"where": {"property": "value", "property2": "value2", ...}}

Filter Parameters:

Name Type Description Example
property String The name of a property (field) of the PMTable. /api/1.0/workflow312Of/pmtable/16470336958222eae1e9918043923507/data?q={"where": {"name": "Travis Grady"}}
value String Value to be searched. /api/1.0/workflow312Of/pmtable/16470336958222eae1e9918043923507/data?q={"where": {"name": "Travis Grady"}}

Value Parameter

Inside the value parameter the following comparison operators can be used:

Operator Description Example
Not Equal The "NOT EQUAL" operator returns all the records that are NOT the equal to the comparison value. /api/1.0/workflow312Of/pmtable/16470336958222eae1e9918043923507/data?q={"where": {"name": {"neq": "Travis Grady"}}}
Like The "LIKE" comparison operator enables to match the value using SQL regular expressions. The "%" sign is used to define missing letters, both before and after the value. /api/1.0/workflow312Of/pmtable/16470336958222eae1e9918043923507/data?q={"where": {"name": {"like": "H%"}}}
nLike The "NOT LIKE" comparison operator enables to return all the results where the records values are NOT like the comparison value. /api/1.0/workflow312Of/pmtable/16470336958222eae1e9918043923507/data?q={"where": {"Phone": {"nlike": "%667%"}}}

Example:
If successful, then the HTTP status code is set to 200 and there is a status object.

Response
200 (OK)
Content-Type: application/json
{
    "rows": [
        {
        "id": "1",
        "name": "Travis Grady",
        "phone": "55533433",
        "__index__": "lg"
      }
    ],
    "count": 1
}

Create PM Table: POST /pmtable

Create a new PM Table.

Permission:

Users must have the PM_SETUP_PM_TABLES permission assigned to their role to have access to the endpoint information

Structure:

POST /api/1.0/{workspace}/pmtable

URL Parameters:

Name Description Example
workspace Workspace name /api/1.0/workflow/pmtable

POST Fields:

Name Description
{ Start object.
"pmt_tab_name", The name of the PM Table, which only consists of ASCII letters, numbers and underscores ("_"). It will automatically be converted to UPPERCASE. It is strongly recommended that it begin with "PMT_".
"pmt_tab_dsc", Optional. Description of the PM Table.
"fields" An array of field objects.
[ Start the array.
{ Start object defining field.
"fld_name", The field name, which should only contain ASCII letters, numbers and underscores ("_"). It will automatically be converted to UPPERCASE. It is recommended that it be in UPPERCASE.
"fld_label, The field's label.
"fld_type", The field type, which can be:
  • BIGINT: An integer of 8 bytes between -9223372036854775808 and 9223372036854775807.
  • BOOLEAN: A binary value of either 1 (true) or 0 (false), but this stored as an INTEGER in the database.
  • CHAR: A string of a characters between 0 and 255 in length. The number of characters stored in the database is fixed. If the field size is 100, then 100 characters are stored in the database, even if the value in the field has fewer characters.
  • DATE: A date in the 'YYYY-MM-DD' format. The supported range is '1000-01-01' to '9999-12-31'.
  • DATETIME: A datetime in the 'YYYY-MM-DD HH:MM:SS' format. The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'.
  • DECIMAL: A decimal number, which has exactly 2 decimal digits. This is the recommended type when using currency.
  • DOUBLE: A decimal number of 8 bytes. The supported range is -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308.
  • FLOAT: A decimal number of 4 bytes. The supported range is -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38.
  • INTEGER: An integer of 4 bytes between -2147483648 and 2147483647.
  • LONGVARCHAR: A string of a variable number of characters, between 0 and 16,777,215 characters long. This is a synonym for a MEDIUMTEXT field.
  • REAL: A synonym for DOUBLE (unless the REAL_AS_FLOAT SQL mode is enabled).
  • SMALLINT: An integer of 2 bytes between -32768 and 32767.
  • TIME: The time in 'HH:MM:SS' format.
  • TIMESTAMP: A synonym for DATETIME.
  • TINYINT: An integer of 1 byte between -128 and 127.
  • VARCHAR: A string of a variable number of characters, between 0 and 255 characters in length before MySQL 5.0.3 and between 0 and 65,535 characters in MySQL 5.0.3 and later.
"fld_size", The field size is required for CHAR and VARCHAR fields, where it sets the maximum number of allowed characters. The field size is optional for BOOLEAN, TINYINT, SMALLINT, INTEGER and BIGINT fields, where it sets the maximum number of allowed digits. It is also optional for FLOAT, REAL and DECIMAL fields, where it sets the maximum number of digits before the decimal point. The number of decimal digits cannot be specified, although it is automatically set to 2 in DECIMAL fields. For example, setting fld_size to 4 allows numbers between -9999.X and 9999.X with the number of decimals determined by the maximum for the data type.
The fld_size should NOT be included in DOUBLE, DATE, TIME, DATETIME, TIMESTAMP and LONGVARCHAR fields or it will cause a 400 error with no response object. Likewise, a 400 error will be caused if the fld_size is set to a value larger than the allowed size, such as 50 for an INTEGER.
"fld_null", Optional. Set to 1 if this field may have a value of NULL, meaning "no data". Otherwise, set to 0, meaning that the field must have a value. If not included, then set to 1 by default.
"fld_autoincrement", Optional. Set to 1 if this field will be auto-incremented, meaning that the value will be automatically inserted as the maximum existing value in the field plus 1. This option is recommended for ID fields. Otherwise set to 0, which is the default.
"fld_key" Optional. Set to 1 if this field should be a primary key field, meaning that its value will be unique and it will used to index the table. Otherwise set to 0, which is the default if not included.
} End of object defining the field.
... Any additional field objects.
] End array of field objects.
} End object.

Result:

If the table is created, then the HTTP status code is set to 201 (Created) and a object is returned with information about the new PM Table. See the JSON example below.

JSON example:

Request:

{
   "pmt_tab_name":    "PMT_CONTRACTS",
   "pmt_tab_dsc":     "Clients for accounting services",
   "fields": [
      {
         "fld_name":          "ID",
         "fld_label":         "ID number",
         "fld_type":          "INTEGER",
         "fld_size":          8,
         "fld_key":           1,
         "fld_null":          0,
         "fld_autoincrement": 1
      },
      {
         "fld_name":          "NAME",
         "fld_label":         "Contractor Name",
         "fld_type":          "VARCHAR",
         "fld_size":          120
      },
      {
         "fld_name":          "AMOUNT",
         "fld_label":         "Contract Amount",
         "fld_type":          "DECIMAL"
      },
      {
         "fld_name":          "DUE_DATE",
         "fld_label":         "Contract Due Date",
         "fld_type":          "DATE"
      }
   ]
}

Response:

{
   "pmt_uid":             "83869640955f217bb427890052454465",
   "pmt_tab_name":        "PMT_CONTRACTS",
   "pmt_tab_description": "Contracts for accounting services",
   "pmt_tab_class_name":  "PmtContracts",
   "pmt_num_rows":        0,
   "fields":
   [
      {
         "fld_uid":            "52437664155f217bb6f79b6006806943",
         "fld_index":          0,
         "fld_name":           "ID",
         "fld_description":    "ID number"
         "fld_type":           "INTEGER"
         "fld_size":           8,
         "fld_null":           0,
         "fld_auto_increment": 1,
         "fld_key":            1,
         "fld_table_index":    0
      },
      {
         "fld_uid":            "78554318355f217bb8ea6b4079739653",
         "fld_index":          1,
         "fld_name":           "NAME",
         "fld_description":    "Contractor Name",
         "fld_type":           "VARCHAR",
         "fld_size":           120,
         "fld_null":           1,
         "fld_auto_increment": 0,
         "fld_key":            0,
         "fld_table_index":    0
      },
      {
         "fld_uid":            "11719892455f217bb999165017574602",
         "fld_index":          2,
         "fld_name":           "AMOUNT",
         "fld_description":    "Contract Amount",
         "fld_type":           "DECIMAL",
         "fld_size":           NULL,
         "fld_null":           1,
         "fld_auto_increment": 0,
         "fld_key":            0,
         "fld_table_index":    0
      },
      {
         "fld_uid":            "60151324555f217bba48057032011257",
         "fld_index":          3,
         "fld_name":           "DUE_DATE",
         "fld_description":    "Contract Due Date",
         "fld_type":           "DATE",
         "fld_size":           NULL,
         "fld_null":           1,
         "fld_auto_increment": 0,
         "fld_key":            0,
         "fld_table_index":    0
      }
   ]
}

PHP example:

$oToken = pmRestLogin("IAIERTORPBHIJZXEPNSUANXLKYPKODJU", "71308091055cb7094026089092397336", "amos", "sample");

$aVars = array(
   "pmt_tab_name" => "PMT_CONTRACTS",
   "pmt_tab_dsc"  => "Contracts for accounting services",
   "fields"       => array(
      array(
         "fld_name"          => "integer_",
         "fld_label"         => "ID number",
         "fld_type"          => "INTEGER",
         "fld_key"           => 1,
         "fld_size"          => 8,
         "fld_null"          => 0,
         "fld_autoincrement" => 1
      ),
      array(
         "fld_name"  => "NAME",
         "fld_label" => "Contractor Name",
         "fld_type"  => "VARCHAR",
         "fld_size"  => 120
      ),
      array(
         "fld_name"  => "AMOUNT",
         "fld_label" => "Contract Amount",
         "fld_type"  => "DECIMAL"
      ),
      array(
         "fld_name"  => "DUE_DATE",
         "fld_label" => "Contract Due Date",
         "fld_type"  => "DATE"
      )
   )
);

$url = "/api/1.0/workflow/pmtable";
$oRet = pmRestRequest("POST", $url, $aVars, $oToken->access_token);

if ($oRet->status == 201) {
   print "PM Table with UID '{$oRet->response->pmt_uid}' created.\n";
}

Note: If using PHP, the POST variables will need to be passed through the http_build_query() which will cause problems with fields which include the fld_size. The ProcessMaker source code needs to be changed to avoid an error.

Add PM Table Data: POST /pmtable/{pmt_uid}/data

Add a new record to a PM Table.

Permission:

Users must have the PM_SETUP_PM_TABLES permission assigned to their role to have access to the endpoint information

Structure:

POST /api/1.0/{workspace}/pmtable/{pmt_uid}/data

URL Parameters:

Name Description Example
workspace Workspace name /api/1.0/workflow/pmtable/22815673755f209dd749c90081062413/data
pmt_uid Unique ID of PM Table /api/1.0/workflow/pmtable/22815673755f209dd749c90081062413/data

POST Fields:

The following object where the member variables have the same names as the fields in the PM Table and their values will be inserted in a new record in the PM Table.

For example:
{
   "ID":           1262,                            //INTEGER
   "CLIENT_NAME":  "Sprockets Inc.",                //CHAR
   "ADDRESS":      "214 Elm St.\nDurham, FL 47621", //VARCHAR with new line
   "AMOUNT":       13435.99,                        //DECIMAL
   "WORK_START":   "2015-10-31 14:04:45",           //DATETIME
   "PAUSE_TIME":   "13:34:20",                      //TIME
   "DUE_DATE":     "2015-12-31",                    //DATE
   "HAS_CONTRACT": 1                                //BOOLEAN
}

Result:

If successful, the HTTP status is set to 201 (Created) and the new record which has been inserted in the PM Table is returned, with the field names in lowercase.

{
   "field_name1" : "VALUE1",
   "field_name2" : "VALUE2",
   ...
}

PHP example:

 {
$oToken = pmRestLogin("IAIERTORPBHIJZXEPNSUANXLKYPKODJU", "71308091055cb7094026089092397336", "amos", "sample");

$tableId = '22815673755f209dd749c90081062413';

$aVars = array(
   "ID"          => 1262,                            //INTEGER
   "CLIENT_NAME" => "Sprockets Inc.",                //CHAR
   "ADDRESS"     => "214 Elm St.\nDurham, FL 47621", //VARCHAR with new line
   "AMOUNT"      => 13435.99,                        //DECIMAL
   "WORK_START"  => "2015-10-31 14:04:45",           //DATETIME
   "PAUSE_TIME"  => "13:34:20",                      //TIME
   "DUE_DATE"    => "2015-12-31",                    //DATE
   "HAS_CONTRACT"=> 1                                //BOOLEAN
);
$url = "/api/1.0/workflow/pmtable/";//$tableId/data";
$oRet = pmRestRequest("GET", $url, $aVars, $oToken->access_token);

if ($oRet->status == 201) {
   print '<html><head><meta charset="UTF-8"></head><body><pre>';
   print "Record inserted!";
  print '
'; }

Note: Remember that ProcessMaker's MySQL database stores character data in the UTF-8 character set, so any strings should be converted to UTF-8 if they are in another character set, using a function such as iconv() in PHP.

Update PM Table Structure: PUT /pmtable/{pmt_uid}

Update the structure of a PM table.

Permission:

Users must have the PM_SETUP_PM_TABLES permission assigned to their role to have access to the endpoint information

Structure:

PUT /api/1.0/{workspace}/pmtable/{pmt_uid}

URL Parameters:

Name Type Description
workspace String Workspace name
pmt_uid String PM Table UID

Optional Fields:

Name Type Description
pmt_tab_dsc String PM Table description
fields Array

Result:

Type Description
empty No return

Example:
Request

 {
    "rep_tab_dsc" : "descripcion de la tabla",
    "fields" : [
        {
            "fld_name" : "CAMPO",
            "fld_label" : "CAMPITO",
            "fld_type" : "VARCHAR",
            "fld_size" : 200
        }
    ]
 }

Response

 200(OK)

Update PM Table Data: PUT /pmtable/{pmt_uid}/data

Update the data of an existing record in a PM table.

Permission:

Users must have the PM_SETUP_PM_TABLES permission assigned to their role to have access to the endpoint information

Structure:

PUT /api/1.0/{workspace}/pmtable/{pmt_uid}/data

URL Parameters:

Name Type Description
workspace String Workspace name
pmt_uid String PM Table UID

PUT Fields:

An object where the member variables have the same names as the fields in the PM Table and their values will be inserted in an existing record in the PM Table.

Result:

Type Description
empty No return

Example:
Request

 {
    "CAMPO1" : "valor1",
    "CAMPO2" : "valor2"
 }

Response

 200(OK)

Delete PM Table: DELETE /pmtable/{pmt_uid}

Delete a specified PM table and all its data.

Permission:

Users must have the PM_SETUP_PM_TABLES permission assigned to their role to have access to the endpoint information

Structure:

DELETE /api/1.0/{workspace}/pmtable/{pmt_uid}

URL Parameters:

Name Type Description
workspace String Workspace name
pmt_uid String PM Table UID

Result:

Type Description
empty No return

Example
Response

 200(OK)

Delete PM Table Data: DELETE /pmtable/{pmt_uid}/data/...

Delete a record from a PM table, by specifying its primary key(s). The PM Table can have up to 3 primary key fields.

Permission:

Users must have the PM_SETUP_PM_TABLES permission assigned to their role to have access to the endpoint information

Structure:

DELETE /api/1.0/{workspace}/pmtable/{pmt_uid}/data/{key1}/{value1}
(/api/1.0/{workspace}/pmtable/{pmt_uid}/data/{key1}/{value1}/{key2}/{value2})
(/api/1.0/{workspace}/pmtable/{pmt_uid}/data/{key1}/{value1}/{key2}/{value2}/{key3}/{value3})

URL Parameters:

Name Type Description
workspace String Workspace name
pmt_uid String PM Table UID
key1/key2/key3 String Name of the PM Table primary key field (depending on the number of key fields in the table)
value1/value2/value3 String Value of the PM Table primary key field (depending on the number of key fields in the table)

Result:

Type Description
empty No return

Example:
Response

 200(OK)