Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get transfer status

GET /transfers/{tid}

Returns status of specific transfer.

This operation requires space_view_transfers privilege.

Example cURL requests

Get status of specific transfer

curl -X GET -H "X-Auth-Token: $TOKEN" \
"https://$HOST/api/v3/oneprovider/transfers/$TRANSFER_ID"

{
  "type": "replication",
  "userId": "admin",
  "rerunId": null,
  "effectiveJobTransferId": $TRANSFER_ID,
  "spaceId": "6ec1a5413b6f4e2b01a5c85a8fd797e2",
  "dataSourceType": "file",
  "fileId": "00000000005CF4706775696423745F772D67686431633765446F4D76546D6F2D67575F3361737A7670486B477A7936587734507265584A7723394A4F355F5F396E4C31623031594576776E667431723230677767776C6B497031394E445F6E3868677873",
  "path": "/space/tmp",
  "filePath": "/space/tmp",
  "transferStatus": "completed",
  "effectiveJobStatus": "completed",
  "replicationStatus": "completed",
  "replicaEvictionStatus": "skipped",
  "evictionStatus": "skipped",
  "replicatingProviderId": "HICATChd8wzbFmB6qfGby9VN7MfdXgI1qC4pULGVm8Q",
  "evictingProviderId": null,
  "callback": null,
  "filesToProcess": 1,
  "filesProcessed": 1,
  "filesReplicated": 1,
  "fileReplicasEvicted": 0,
  "filesEvicted": 0,
  "failedFiles": 0,
  "filesFailed": 0,
  "bytesReplicated": 10485760000,
  "scheduleTime": 1504688800,
  "startTime": 15046888765,
  "finishTime": 1504688814,
  "lastUpdate": 1504988814,
  "minHist": {
    "ASDxicvuisodr78w979879wer": [419430400, 1153433600, 1258291200, 1468006400, 1048576000, 1048576000, 1048576000, 1153433600, 629145600, 1258291200, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  },
  "hrHist": {
    "ASDxicvuisodr78w979879wer": [10485760000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  },
  "dyHist": {
    "ASDxicvuisodr78w979879wer": [10485760000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  },
  "mthHist": {
    "ASDxicvuisodr78w979879wer": [10485760000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  }
}

Path parameters

Parameter Type & Description
tid required
string

Transfer Id.

Request Examples

Shell
oneprovider-rest-cli getTransferStatus tid=$TRANSFER_ID

Responses

application/json
200

Transfer status.

PropertyType & Description
type
string

Requested type of transfer.

Enum:
replicationevictionmigration
userId
string

Id of the user that started the transfer.

rerunId
string

If the transfer was rerun, this field contains the Id of the new transfer, otherwise null.

effectiveJobTransferId
string

Last transfer Id in chain made of rerunId.

spaceId
string

Id of space in context of which transfer was performed.

dataSourceType
string

Source of transferred data.

Enum:
fileview
fileId
string

Id of the transferred file or directory.

path
string

Path to the file or directory in the virtual file system. This field is deprecated and it might be removed in future release. Please refer to filePath.

filePath
string

Path to the file or directory in the virtual file system.

viewName
string

Name of the view that was queried to obtain the list of files to transfer.

queryViewParams
object (QueryViewParams)

View query attributes as provided by Couchbase

descending
boolean

Return the documents in descending order (by key).

key
string

Return only documents that match the specified key. Key must be specified as a JSON value.

limit
integer

Limit the number of the returned documents to the specified number.

skip
integer

Skip this number of records before starting to return the results.

startkey
string

Return records with a value equal to or greater than the specified key. Key must be specified as a JSON value.

startkey_docid
string

Return records starting with the specified document Id.

endkey
string

Stop returning records when the specified key is reached. Key must be specified as a JSON value.

endkey_docid
string

Stop returning records when the specified document Id is reached.

inclusive_end
boolean

Specifies whether the specified end key is included in the result. Note: Do not use inclusive_end with key or keys.

stale
string

Allow records from a stale view to be used. Allowed values are ok, update_after or false.

Enum:
okupdate_afterfalse
bbox
string

Specify the bounding box for a spatial query (e.g. bbox=-180,-90,0,0)

spatial
boolean

Enable spatial type of query. When querying the file-popularity view, the start_range and end_range constraints should be specified as 6-dimensional arrays, with the following fields: [SizeLowerLimit, LastOpenHoursEpochLowerLimit, TotalOpenLowerLimit, HoursOpenAvgLowerLimit, DayOpenAvgLowerLimit, MonthOpenAvgLowerLimit].

start_range
string

Array specifying the range in spatial queries (e.g. start_range=[1,0,0,0,0,0]).

end_range
string

Array specifying the range in spatial queries (e.g. end_range=[null,null,null,null,null,null]).

transferStatus
string

Overall status of transfer.

Enum:
scheduledenqueuedskippedreplicatingevictingcompletedabortingcancelledfailed
effectiveJobStatus
string

Overall status of effective transfer job (the last one in chain made of rerunId).

Enum:
scheduledenqueuedskippedreplicatingevictingcompletedabortingcancelledfailed
replicationStatus
string

The status of transfer replication phase.

Enum:
scheduledenqueuedskippedactivecompletedabortingcancelledfailed
replicaEvictionStatus
string

The status of transfer eviction phase. This field is deprecated and it might be removed in future release. Please refer to evictionStatus.

Enum:
scheduledenqueuedskippedactivecompletedabortingcancelledfailed
evictionStatus
string

The status of transfer eviction phase.

Enum:
scheduledenqueuedskippedactivecompletedabortingcancelledfailed
replicatingProviderId
string

Id of provider to which data was copied, ensuring that the provider has a complete replica at the end of the process.

evictingProviderId
string

Id of provider from which replica(s) were removed.

callback
string

Optional callback URL, which will be invoked on transfer completion.

filesToProcess
integer

Total number of files in this transfer.

filesProcessed
integer

Number of files already processed.

filesReplicated
integer

Number of files already replicated.

fileReplicasEvicted
integer

Number of files already evicted. This field is deprecated and it might be removed in future release. Please refer to filesEvicted.

filesEvicted
integer

Number of files already evicted.

failedFiles
integer

Number of files for which eviction or replication has failed. This field is deprecated and it might be removed in future release. Please refer to filesFailed.

filesFailed
integer

Number of files for which eviction or replication has failed.

bytesReplicated
integer

Number of bytes already replicated.

scheduleTime
integer

Schedule time in seconds (POSIX epoch timestamp).

startTime
integer

Start time in seconds (POSIX epoch timestamp).

finishTime
integer

Finish time in seconds (POSIX epoch timestamp).

lastUpdate
integer

Last transfer update time in seconds (POSIX epoch timestamp).

minHist
object

Replication statistics within the last minute, per provider.

hrHist
object

Replication statistics within the last hour, per provider.

dyHist
object

Replication statistics within the last day, per provider.

mthHist
object

Replication statistics within the last month, per provider.

Example

application/json
{
  "type": "replication",
  "userId": "admin",
  "rerunId": null,
  "effectiveJobTransferId": "c4798eb2dbd2486fae940e6fa0a5071d",
  "spaceId": "6ec1a5413b6f4e2b01a5c85a8fd797e2",
  "dataSourceType": "file",
  "fileId": "00000000005CF4706775696423745F772D67686431633765446F4D76546D6F2D67575F3361737A7670486B477A7936587734507265584A7723394A4F355F5F396E4C31623031594576776E667431723230677767776C6B497031394E445F6E3868677873",
  "path": "/My Space 1/Dir2/file3.txt",
  "filePath": "/My Space 1/Dir2/file3.txt",
  "transferStatus": "completed",
  "effectiveJobStatus": "completed",
  "replicationStatus": "completed",
  "replicaEvictionStatus": "skipped",
  "evictionStatus": "skipped",
  "replicatingProviderId": "HICATChd8wzbFmB6qfGby9VN7MfdXgI1qC4pULGVm8Q",
  "evictingProviderId": null,
  "callback": null,
  "filesToProcess": 1,
  "filesProcessed": 1,
  "filesReplicated": 1,
  "fileReplicasEvicted": 0,
  "filesEvicted": 0,
  "failedFiles": 0,
  "filesFailed": 0,
  "bytesReplicated": 10485760000,
  "scheduleTime": 1504688800,
  "startTime": 15046888765,
  "finishTime": 1504688814,
  "lastUpdate": 1504988814,
  "minHist": {
    "ASDxicvuisodr78w979879wer": [
      419430400,
      1153433600,
      1258291200,
      1468006400,
      1048576000,
      1048576000,
      1048576000,
      1153433600,
      629145600,
      1258291200,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ]
  },
  "hrHist": {
    "ASDxicvuisodr78w979879wer": [
      10485760000,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ]
  },
  "dyHist": {
    "ASDxicvuisodr78w979879wer": [
      10485760000,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ]
  },
  "mthHist": {
    "ASDxicvuisodr78w979879wer": [
      10485760000,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ]
  }
}
400

Invalid request.

PropertyType & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}
403

Forbidden request.

PropertyType & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}
404

Transfer with provided Id was not found.

PropertyType & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}
500

Internal server error.

PropertyType & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}