IBM Content Navigator, Version 2.0.3     Supports: 

POST method

The POST method obtains data from an external data source for item types of a specific class. You do not call this method directly. Instead, the EDS REST protocol calls this method automatically when workflow information or a content item is being added or modified.
When IBM® Content Navigator calls the POST method, the request payload contains the current value for each property. The current value can be one of the following values:
  • The default value
  • The value persisted for the property in the repository
  • The working value that the user entered for the property

The response payload that the external data service returns includes changes to the properties that it manages. The service can modify attributes of properties in addition to modifying property values.

IBM Content Navigator then merges these changes with the base data in the repository and returns the data to IBM Content Navigator.

URI syntax

/type/{class name}
Path elements
Table 1. Path elements for the POST method
Name Type Description
{object type name} String The symbolic name of the class name or item type name that defines the property that is being updated.

Request content

{
   "repositoryId":"target_object_store_name",
   "objectId"   : "GUID_or_PID_of_item_that_is_being_edited",
   "requestMode" : "request_context",
   "externalDataIdentifier" : "identifier_for_the_service",

   "properties":
   [
   {
      "symbolicName" : "property_name",
      "value"        : current_value,
   }

   // More properties ...

   ],

   "clientContext":
   {
      "Key1":"Value1",
      "Key2":"Value2"
   }

}
Table 2. Request parameters for the POST method
Name Type Required? Description
repositoryId String Yes The symbolic name of the target external data store that contains the property data.
objectId String No The globally unique identifier (GUID) or persistent identifier (PID) that identifies the item that is being edited.
requestMode String Yes One of the following request modes that indicates the reason that the POST method is being called:
  • initialNewObject
  • initialExistingObject
  • inProgressChanges
  • finalNewObject
  • finalExistingObject
See Request modes for information about the request modes.

externalData
Identifier

String Yes A string that indicates the state of the data that was returned by the external data service. The request must include this identifier if the requestMode parameter is set to one of these values:
  • inProgressChanges
  • finalNewObject
  • finalExistingObject
properties Array Yes An array that contains values for the properties that are defined for the class or item type. For each property, the request contains the symbolic name and the property value.
clientContext Array No An array that contains the following key-value pairs:
userid
The user ID
locale
The locale.
desktopid
The desktop ID.
This parameter is used to send information to an external data service when an IBM Content Navigator user begins to add a document, add a folder, use an entry template, or create a search.
Restriction: The clientContext parameter does not include user credentials. Your EDS implementation is invoked by IBM Content Navigator without propagating the user's session and credentials. EDS is therefore not suitable to implement in cases where you need user credentials to connect to your external system, for example, to filter results (choice list values) by the logged in user. To do something with EDS that requires access to the content server, you can implement a custom response filter.
Start of change The clientContext array can also contain the following key-value pairs, which were added in IBM Content Navigator, Version 2.0.3 to support the ability to include the active entry template's ID and name in the EDS context so that EDS implementations can return a different response if an entry template is active:
objectStoreId (FileNet® P8)
String ID of the object store where the item is or will be stored
entryTemplateId (FileNet P8 and IBM Content Manager)
The active entry template IBM Content Navigator id string.
entryTemplateName (FileNet P8 and IBM Content Manager)
The active entry template name string.
entryTemplateVsId (FileNet P8)
The active entry template version series ID string.
entryTemplateItemId (IBM Content Manager)

The active entry template item ID string.

If custom properties are set in the new ecm.model._HasAttributesMixin.retrieveDependentAttributeDefinitionsContext object, those custom properties are also present in the clientContext parameter. End of change

Response codes

Table 3. Response codes for the POST method
Code Description
200 OK The method completed successfully. The response that is returned by the POST method includes the updated information for the property.
400 Bad Request One of the required parameters was missing or a parameter value was invalid.
404 Not Found The class that was specified in the request was not found. This error does not indicate that the class is invalid. Instead, it indicates that the external data service does not manage any property values for the class. The EDS REST protocol does not return an error to IBM Content Navigator.
500 Internal Server Error A server error occurred. For information about the error, see the userMessage element in the JSON response.