---
title: "POST /gdc/projects/{projectId}/dataload/download/facebook/downloadTasks"
method: POST
path: "/gdc/projects/{projectId}/dataload/download/facebook/downloadTasks"
---

# POST /gdc/projects/{projectId}/dataload/download/facebook/downloadTasks

`POST /gdc/projects/{projectId}/dataload/download/facebook/downloadTasks`

## Request

- Base URL: `https://secure.gooddata.com`
- URL: `https://secure.gooddata.com/gdc/projects/{projectId}/dataload/download/facebook/downloadTasks`
- Auth: none declared

creates new download task

## Request body

- FacebookDownloadTask
  - `facebookDownloadTask` object, required
    - `credentials` object, required
      - `accessToken` string
    - `definition` FacebookGraphApiDefinition, required
      - `query` string, required: Graph API query, required field
      - `pagingType` 'FIRST_PAGE' | 'ALL_PAGES' | 'CUSTOM_PAGES': Graph API query paging type
      - `outputFile` string, nullable
      - `pagesNumber` integer
    - `timeout` integer: timeout of this task, propagated to the taskman ( in seconds inteval <0, 43200>)

## Response `201`

Created - new Facebook download task created

- AsyncTask: Deprecated taskman async task used in old API resources. It contains `link` element in singular which doesn't comply with our API rules.
  - `asyncTask` object, required
    - `link` AsyncTaskPollLink, required
      - `poll` string, uri, required: URI of the polling resource

## Other responses

- `400`: Bad Request - invalid data in the request
- `404`: Not Found - the project doesn't exist

---

[API](https://skmtc.dev/gooddata/apis/gooddata-api-documentation.md) - [All operations](https://skmtc.dev/gooddata/apis/gooddata-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/gooddata/apis/gooddata-api-documentation/revisions/e5dc0ee6ab00?raw)
