Export

Creating CSV file for elements

Changed on

Creating the CSV file for elements. <br> Parameters are: <ul>

<li><strong>elements</strong>: Array of element ids</li> <li><strong>columns</strong>: Describes the columns that should be exported. Can be obtained via the grid endpoint</li> <li><strong>config</strong>: Delimiter and header options</li> <li><strong>elementType</strong>: Type of element that should be exported</li> </ul> Delimiter can be set to anything, but the default is a <strong>semicolon</strong> <br> Header options are: <strong>no_header</strong>, <strong>title</strong> and <strong>name</strong><br> Download has to be triggered separately via the csv download route with the <strong>{jobRunId}</strong> returned in the response
post/pimcore-studio/api/export/csv

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /pimcore-studio/api/export/csv
  • Auth: none declared

Request body

elementsinteger[]
elementType'data-object' | 'object' | 'asset' | 'document'
classIdstring nullable

Example request

{
  "elements": [
    83
  ],
  "columns": [
    {
      "key": "id",
      "locale": "en",
      "type": "system.id",
      "group": [
        "system"
      ],
      "config": [
        {
          "advancedColumns": [
            {
              "key": "simpleField",
              "config": {
                "field": "name"
              }
            }
          ],
          "transformers": [
            {
              "key": "uppercase"
            }
          ]
        }
      ],
      "width": 200
    }
  ],
  "config": {
    "header": "title",
    "delimiter": ";"
  },
  "elementType": "asset",
  "classId": "CAR"
}

Response

Successfully created <strong>jobRun</strong> for csv export

jobRunIdinteger required

ID of created jobRun

Example response

{
  "jobRunId": 66
}

Changes

    • breaking

      removed the enum value element_to_export of the request property /

    • info

      added the new optional request property

    • info

      added the new optional request property //////////

    • info

      added the new optional request property //////////

    • info

      added the new optional request property //////////

    • info

      added the new optional request property //////////

    • info

      added the new optional request property //

    • info

      added the new configuration_ids enum value to the request property /

    • info

      added the new configuration_type enum value to the request property /

    • info

      added the new element_type_to_batch_delete enum value to the request property /

    • info

      added the new element_type_to_rewrite_references enum value to the request property /

    • info

      added the new element_type_to_tag enum value to the request property /

    • info

      added the new elements_to_export enum value to the request property /

    • info

      added the new elements_to_rewrite_references enum value to the request property /

    • info

      added the new elements_to_tag enum value to the request property /

    • info

      added the new export_format enum value to the request property /

    • info

      added the new items_to_batch_delete enum value to the request property /

    • info

      added the new items_to_delete enum value to the request property /

    • info

      added the new items_to_restore enum value to the request property /

    • info

      added the new new_owner_id enum value to the request property /