LiquidFiles Documentation
LiquidFiles Documentation
Updated v3.7

Pool Admin API

The Pools Admin API will enable you to add, delete and update Pools on the LiquidFiles system.

Available Attributes

The following attributes are available when you're accessing the Pools Admin API:

Request Parameters
Parameter Type Description
id String The Pools unique ID.
name String The pools name.
groups Array An Array of all group ID's that has access to this Pool.
attachments Array An Array of all attachment's that are available in this Pool.
created_at DateTime The Date and Time when the Pool was created.
updated_at DateTime The Date and Time when the Pool was last updated.

List Pools

Request Info
Info Value
Request URL /admin/pools
Request VERB GET
Authentication Required

As a response, you will get an array of pools with the attributes as listed in the available attributes section above.

Example using curl:

curl -s -X GET --user "37DeYIkmDoQcsl3eEl2lE2:x" \
     -H "Accept: application/json" \
     https://liquidfiles.company.com/admin/pools

{"pools":
  [
    {
      "id": "support-files",
      "name": "Support Files",
      "created_at": "2014-06-29 07:27:02 UTC",
      "updated_at": "2014-08-07 00:44:34 UTC",
      "groups": ["sysadmins","admins","local-users"],
      "attachments": [
        {
          "id": "fLBLbDFtyRQJCIkyB05p7h",
          "pool_id": "support-files",
          "user_id": "",
          "filename": "SupportFiles.zip",
          "size": 53516232,
          "size_human":"51 MB",
          "content_type": "application/octet-stream",
          "checksum": "5c59ef6f86b878cac23fee21498e192d2247d988",
          "crc32": "acb7c906",
          "assembled":true,
          "virus_scan_required":true,
          "virus_scanned":true,
          "virus_scanned_at":null,
          "actionscript":null,
          "actionscript_scanned_at":null,
          "actionscript_scanned":false,
          "content_blocked":false,
          "content_blocked_message":"Known Clean",
          "processed":true,
          "processed_at":"2023-10-16T20:52:30.610Z",
          "expires_at":null,
          "created_at":"2023-10-16T20:52:25.353Z",
          "available":true
        }
      ]
    }
  ]
}

View Pool

To view an individual Pool, please use the following Request:

Request Info
Info Value
Request URL /admin/pools/_the_pool_id_
Request VERB GET
Authentication Required

Example using curl:

curl -s -X GET --user "37DeYIkmDoQcsl3eEl2lE2:x" \
     -H "Accept: application/json" \
     https://liquidfiles.company.com/admin/pools/support-files

{"pool":
  {
    "id": "support-files",
    "name": "Support Files",
    "created_at": "2014-06-29 07:27:02 UTC",
    "updated_at": "2014-08-07 00:44:34 UTC",
    "groups": ["sysadmins","admins","local-users"],
    "attachments": [
      {
        "id": "fLBLbDFtyRQJCIkyB05p7h",
        "pool_id": "support-files",
        "user_id": "",
        "filename": "SupportFiles.zip",
        "size": 53516232,
        "size_human":"51 MB",
        "content_type": "application/octet-stream",
        "checksum": "5c59ef6f86b878cac23fee21498e192d2247d988",
        "crc32": "acb7c906",
        "assembled":true,
        "virus_scan_required":true,
        "virus_scanned":true,
        "virus_scanned_at":null,
        "actionscript":null,
        "actionscript_scanned_at":null,
        "actionscript_scanned":false,
        "content_blocked":false,
        "content_blocked_message":"Known Clean",
        "processed":true,
        "processed_at":"2023-10-16T20:52:30.610Z",
        "expires_at":null,
        "created_at":"2023-10-16T20:52:25.353Z",
        "available":true
      }
    ]
  }
}

Create Pool

Request Info
Info Value
Request URL /admin/pools/
Request VERB POST
Authentication Required
Request Parameters
Parameter Type Description
name String The name of the Pool
groups Array An Array of group ID's that you wish to provide access to the Pool

Please note, you can manage attachments with different API calls further down.

As a reponse, you will receive the Pool object with the attributes as listed in the users attribute section above.

Example using curl:

cat <<EOF | \
  curl -s -X POST --user "37DeYIkmDoQcsl3eEl2lE2:x" \
       -H "Accept: application/json" \
       -H "Content-Type: application/json" \
       -d @- https://liquidfiles.company.com/admin/pools

{"pool":
  {
    "name": "Partner Pool",
    "groups": ["sysadmins", "admins", "local-users"]
  }
}EOF

{"pool":
  {
    "id": "partner-pool",
    "name": "Partner Pool",
    "created_at": "2014-06-29 07:27:02 UTC",
    "updated_at": "2014-08-07 00:44:34 UTC",
    "groups": ["sysadmins","admins","local-users"],
    "attachments": []
  }
}

Update Pool

Request Info
Info Value
Request URL /admin/pools/_the_pool_id_
Request VERB PUT
Authentication Required
Request Parameters
Parameter Type Description
name String The name of the Pool
groups Array An Array of group ID's that you wish to provide access to the Pool

Request

As a reponse, you will receive the Pool object with the attributes as listed in the pool attribute section above.

Example using curl:

cat <<EOF | \
  curl -s -X PUT --user "37DeYIkmDoQcsl3eEl2lE2:x" \
       -H "Accept: application/json" \
       -H "Content-Type: application/json" \
       -d @- https://liquidfiles.company.com/admin/pools/partner-pool
{"pool":
  {
    "groups": ["admins","local-users"]
  }
}
EOF

{"pool":
  {
    "id": "partner-pool",
    "name": "Partner Pool",
    "created_at": "2014-06-29 07:27:02 UTC",
    "updated_at": "2014-08-07 00:44:34 UTC",
    "groups": ["admins","local-users"],
    "attachments": []
  }
}

Delete Pool

Request Info
Info Value
Request URL /admin/pools/_the_pool_id_
Request VERB DELETE
Authentication Required

The response will be blank, with a http status code of 200 if the Pool was deleted.

Example using curl:

curl -s -X DELETE --user "ayFlT3BNx1OXxiZcM4h5Tl:x" \
     -H "Accept: application/json" \
     https://liquidfiles.company.com/admin/pools/partner-pool

Uploading Files

Uploading files to create a FileLink is very similar to the sending messages API, with the only change is the URL for the file upload. For detailed instructions how to to upload the file(s), please see the Attachments API.

Request Info
Info Value
Request URL /admin/pools/_the_pool_id_/attachments/upload
Request VERB POST
Authentication Required
Headers
Info Value
username the Users API key
password not used (use 'x' if your programming API requires a value)
Content-Type (Optional) LiquidFiles first use the Content-Type HTTP header if that's set. If the Content-Type header is not set it will use this optional parameter. If neither are set, the Content-Type will be detected using the Linux `file` command.
Request Parameters
Parameter Type Description
filename String The filename of the uploaded file.
chunks Integer (optional) When uploading files in chunks (in pieces), these are the total number of pieces there is.
chunk Integer (optional and required when chunks is set) When uploading files in chunks, this is the current chunk number, with the first chunk being chunk number 0 (zero).
Please note that with this binary upload, it's not possible to submit parameters using POST style embedded within the post. Instead, these parameters are submitted using GET style parameters following a question mark (?) on the URL.

Response

As a response to a successful File Upload you will receive an attachment response with the attributes outlined in the Attachment Attributes documentation.

Example: Create FileLink using bash and curl

#!/bin/bash

# Some nice variables
api_key="Y9fdTmZdv0THButt5ZONIY"
server="https://liquidfiles.example.com"

# Uploading the actual file and get attachment id for the file
curl -X POST -H "Accept: application/json" \
     -H "Content-Type: application/zip" \
     --user "$api_key:x" \
     --data-binary @bigfile.zip \
     $server/admin/pools/some-pool-id/attachments/upload
EOF

Delete files from a Pool

Request

Request Info
Info Value
Request URL /admin/pools/_the_pool_id_/attachments/_the_attachment_id_
Request VERB DELETE
Authentication Required

The response will be blank, with a http status code of 200 if the Pool Attachment was deleted.

Example using curl:

curl -s -X DELETE --user "ayFlT3BNx1OXxiZcM4h5Tl:x" \
     -H "Accept: application/json" \
     https://liquidfiles.company.com/admin/pools/partner-pool/attachment/8cvrfQ6zSQhLccJnKGzSV5