Task_sources

Lists all task sources.

get

API Key Scope: task_sources / index

Authorizations
Path parameters
task_idstringRequired

Numeric ID or name of task. Task names are not unique, it's recommanded to use numeric ID.

Query parameters
limitintegerOptional

The number of items to display for pagination.

offsetintegerOptional

The number of items to skip for pagination.

sort_bystring[]Optional

Sort results by attribute.

Can sort on multiple attributes, separated by |. Order direction can be suffixing the attribute by either :asc (default) or :desc.

idstringOptional

Filter on id

file_idstringOptional

Filter on file id

import_file_idstringOptional

Filter on import file id

tape_idstringOptional

Filter on tape id

pool_idstringOptional

Filter on a pool id

Responses
200

List of task sources.

application/json
get
/tasks/{task_id}/task_sources
GET /api/v2/tasks/{task_id}/task_sources HTTP/1.1
Host: localhost
Authorization: Basic username:password
Accept: */*
200

List of task sources.

{
  "count": 1,
  "task_sources": [
    {
      "file_id": 1,
      "file_path": "text",
      "range": [
        150000,
        290000
      ],
      "import_file_id": 1,
      "import_file_path": "text",
      "tape_id": 1,
      "tape_barcode": "text",
      "pool_id": 1,
      "pool_name": "text",
      "id": 1,
      "file": {
        "id": 105,
        "name": "my-file.txt",
        "parent": 100,
        "primary_id": 100,
        "type": "file",
        "permission": 100666,
        "size": 1063457,
        "change_date": "2018-12-10T08:33:47.000Z",
        "modification_date": "2018-12-10T15:29:23.000Z",
        "access_date": "2018-12-10T15:27:51.000Z",
        "uid": 1000,
        "gid": 1000,
        "in_cache": "in_cache",
        "offline": "online",
        "extern": 1,
        "checksums": [
          "text"
        ],
        "tapes": [
          "text"
        ],
        "cloud_buckets": [
          "text"
        ],
        "nas_shares": [
          "text"
        ],
        "file_path": "/my-container/my-file.txt"
      },
      "container": {
        "id": 100,
        "name": "my-container",
        "comment": "Read only container for random stuff",
        "push_pool_id": 1,
        "cleaning_pool_id": 1,
        "quota_total_size": 1,
        "quota_on_cache": 1,
        "stat_total_files": 99301,
        "only_on_cache_file_count": 19123,
        "stat_total_size": 6145076462,
        "stat_size_on_cache": 6899417088,
        "only_on_cache_file_size_sum": 3294517012,
        "guest_right": "read",
        "last_update": "2019-08-05T14:24:15.000Z"
      },
      "import_file": {
        "id": 105,
        "name": "my-file.txt",
        "parent": 100,
        "primary_id": 100,
        "type": "file",
        "permission": 100666,
        "size": 1063457,
        "change_date": "2018-12-10T08:33:47.000Z",
        "modification_date": "2018-12-10T15:29:23.000Z",
        "access_date": "2018-12-10T15:27:51.000Z",
        "uid": 1000,
        "gid": 1000,
        "file_path": "/my-container/my-file.txt"
      },
      "tape": {
        "id": 10,
        "tape_library_id": 2,
        "pool_id": 6,
        "barcode": "NOD407L5",
        "location": "Slot 2",
        "type": "data_lto5",
        "locked": 1,
        "scratch": 1,
        "cleaning": 1,
        "write_protect": [
          "logical_locked"
        ],
        "mounted": 1,
        "ejected": 1,
        "known": 1,
        "mount_count": 1,
        "date_in": "2025-11-05T15:53:46.196Z",
        "date_move": "2025-11-05T15:53:46.196Z",
        "free": 1,
        "max": 1,
        "last_size_update": "2025-11-05T15:53:46.196Z",
        "last_maintenance": "2025-11-05T15:53:46.196Z",
        "last_repack": "2025-11-05T15:53:46.196Z",
        "repack_status": 1,
        "force_import_type": 1,
        "need_to_check": 1
      },
      "pool": {
        "id": 6,
        "name": "offline-tapes",
        "comment": "",
        "type": "offline_archive",
        "content": "tape",
        "primary_id": 100,
        "storage_id": 2,
        "tape_write_protect_when_full": true,
        "storage_extra_data": {
          "id": 1,
          "storage_id": 123,
          "storage_type": 1,
          "data": "{\"alto_api\": {\"username\" : \"aaaa\", \"password\" : \"password\", \"shelf\" : \"shelf66\" }}"
        }
      }
    }
  ]
}

Creates a new task source.

post

API Key Scope: task_sources / create

Authorizations
Path parameters
task_idstringRequired

Numeric ID or name of task. Task names are not unique, it's recommanded to use numeric ID.

Body
file_idinteger · int64Optional
file_pathstringOptional
rangeinteger · int64[] · min: 2 · max: 2OptionalExample: [150000,290000]
import_file_idinteger · int64Optional
import_file_pathstringOptional
tape_idinteger · int64Optional
tape_barcodestringOptional
pool_idintegerOptional
pool_namestringOptional
Responses
201

A specific task source.

application/json
Responseall of
post
/tasks/{task_id}/task_sources
POST /api/v2/tasks/{task_id}/task_sources HTTP/1.1
Host: localhost
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 166

{
  "file_id": 1,
  "file_path": "text",
  "range": [
    150000,
    290000
  ],
  "import_file_id": 1,
  "import_file_path": "text",
  "tape_id": 1,
  "tape_barcode": "text",
  "pool_id": 1,
  "pool_name": "text"
}
{
  "file_id": 1,
  "file_path": "text",
  "range": [
    150000,
    290000
  ],
  "import_file_id": 1,
  "import_file_path": "text",
  "tape_id": 1,
  "tape_barcode": "text",
  "pool_id": 1,
  "pool_name": "text",
  "id": 1,
  "file": {
    "id": 105,
    "name": "my-file.txt",
    "parent": 100,
    "primary_id": 100,
    "type": "file",
    "permission": 100666,
    "size": 1063457,
    "change_date": "2018-12-10T08:33:47.000Z",
    "modification_date": "2018-12-10T15:29:23.000Z",
    "access_date": "2018-12-10T15:27:51.000Z",
    "uid": 1000,
    "gid": 1000,
    "in_cache": "in_cache",
    "offline": "online",
    "extern": 1,
    "checksums": [
      "text"
    ],
    "tapes": [
      "text"
    ],
    "cloud_buckets": [
      "text"
    ],
    "nas_shares": [
      "text"
    ],
    "file_path": "/my-container/my-file.txt"
  },
  "container": {
    "id": 100,
    "name": "my-container",
    "comment": "Read only container for random stuff",
    "push_pool_id": 1,
    "cleaning_pool_id": 1,
    "quota_total_size": 1,
    "quota_on_cache": 1,
    "stat_total_files": 99301,
    "only_on_cache_file_count": 19123,
    "stat_total_size": 6145076462,
    "stat_size_on_cache": 6899417088,
    "only_on_cache_file_size_sum": 3294517012,
    "guest_right": "read",
    "last_update": "2019-08-05T14:24:15.000Z"
  },
  "import_file": {
    "id": 105,
    "name": "my-file.txt",
    "parent": 100,
    "primary_id": 100,
    "type": "file",
    "permission": 100666,
    "size": 1063457,
    "change_date": "2018-12-10T08:33:47.000Z",
    "modification_date": "2018-12-10T15:29:23.000Z",
    "access_date": "2018-12-10T15:27:51.000Z",
    "uid": 1000,
    "gid": 1000,
    "file_path": "/my-container/my-file.txt"
  },
  "tape": {
    "id": 10,
    "tape_library_id": 2,
    "pool_id": 6,
    "barcode": "NOD407L5",
    "location": "Slot 2",
    "type": "data_lto5",
    "locked": 1,
    "scratch": 1,
    "cleaning": 1,
    "write_protect": [
      "logical_locked"
    ],
    "mounted": 1,
    "ejected": 1,
    "known": 1,
    "mount_count": 1,
    "date_in": "2025-11-05T15:53:46.196Z",
    "date_move": "2025-11-05T15:53:46.196Z",
    "free": 1,
    "max": 1,
    "last_size_update": "2025-11-05T15:53:46.196Z",
    "last_maintenance": "2025-11-05T15:53:46.196Z",
    "last_repack": "2025-11-05T15:53:46.196Z",
    "repack_status": 1,
    "force_import_type": 1,
    "need_to_check": 1
  },
  "pool": {
    "id": 6,
    "name": "offline-tapes",
    "comment": "",
    "type": "offline_archive",
    "content": "tape",
    "primary_id": 100,
    "storage_id": 2,
    "tape_write_protect_when_full": true,
    "storage_extra_data": {
      "id": 1,
      "storage_id": 123,
      "storage_type": 1,
      "data": "{\"alto_api\": {\"username\" : \"aaaa\", \"password\" : \"password\", \"shelf\" : \"shelf66\" }}"
    }
  }
}

Displays a specific task source.

get

API Key Scope: task_sources / show

Authorizations
Path parameters
task_idstringRequired

Numeric ID or name of task. Task names are not unique, it's recommanded to use numeric ID.

task_source_idintegerRequired

Numeric ID of task source.

Responses
200

A specific task source.

application/json
Responseall of
get
/tasks/{task_id}/task_sources/{task_source_id}
GET /api/v2/tasks/{task_id}/task_sources/{task_source_id} HTTP/1.1
Host: localhost
Authorization: Basic username:password
Accept: */*
200

A specific task source.

{
  "file_id": 1,
  "file_path": "text",
  "range": [
    150000,
    290000
  ],
  "import_file_id": 1,
  "import_file_path": "text",
  "tape_id": 1,
  "tape_barcode": "text",
  "pool_id": 1,
  "pool_name": "text",
  "id": 1,
  "file": {
    "id": 105,
    "name": "my-file.txt",
    "parent": 100,
    "primary_id": 100,
    "type": "file",
    "permission": 100666,
    "size": 1063457,
    "change_date": "2018-12-10T08:33:47.000Z",
    "modification_date": "2018-12-10T15:29:23.000Z",
    "access_date": "2018-12-10T15:27:51.000Z",
    "uid": 1000,
    "gid": 1000,
    "in_cache": "in_cache",
    "offline": "online",
    "extern": 1,
    "checksums": [
      "text"
    ],
    "tapes": [
      "text"
    ],
    "cloud_buckets": [
      "text"
    ],
    "nas_shares": [
      "text"
    ],
    "file_path": "/my-container/my-file.txt"
  },
  "container": {
    "id": 100,
    "name": "my-container",
    "comment": "Read only container for random stuff",
    "push_pool_id": 1,
    "cleaning_pool_id": 1,
    "quota_total_size": 1,
    "quota_on_cache": 1,
    "stat_total_files": 99301,
    "only_on_cache_file_count": 19123,
    "stat_total_size": 6145076462,
    "stat_size_on_cache": 6899417088,
    "only_on_cache_file_size_sum": 3294517012,
    "guest_right": "read",
    "last_update": "2019-08-05T14:24:15.000Z"
  },
  "import_file": {
    "id": 105,
    "name": "my-file.txt",
    "parent": 100,
    "primary_id": 100,
    "type": "file",
    "permission": 100666,
    "size": 1063457,
    "change_date": "2018-12-10T08:33:47.000Z",
    "modification_date": "2018-12-10T15:29:23.000Z",
    "access_date": "2018-12-10T15:27:51.000Z",
    "uid": 1000,
    "gid": 1000,
    "file_path": "/my-container/my-file.txt"
  },
  "tape": {
    "id": 10,
    "tape_library_id": 2,
    "pool_id": 6,
    "barcode": "NOD407L5",
    "location": "Slot 2",
    "type": "data_lto5",
    "locked": 1,
    "scratch": 1,
    "cleaning": 1,
    "write_protect": [
      "logical_locked"
    ],
    "mounted": 1,
    "ejected": 1,
    "known": 1,
    "mount_count": 1,
    "date_in": "2025-11-05T15:53:46.196Z",
    "date_move": "2025-11-05T15:53:46.196Z",
    "free": 1,
    "max": 1,
    "last_size_update": "2025-11-05T15:53:46.196Z",
    "last_maintenance": "2025-11-05T15:53:46.196Z",
    "last_repack": "2025-11-05T15:53:46.196Z",
    "repack_status": 1,
    "force_import_type": 1,
    "need_to_check": 1
  },
  "pool": {
    "id": 6,
    "name": "offline-tapes",
    "comment": "",
    "type": "offline_archive",
    "content": "tape",
    "primary_id": 100,
    "storage_id": 2,
    "tape_write_protect_when_full": true,
    "storage_extra_data": {
      "id": 1,
      "storage_id": 123,
      "storage_type": 1,
      "data": "{\"alto_api\": {\"username\" : \"aaaa\", \"password\" : \"password\", \"shelf\" : \"shelf66\" }}"
    }
  }
}

Updates a specific task source.

put

API Key Scope: task_sources / update

Authorizations
Path parameters
task_idstringRequired

Numeric ID or name of task. Task names are not unique, it's recommanded to use numeric ID.

task_source_idintegerRequired

Numeric ID of task source.

Body
file_idinteger · int64Optional
file_pathstringOptional
rangeinteger · int64[] · min: 2 · max: 2OptionalExample: [150000,290000]
import_file_idinteger · int64Optional
import_file_pathstringOptional
tape_idinteger · int64Optional
tape_barcodestringOptional
pool_idintegerOptional
pool_namestringOptional
Responses
200

A specific task source.

application/json
Responseall of
put
/tasks/{task_id}/task_sources/{task_source_id}
PUT /api/v2/tasks/{task_id}/task_sources/{task_source_id} HTTP/1.1
Host: localhost
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 166

{
  "file_id": 1,
  "file_path": "text",
  "range": [
    150000,
    290000
  ],
  "import_file_id": 1,
  "import_file_path": "text",
  "tape_id": 1,
  "tape_barcode": "text",
  "pool_id": 1,
  "pool_name": "text"
}
{
  "file_id": 1,
  "file_path": "text",
  "range": [
    150000,
    290000
  ],
  "import_file_id": 1,
  "import_file_path": "text",
  "tape_id": 1,
  "tape_barcode": "text",
  "pool_id": 1,
  "pool_name": "text",
  "id": 1,
  "file": {
    "id": 105,
    "name": "my-file.txt",
    "parent": 100,
    "primary_id": 100,
    "type": "file",
    "permission": 100666,
    "size": 1063457,
    "change_date": "2018-12-10T08:33:47.000Z",
    "modification_date": "2018-12-10T15:29:23.000Z",
    "access_date": "2018-12-10T15:27:51.000Z",
    "uid": 1000,
    "gid": 1000,
    "in_cache": "in_cache",
    "offline": "online",
    "extern": 1,
    "checksums": [
      "text"
    ],
    "tapes": [
      "text"
    ],
    "cloud_buckets": [
      "text"
    ],
    "nas_shares": [
      "text"
    ],
    "file_path": "/my-container/my-file.txt"
  },
  "container": {
    "id": 100,
    "name": "my-container",
    "comment": "Read only container for random stuff",
    "push_pool_id": 1,
    "cleaning_pool_id": 1,
    "quota_total_size": 1,
    "quota_on_cache": 1,
    "stat_total_files": 99301,
    "only_on_cache_file_count": 19123,
    "stat_total_size": 6145076462,
    "stat_size_on_cache": 6899417088,
    "only_on_cache_file_size_sum": 3294517012,
    "guest_right": "read",
    "last_update": "2019-08-05T14:24:15.000Z"
  },
  "import_file": {
    "id": 105,
    "name": "my-file.txt",
    "parent": 100,
    "primary_id": 100,
    "type": "file",
    "permission": 100666,
    "size": 1063457,
    "change_date": "2018-12-10T08:33:47.000Z",
    "modification_date": "2018-12-10T15:29:23.000Z",
    "access_date": "2018-12-10T15:27:51.000Z",
    "uid": 1000,
    "gid": 1000,
    "file_path": "/my-container/my-file.txt"
  },
  "tape": {
    "id": 10,
    "tape_library_id": 2,
    "pool_id": 6,
    "barcode": "NOD407L5",
    "location": "Slot 2",
    "type": "data_lto5",
    "locked": 1,
    "scratch": 1,
    "cleaning": 1,
    "write_protect": [
      "logical_locked"
    ],
    "mounted": 1,
    "ejected": 1,
    "known": 1,
    "mount_count": 1,
    "date_in": "2025-11-05T15:53:46.196Z",
    "date_move": "2025-11-05T15:53:46.196Z",
    "free": 1,
    "max": 1,
    "last_size_update": "2025-11-05T15:53:46.196Z",
    "last_maintenance": "2025-11-05T15:53:46.196Z",
    "last_repack": "2025-11-05T15:53:46.196Z",
    "repack_status": 1,
    "force_import_type": 1,
    "need_to_check": 1
  },
  "pool": {
    "id": 6,
    "name": "offline-tapes",
    "comment": "",
    "type": "offline_archive",
    "content": "tape",
    "primary_id": 100,
    "storage_id": 2,
    "tape_write_protect_when_full": true,
    "storage_extra_data": {
      "id": 1,
      "storage_id": 123,
      "storage_type": 1,
      "data": "{\"alto_api\": {\"username\" : \"aaaa\", \"password\" : \"password\", \"shelf\" : \"shelf66\" }}"
    }
  }
}

Destroys a specific task source.

delete

API Key Scope: task_sources / destroy

Authorizations
Path parameters
task_idstringRequired

Numeric ID or name of task. Task names are not unique, it's recommanded to use numeric ID.

task_source_idintegerRequired

Numeric ID of task source.

Responses
204

Task source destroyed.

No content

delete
/tasks/{task_id}/task_sources/{task_source_id}
DELETE /api/v2/tasks/{task_id}/task_sources/{task_source_id} HTTP/1.1
Host: localhost
Authorization: Basic username:password
Accept: */*
204

Task source destroyed.

No content

Last updated

Was this helpful?