|
| 1 | +package com.dotcms.rest.api.v1.content.dotimport; |
| 2 | + |
| 3 | +public class ContentImportDocs { |
| 4 | + |
| 5 | + public static final String FORM_FIELD_DOC = |
| 6 | + "This endpoint accepts a `multipart/form-data` request with two fields:\n\n" + |
| 7 | + "| **Field** | **Type** | **Required** | **Description** |\n" + |
| 8 | + "|-----------|----------|--------------|-----------------|\n" + |
| 9 | + "| `file` | File | ✅ Yes | The CSV file to import. Must contain content rows and match the expected structure for the content type. |\n" + |
| 10 | + "| `form` | String | ✅ Yes | A JSON string containing the import parameters. See structure below. |\n\n" + |
| 11 | + "**`form` field structure:**\n\n" + |
| 12 | + "| **Property** | **Type** | **Required** | **Default** | **Description** |\n" + |
| 13 | + "|----------------------|------------|--------------|-------------|-----------------|\n" + |
| 14 | + "| `contentType` | String | ✅ Yes | – | Content Type variable or ID to import data into. |\n" + |
| 15 | + "| `language` | String | ❌ No | Default language | Language code (e.g., `en-US`) or language ID. |\n" + |
| 16 | + "| `workflowActionId` | String | ✅ Yes | – | Workflow Action UUID to apply to imported content. |\n" + |
| 17 | + "| `fields` | String[] | ❌ No | – | List of field variables or IDs used as keys for content updates. |\n" + |
| 18 | + "| `stopOnError` | Boolean | ❌ No | `false` | Whether to stop import on first validation error. |\n" + |
| 19 | + "| `commitGranularity` | Integer | ❌ No | `100` | Number of rows to commit in each transaction batch. |\n\n" + |
| 20 | + "**Example `form` value:**\n\n" + |
| 21 | + "```json\n" + |
| 22 | + "{\n" + |
| 23 | + " \"contentType\": \"webPageContent\",\n" + |
| 24 | + " \"language\": \"en-US\",\n" + |
| 25 | + " \"workflowActionId\": \"b9d89c80-3d88-4311-8365-187323c96436\",\n" + |
| 26 | + " \"fields\": [\"title\"],\n" + |
| 27 | + " \"stopOnError\": false,\n" + |
| 28 | + " \"commitGranularity\": 100\n" + |
| 29 | + "}\n" + |
| 30 | + "```"; |
| 31 | +} |
0 commit comments