POST method
- 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"
}
}
| 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:
|
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:
|
| 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 | Object | No | An object that is used to send information about the context of
the client request to EDS when an IBM Content Navigator user adds a document
or folder, edits the properties of a document or folder, creates a search, or uses a custom action
that requires an EDS service. The object contains the following key-value pairs:
The following key-value pairs, which were added in IBM Content Navigator, Version 2.0.3, support the ability to for EDS implementations
to return a different response where an entry template is active.
IBM Content Navigator Version 2.0.3 or later copies the cookies from the client EDS request to the request that is sent to the EDS service. When the cookies include user credentials, such as an LTPA token, the EDS service is able to use those credentials to log in to an external system, such as the content server. However, when cookies do not include appropriate user credentials, you can implement a custom request filter that includes user credentials. |
The following example shows the clientContext JSON object for an EDS request to add a document to a FileNet P8 repository by using an entry template that is named EDS Entry Template, where the request is from IBM Content Navigator web client with the build version of the initial release for IBM Content Navigator Version 2.0.3.
"clientContext":
{
"entryTemplateName": "EDS Entry Template",
"entryTemplateVsId": "{CA2D4029-D4BD-4FA9-83E2-E3CBE2022A46}",
"entryTemplateId": "EntryTemplate,{7A4FC249-E366-4A71-9AA2-80342B44C783},{5AF14D3D-74B9-401D-BFD6-EA9F30A4167D}",
"locale": "en_US",
"action": "addItem",
"userid": "myUserID",
"desktop": "default",
"clientIdentity": "navigatorWeb",
"build": "icn203.555",
"objectStoreId": "{7A4FC249-E366-4A71-9AA2-80342B44C783}"
}
Response codes
| 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. |