---
title: "Add files from URLs"
method: POST
path: "/datasets/{owner}/{id}/files"
tags: ["files"]
---

# Add files from URLs

`POST /datasets/{owner}/{id}/files`

Add files from URLs to a dataset. This method allows files published on the web to be added to a
data.world dataset via their URL. This method can also be used to retrieve data via web APIs, with
advanced options for http method, request payload and authentication.

The source URL will be stored so you can easily update your file anytime it changes via the *fetch latest*
link on the [data.world](https://data.world/) dataset page or by triggering the `GET:/sync` endpoint.

## Path parameters

- `owner` string, required
- `id` string, required

## Request body

- FileBatchUpdateRequest
  - `files` FileCreateOrUpdateRequest[]
    - `description` string
    - `labels` string[]
    - `mediaType` string
    - `mediaTypeLocked` boolean
    - `name` string, required
    - `source` FileSourceCreateOrUpdateRequest
      - `authorization` WebAuthorization
        - `credentials` string
        - `type` string, required
      - `credentials` WebCredentials
        - `password` string
        - `user` string, required
      - `dataTables` object
      - `databaseMetadataSpec` DatabaseMetadataSpecDto
        - `tableSpecs` TableMetadataSpecDto[]
          - `database` string
          - `schema` string
          - `tablePrefixes` string[]
          - `tableTypes` string[]
          - `tables` string[]
      - `databaseSource` DatabaseSourceReference
        - `id` string, uuid, required
        - `owner` string, required
      - `dwccSpec` DwccSpecDto
        - `databaseId` string
        - `metadataToExclude` string[]
        - `sourceDatabase` string
        - `sourceSchemas` string[]
        - `targetCatalog` string
      - `expandArchive` boolean
      - `method` 'GET' | 'POST'
      - `oauthToken` OauthTokenReference
        - `id` string, uuid, required
        - `owner` string, required
        - `site` string, required
      - `requestEntity` string
      - `requestHeaders` object
      - `tableSpec` SingleTableMetadataSpecDto
        - `database` string
        - `schema` string
        - `table` string
        - `tableType` 'EXTRACT' | 'VIRTUAL'
      - `url` string, uri
      - `useDwCredentials` boolean
      - `viewRequest` ViewRequestDto
        - `baseAgentId` string, required
        - `baseDatasetId` string, required
        - `queryId` string, uuid
        - `queryName` string, required
        - `queryText` string
        - `queryType` 'SPARQL' | 'SQL', required
        - `runAsAgentId` string, required
        - `targetAgentId` string, required
        - `targetDatasetId` string, required

## Response `200`

default response

- SuccessMessage
  - `message` string

---

[API](https://skmtc.dev/data/apis/data-world-public-api.md) · [All operations](https://skmtc.dev/data/apis/data-world-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/data/data-world-public-api/revisions/0a0cb1f94dad/schema)
