# Get exported profiles

- Operation ID: `getExportedProfileData`
- HTTP method: `GET`
- Path: `/morph/exports/clients/{taskId}/data`
- [Human-readable API reference](https://hub.synerise.com/api-reference/data-management#tag/Profile-management/operation/getExportedProfileData)

## Self-contained OpenAPI method

The fenced document below contains this method's documentation and all of its local references. It is self-contained; no category or master specification fetch is required.

```yaml
openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.9.1
paths:
  /morph/exports/clients/{taskId}/data:
    get:
      tags:
        - Profile management
      operationId: getExportedProfileData
      summary: Get exported profiles
      description: |
        Get exported profiles as a list. To create the export, use [POST /exports/clients/segmentation](#operation/runProfileExport).

        **Tip**: If you want to download a CSV, JSON, or JSONL, find your export in [https://app.synerise.com/assets/exports](https://app.synerise.com/assets/exports).


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `CLIENT_EXPORTER_REPORT_CREATE`

        **User role permission required:** `settings_export: create`
      security:
        - JWT: []
      parameters:
        - name: taskId
          in: path
          required: true
          description: Unique ID of the export task
          schema:
            type: string
            format: uuid
        - name: offset
          in: query
          required: true
          description: The index of the first record to retrieve. Use this to paginate the exported data.
          schema:
            type: number
            minimum: 0
        - name: limit
          in: query
          required: true
          description: The number of records to retrieve. Use this to paginate the exported data.
          schema:
            type: integer
            minimum: 1
      responses:
        "200":
          description: Exported profile data
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  example:
                    id: "1234"
                    exampleAttribute: foo
                    exampleTag: "true"
                    exampleExpression: "23"
                    exampleAggregate: "74"
                    exampleSegmentation: "false"
                  additionalProperties:
                    type: string
                    description: |
                      - Profile attributes are key/value pairs.
                      - Tags are key/value pairs, where the key is the name of the tag and the value is "true" (string) if the tag is assigned to the profile.
                      - Expressions are key/value pairs, where the key is the name of the expression and the value is the result of the expression.
                      - Aggregates are key/value pairs, where the key is the name of the aggregate and the value is the result of the aggregate.
                      - Segmentations are key/value pairs, where the key is the name of the segmentation, and the value is "true" (string) if the profile belongs to the segmentation.
        "400":
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - status
                properties:
                  error:
                    type: string
                    description: Summary of the error
                  status:
                    type: integer
                    format: int32
                    description: Status code
                  timestamp:
                    type: string
                    description: Time when the error occurred
                  message:
                    type: string
                    description: Description of the problem. If an error code is included, check the [API Error Reference](https://developers.synerise.com/errors.html) for details.
              example:
                error: Bad Request
                status: 400
                timestamp: 2021-01-04T16:15:51.703Z
                message: Message describing issue with provided request
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/getExportedProfileData
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/data');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'offset' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
servers:
  - description: Microsoft Azure EU
    url: https://api.synerise.com
  - description: Microsoft Azure USA
    url: https://api.azu.synerise.com
  - description: Google Cloud Platform
    url: https://api.geb.synerise.com
tags:
  - name: Profile management
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |-
        JWT Bearer token. The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.

        Generate a token via the **Authorization** endpoints.
```
