PostUdfData

Prev Next
Post
/sys-rest-api/jersey/v1/user-defined-fields

POST /jersey/v1/user-defined-fields — Save UDF Values

Overview

This endpoint saves user-defined field (UDF) values for a single parent record. It works as an upsert — if no UDF value row exists for the record yet, it does an INSERT. If one already exists, it does an UPDATE. A concurrent-insert race condition (ORA-00001) is handled automatically and converted to an UPDATE, so callers never need to retry.

Property Value
URL {base_url}/sys-rest-api/jersey/v1/user-defined-fields
Method POST
Consumes / Produces application/json
Success Status 201 Created
Auth Basic (Authorization: Basic {credentials})

Notes

Authentication and authorization are required.

schemaName defaults to DA if not supplied.

objectKey1 is always required. Additional keys are only needed for composite-key tables.

The fields array must be non-empty. Each entry needs both fieldName and columnName. Supplying columnName is required because two UDF slots can have the same label and you need to be specific about which physical column you are writing to.

If a field's value is null, that field is skipped entirely — the existing database value is left untouched. This lets you update only the fields you care about without overwriting everything.

Duplicate columnName values within the same request are rejected.

The commit happens inside the service. If the audit read after commit fails, the failure is logged but does not cause the response to fail — the data is already saved.


UI Navigation

User-defined fields are custom fields that are attached directly to the object they belong to. They appear on the object's own screen — there is no separate standalone navigation path for them. For example, UDFs for a Project appear on the Project record itself, and UDFs for a Job appear on the Job record.


Request Body

Field Type Required Description
schemaName String No Database schema. Defaults to DA.
tableName String Yes Table the UDFs belong to (e.g. PROJ, JCJOB).
objectKey1 String Yes First business key.
objectKey2 through objectKey10 String No Remaining business keys for composite-key tables.
fields Array Yes Non-empty list of UDF field entries.
fields[].fieldName String Yes Human-readable UDF label (e.g. Project Category).
fields[].columnName String Yes Physical UEV column name (e.g. UEV_CODE1).
fields[].value String No Value to save. null means skip this field — existing value is preserved.

Attributes

Request — fields[] Entry

Field Type Required Description Example
fieldName String Yes UDF label Project Category
columnName String Yes Physical column name UEV_CODE1
value String No Value to save. null skips the field COMMERCIAL

Response — Top Level

Field Type Description Example
status String Always success on 201 success
schemaName String Schema DA
tableName String Table PROJ
objectKey1 through objectKey10 String Business keys echoed back MAIN
fieldCount Integer Number of fields in the response 3
createDate String (ISO 8601) When the UDF row was created 2026-06-29T10:30:00-04:00
createUser String Who created it JSMITH
updateDate String (ISO 8601) When it was last updated 2026-06-29T10:30:00-04:00
updateUser String Who updated it JSMITH
fields Array Fields as saved (same as request)

Response — fields[] Entry

Field Type Description Example
fieldName String UDF label Project Category
columnName String Physical column UEV_CODE1
value String Saved value (null if it was skipped) COMMERCIAL

Example

Request

POST {base_url}/sys-rest-api/jersey/v1/user-defined-fields
Content-Type: application/json
Authorization: Basic {credentials}
{
  "schemaName": "DA",
  "tableName": "PROJ",
  "objectKey1": "MAIN",
  "objectKey2": "P001",
  "fields": [
    { "fieldName": "Project Category", "columnName": "UEV_CODE1", "value": "COMMERCIAL" },
    { "fieldName": "Budget Flag",      "columnName": "UEV_CODE2", "value": "Y"          },
    { "fieldName": "Review Date",      "columnName": "UEV_DATE1", "value": null         }
  ]
}

Response — 201 Created

{
  "status": "success",
  "schemaName": "DA",
  "tableName": "PROJ",
  "objectKey1": "MAIN",
  "objectKey2": "P001",
  "objectKey3": null,
  "objectKey4": null,
  "objectKey5": null,
  "objectKey6": null,
  "objectKey7": null,
  "objectKey8": null,
  "objectKey9": null,
  "objectKey10": null,
  "createDate": "2026-06-29T10:30:00-04:00",
  "createUser": "JSMITH",
  "updateDate": "2026-06-29T10:30:00-04:00",
  "updateUser": "JSMITH",
  "fieldCount": 3,
  "fields": [
    { "fieldName": "Project Category", "columnName": "UEV_CODE1", "value": "COMMERCIAL" },
    { "fieldName": "Budget Flag",      "columnName": "UEV_CODE2", "value": "Y"          },
    { "fieldName": "Review Date",      "columnName": "UEV_DATE1", "value": null         }
  ]
}


Error Codes

HTTP Error Code Reason
400 SD-000380-ERR Request body is null or empty
400 SD-000381-ERR Request body is not valid JSON
400 SD-000375-ERR tableName or objectKey1 is missing
400 SD-000378-ERR fields array is null or empty
400 SD-000377-ERR No UDF definition found for the given table
400 SD-000376-ERR Parent record not found for the supplied keys
400 SD-000382-ERR A field entry is missing fieldName or columnName
400 SD-000384-ERR Duplicate columnName in the same request
400 SD-000379-ERR The fieldName / columnName pair is not valid for this table
400 SD-000383-ERR Physical column name does not match the expected UEV_\\\* pattern
400 SD-000376-ERR UPDATE executed but zero rows were affected
500 — Unhandled database or server error — auto rollback
Security
HTTP
Type basic

Basic authentication

Body parameters
object
Example{ "tableName": "POMAST", "objectKey1": "ZZ", "objectKey2": "PZZ0000106", "objectKey3": "1", "fields": [ { "fieldName": "APITEST", "columnName": "UEV_CODE1", "value": "YashBhavsar" }, { "fieldName": "REMARKS1", "columnName": "UEV_CODE2", "value": "Hello243" }, { "fieldName": "NEWNAMES", "columnName": "UEV_CODE3", "value": "New1NameYash" }, { "fieldName": "REMARKS2", "columnName": "UEV_CODE4", "value": "Rijoe" } ] }
Responses
201

Created

Headers
Content-Type
string
Exampleapplication/json
"{\n    \"status\": \"success\",\n    \"schemaName\": \"DA\",\n    \"tableName\": \"POMAST\",\n    \"createDate\": \"2025-12-02T12:40:04-05:00\",\n    \"createUser\": \"SHAHIDWS\",\n    \"updateDate\": \"2026-06-17T10:04:01-04:00\",\n    \"updateUser\": \"YASHB\",\n    \"objectKey1\": \"ZZ\",\n    \"objectKey2\": \"PZZ0000106\",\n    \"objectKey3\": \"1\",\n    \"objectKey4\": null,\n    \"objectKey5\": null,\n    \"objectKey6\": null,\n    \"objectKey7\": null,\n    \"objectKey8\": null,\n    \"objectKey9\": null,\n    \"objectKey10\": null,\n    \"fieldCount\": 4,\n    \"fields\": [\n        {\n            \"fieldName\": \"APITEST\",\n            \"columnName\": \"UEV_CODE1\",\n            \"value\": \"YashBhavsar\"\n        },\n        {\n            \"fieldName\": \"REMARKS1\",\n            \"columnName\": \"UEV_CODE2\",\n            \"value\": \"Hello243\"\n        },\n        {\n            \"fieldName\": \"NEWNAMES\",\n            \"columnName\": \"UEV_CODE3\",\n            \"value\": \"New1NameYash\"\n        },\n        {\n            \"fieldName\": \"REMARKS2\",\n            \"columnName\": \"UEV_CODE4\",\n            \"value\": \"Rijoe\"\n        }\n    ]\n}"
string
Copyright © 2024 CMiC All Rights Reserved