Null Field Values

If necessary, you can include the special x-ecgbu-null-fields header in PUT method requests to set object field values to null. Each field name contained in the x-ecgbu-null-fields header will be set to a value of null when the request is processed. For example, the following request to the primeapi/restapi/project endpoint sets the project actualStart and forecastFinishDate fields of the updated project object included in the request to null. The x-ecgbu-null-fields header is set using the curl -H option:

curl -X PUT -H "x-ecgbu-null-fields:actualStart,forecastFinishDate" -u "<username>:<password>" -d "@projectData.json" https://<host>:<port>/primeapi/restapi/project

The variables in the previous example should be replaced with the following information when accessing the API:

  • <username>: The username of an application user. This user will be used to access the API and must have permission to access requested application data. For example, jsmith.
  • <password>: The password associated with the user account used to access the API.
  • <host>: The name of the host on which the application is deployed. For example, localhost.
  • <port>: The port number assigned to the application on the application host. For example, 7001.

Note: If the x-ecgbu-null-fields header is included in batch update requests, the fields of each included object that match the fields specified in the x-ecgbu-null-fields header will be set to null.