This endpoint allows you to view all packages in the system.

Note: This endpoint is accessible to admins only.

Request Parameters

The POST method can take these parameters either as query parameters in the URL or in the request body. These parameters are submitted with the --data command.

Parameter Name Required/Optional Type Description
senders required string Returns a list of Faspex usernames for senders of all packages or the outbox (send and receive). Default: a list of all names, if sender username not specified
recipients required string Faspex usernames for received packages only. Can be used for a regular package scope search, for example, "return all packages this user has send to me" (or "return all packages I have sent to this user").
pagination optional unsigned integer Set number of entries to batch for pagination
can_write optional boolean Whether user has write permission for a dropbox or workgroup

Common Error Codes

  • 404 No Content - Package not found; returns an error object
  • 400 Bad Request - Request parameters are invalid; returns an error object
  • 500 Internal Server Error - Request is valid but the server encountered an error; returns an error object

View all packages

POST /api/packages/

This method returns all packages in the system by workgroup or dropbox, sorted by recipient name and type.

Request Format

api/packages --data '{"recipients": ["recipient_names"], "senders": ["sender_names"]}'

Recipient names are comma-separated.

Success Response:

  • 200 OK - Returned with an array of package information

Sample Request and Response:

curl -H "Accept: application/json" -H "Content-type: application/json" -H "Authorization: Bearer M6HAZIHsX1km4HeRFcShyw" https://10.0.153.38/aspera/faspex/api/packages --data '{"recipients": ["admin"], "senders": ["admin"]}'
[{"id"=>"17",
  "title"=>"asd",
  "note"=>"",
  "recipients"=>
   [{"archived"=>false,
     "created_at"=>"2017/06/28 13:12:24 -0700",
     "delivery_id"=>17,
     "e_package_id"=>17,
     "id"=>17,
     "old_wg_delivery_id"=>nil,
     "package_deleted"=>false,
     "private"=>false,
     "recipient_id"=>2,
     "recipient_name"=>"admin",
     "recipient_type"=>"User",
     "send_to_email_passcode"=>nil,
     "share_id"=>2,
     "updated_at"=>"2017/06/28 13:12:24 -0700"}],
  "metadata"=>[{"name"=>"asdqwe", "value"=>"qwe"}],
  "release_policy"=>"release_now",
  "release_date"=>"2017-06-28T13:12:23.000-0700",
  "sender"=>"admin",
  "state"=>"released",
  "archived"=>false,
  "ear_enabled"=>false,
  "active_downloads"=>0,
  "active_downloaders"=>[],
  "download_count"=>0,
  "downloaders"=>[],
  "total_bytes"=>138757,
  "total_files"=>1,
  "creation_date"=>"2017-06-28T13:12:23.000-0700",
  "last_modified"=>"2017-06-28T13:12:27.000-0700"},
 {"id"=>"16",
  "title"=>"test2",
  "note"=>"",
  "recipients"=>
   [{"archived"=>false,
     "created_at"=>"2017/06/19 14:42:22 -0700",
     "delivery_id"=>16,
     "e_package_id"=>16,
     "id"=>16,
     "old_wg_delivery_id"=>nil,
     "package_deleted"=>false,
     "private"=>false,
     "recipient_id"=>2,
     "recipient_name"=>"admin",
     "recipient_type"=>"User",
     "send_to_email_passcode"=>nil,
     "share_id"=>2,
     "updated_at"=>"2017/06/19 14:42:22 -0700"}],
  "release_policy"=>"release_now",
  "release_date"=>"2017-06-19T14:42:22.000-0700",
  "sender"=>"acampos+61@asperasoft.com",
  "state"=>"released",
  "archived"=>false,
  "ear_enabled"=>false,
  "active_downloads"=>0,
  "active_downloaders"=>[],
  "download_count"=>0,
  "downloaders"=>[],
  "total_bytes"=>124402,
  "total_files"=>1,
  "creation_date"=>"2017-06-19T14:42:22.000-0700",
  "last_modified"=>"2017-06-19T14:42:23.000-0700"},
 {"id"=>"15",
 . . .},
  . . .
  ]
Video player

Video

×