edoc content services Guide
Breadcrumbs

Search for documents in the destination system

Method and endpoint

POST /Documents/search

You can use the POST /Documents/search method and endpoint to search for documents in a destination system using the properties. The search word (the value to be searched for) finds all documents that contain the search word in a specific property. You must specify the corresponding properties in which the search word is to be searched for.

You can also search for several search words simultaneously in the properties. Several search words are linked with the AND operator. An array with the documents found is returned in response.

Example of a request

JSON
POST /Documents/search
Accept: application/json
ModuleId: d3
ConnectionString: targetHost=MyD3server;user=MyD3user;password=myD3Password;repositoryId=A;

{
  "doc_field[22]": "1234",
  "doc_field[23]": "9876"
}

Example of a response

The objects for the documents have been shortened in the sample response.

JSON
{
	"lastDocumentIndex": "ET00003259",
	"documents": [
		{
			"id": "ET00003258",
			"caption": "MyDocument",
			"category": "DEPRO",
			"mimeType": "",
			"fileName": "MyFile.PDF",
			"fileSize": 52314,
			"version": "1",
			"createdAt": 1583452800,
			"fileUpdatedAt": 1583495129,
			"propertiesUpdatedAt": 1583495129,
			"properties": [
				{
					"id": "doc_editor",
					"name": "Doc_Editor",
					"value": [
						""
					]
				},
				{
					"id": "doc_status",
					"name": "Doc_Status",
					"value": [
						"Fr"
					]
				},
				{
					"id": "doc_type",
					"name": "Doc_Type",
					"value": [
						"Products"
					]
				},
				{
					"id": "last_access_timestamp",
					"name": "Last_Access_Timestamp",
					"value": [
						"1583495129"
					]
				},
				{
					"id": "doc_text_1",
					"name": "Doc_Text_1",
					"value": [
						""
					]
				},
				{
					"id": "doc_field[1]",
					"name": "doc_field[1]",
					"value": [
						""
					]
				},
				{
					"id": "doc_field_array[60]",
					"name": "doc_field_array[60]",
					"value": null
				}
			]
		},
		{
			"id": "ET00003259",
			"caption": "YourDocument",
			"category": "DEPRO",
			"mimeType": "",
			"fileName": "YourDocument.PDF",
			"fileSize": 49208,
			"version": "1",
			"createdAt": 1583452800,
			"fileUpdatedAt": 1583495889,
			"propertiesUpdatedAt": 1583495889,
			"properties": [
				{
					"id": "doc_editor",
					"name": "Doc_Editor",
					"value": [
						""
					]
				},
				{
					"id": "doc_status",
					"name": "Doc_Status",
					"value": [
						"Fr"
					]
				},
				{
					"id": "doc_type",
					"name": "Doc_Type",
					"value": [
						"Products"
					]
				},
				{
					"id": "last_access_timestamp",
					"name": "Last_Access_Timestamp",
					"value": [
						"1586881294"
					]
				},
				{
					"id": "doc_text_1",
					"name": "Doc_Text_1",
					"value": [
						""
					]
				},
				{
					"id": "doc_field[1]",
					"name": "doc_field[1]",
					"value": [
						""
					]
				},
				{
					"id": "doc_field_array[60]",
					"name": "doc_field_array[60]",
					"value": null
				}
			]
		}
	]
}