edoc content services Guide
Breadcrumbs

Create a file

Method and endpoint

POST /Folders

You can use the POST /Folders method and endpoint to create new files in the destination system.

In API version 1.1, you can also fill multiple fields in files. You can use the function by sending the header parameter X-Version: 1.1 in the request.

If the process was successful, the service returns the HTTP status 201 Created and the ID of the new file in response.

Example of a request

JSON
POST /Folders
Accept: application/json
ModuleId: d3one
ConnectionString: targetHost=https://test.d-velop.cloud;apikey=MyApiKey;repositoryid=MyRepositoryId;

{
  "folderType": "c0c494ec-4031-45a3-a77a-b4692f2bc1f1",
  "properties": {
    "1623f20a-7f1d-40a9-b208-65db622c5b2a": "MyCustomer",
    "bdbaccd6-dfa5-4031-b8cd-ae1126dea8ba": "1234"
  }
}

Example of a request with multivalued fields

JSON
POST /Folders
Accept: application/json
ModuleId: d3one
X-Version: 1.1
ConnectionString: targetHost=https://test.d-velop.cloud;apikey=MyApiKey;repositoryid=MyRepositoryId;

{
  "folderType": "c0c494ec-4031-45a3-a77a-b4692f2bc1f1",
  "properties": {
    "1623f20a-7f1d-40a9-b208-65db622c5b2a": [
      "MyCustomer",
      "MyCustomer2"
    ],
    "bdbaccd6-dfa5-4031-b8cd-ae1126dea8ba": [
      "1234",
      "9876",
      "1111"
    ]
  }
}

Example of a response

JSON
{
  "id": "O500000421",
  "link": "https://MyContentService/Folders/O500000421"
}