Content Manager Service API
Use the following to get create or update information:
POST: {"q":"uri:1","LocationSortName":"test","LocationTypeOfLocation":"Person", "Validate" = "true" }
With the below endpoint, we can download the attached document of the record via ServiceAPI:
<CMServiceAPIURL>/Record/<RecordUri>/file/document
For example, https://localhost/CMServiceAPI/Record/450/file/document
Update the web.config as follows:
-
Open the web.config in a text editor from the installation location, for example, C:\Program Files\Micro Focus\Content Manager\Service_API.
-
Locate the < system.web > tag.
-
Add the line: < httpRuntime requestValidationMode="2.0" / >
-
Comment the line: < httpRuntime targetFramework="4.5" maxRequestLength="2147483647" requestValidationType="TRIM.Services.Common.RequestValidator" />
The error is not displayed when you try to save an email.
To allow specific File Types to be uploaded, a white list can be added to the hptrim.config file. This list defines what file types can be uploaded, any file types not listed will fail, if uploaded.
To create a white list, add the fileUploadWhiteList attribute with the accepted file extensions, separate each allowed extension with a comma, to the <setup> tag in the hptrim.config file.
For example,
<setup databaseId="45" fileUploadWhiteList="xlsx,docx,pdf"/>
If the fileUploadWhiteList attribute is not defined, all file types will be accepted.
The Service API executes with the Windows identity (user account) of the user making the request. Impersonation is commonly used in applications that rely on Microsoft Internet Information Services (IIS) to authenticate the user.
Content Manager Service API Impersonation design is implemented for Windows Authentication and Basic Authentication. For Anonymous users, by default, it will take the default Windows user identity. This is the way the application is designed.
Swagger UI is a separate library that consumes endpoints developed using Service Stack. There are a lot of endpoints, slower loading times are expected and we get a pop-up message to wait, which is expected till the endpoints get loaded. This is not related to Content Manager. Since Content Manager consumes Service Stack Swagger UI, Content Manager has no control over this.