# Device Files

## Fetch Files

> Triggers Connect to fetch files from the device you specify. For example, you can use this command to fetch logs from a device. The files are fetched from the device path you specify in the request body using the \`files\_path\` attribute. You can specify a folder or a specific file.\
> \
> The request returns a URL. You can use the Artifactory UI, API, or CLI to download the files from this URL. The files are not available immediately at the URL. They become available when the device uploads them and if the upload is successful.

```json
{"openapi":"3.0.0","info":{"title":"Logs API","version":"1.0.0"},"servers":[{"url":"https://api.connect.jfrog.io"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"You will need to get an access token from the Connect web UI to use the Connect API v2. The v1 token will not work for v2.\n\n    Important: For security reasons, the new token generated by Connect will not be stored. Ensure that you copy the token and save it in a safe place.\n"}}},"paths":{"/api/v2/{project_key}/devices/{device_uuid}/logs":{"post":{"tags":["Device Files"],"summary":"Fetch Files","description":"Triggers Connect to fetch files from the device you specify. For example, you can use this command to fetch logs from a device. The files are fetched from the device path you specify in the request body using the `files_path` attribute. You can specify a folder or a specific file.\n\nThe request returns a URL. You can use the Artifactory UI, API, or CLI to download the files from this URL. The files are not available immediately at the URL. They become available when the device uploads them and if the upload is successful.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"files_path":{"type":"string","description":"The path where the requested files are on the device."}}}}}},"parameters":[{"name":"project_key","in":"path","schema":{"type":"string"},"required":true,"description":"The fleet key of the relevant fleet in the account. An account can have multiple fleets (formerly called projects). If you don't know the fleet key, you can find it in the Fleet Settings of the web UI."},{"name":"device_uuid","in":"path","schema":{"type":"string"},"required":true,"description":"The  UUID of the device you are acting on. This is the unique identifier of the device in Connect, for example, d-4cfe-4e51. You can find the UUID in the ID column of the Devices table in the [Devices](https://docs.connect.jfrog.io/devices/view-device-details) page of the web UI."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"download_url":{"type":"string"}}}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"404":{"description":"NOT FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}
```
