File System

This Upload File System is a feature that allows you to reference files within any workflow step after uploading them by injecting them as a payload to that specific request!

These files can then be imported in your test case workflow as following:

[...]
    {
        "path": "/upload/file",
        "method": "POST",
        "files": [
            "file_name_to_upload"
        ],
        "data": "",
        "headers": {},
        "extract": []
    }
[...]

As you can see, all you have to do is define an array of file names in the “files” property of any workflow step.

Permissions

Member role vs API call

List files

Upload files

Download files

Remove fliles

Reader

True

False

False

False

Editor

True

True

True

True

Admin

True

True

True

True

AdminWithBilling

True

True

True

True

Owner

True

True

True

True

List files

Web

In order to view the File System on our platform, all you have to do is browse to the File System page.

API call

The API call is:

curl -s \
    -d '{"team_id":"my-team"}' \
    -H "X-Api-Key: my_api_key" \
    -X POST \
    https://app.rungutan.com/v1/api/file/list | jq . -r

{
  "File": [
    {
      "file_id": "affa3935-f47d-48be-a962-ea8db156427d",
      "file_name": "test",
      "member_email": "[email protected]",
      "uploaded_date": "2021-04-12T23:11:41Z"
    },
    {
      "file_id": "affa3935-f47d-48be-a962-ea8db156427f",
      "file_name": "test",
      "member_email": "[email protected]",
      "uploaded_date": "2021-04-12T23:11:41Z"
    }
  ]
}

You can also filter based on file_id to get the summary for only that specific file_id:

curl -s \
    -d '{"team_id":"my-team", "file_id": "affa3935-f47d-48be-a962-ea8db156427d"}' \
    -H "X-Api-Key: my_api_key" \
    -X POST \
    https://app.rungutan.com/v1/api/file/list | jq . -r

{
  "File": [
    {
      "file_id": "affa3935-f47d-48be-a962-ea8db156427d",
      "file_name": "test",
      "member_email": "[email protected]",
      "uploaded_date": "2021-04-12T23:11:41Z"
    }
  ]
}

CLI

List all File System keys:

$ rungutan file list
{
  "File": [
    {
      "file_id": "affa3935-f47d-48be-a962-ea8db156427d",
      "file_name": "test",
      "member_email": "[email protected]",
      "uploaded_date": "2021-04-12T23:11:41Z"
    },
    {
      "file_id": "affa3935-f47d-48be-a962-ea8db156427f",
      "file_name": "test",
      "member_email": "[email protected]",
      "uploaded_date": "2021-04-12T23:11:41Z"
    }
  ]
}

Filter based on file_id:

$ rungutan file list --file_id affa3935-f47d-48be-a962-ea8db156427d
{
  "File": [
    {
      "file_id": "affa3935-f47d-48be-a962-ea8db156427d",
      "file_name": "test",
      "member_email": "[email protected]",
      "uploaded_date": "2021-04-12T23:11:41Z"
    }
  ]
}

Upload file

Web

In order to upload a new file, all you have to do is browse to the File System page and click on the upload file button.

API call

This action is not available through an API call.

CLI

This action is not available through an API call.

Download file

Web

In order to download an existing file, you have to browse to the File System page and click on the “Download File” button for the relevant file.

API call

The API call is:

curl -s \
    -d '{
        "file_id": "file_id",
        "team_id": "my-team"
        }' \
    -H "X-Api-Key: my_api_key" \
    -X POST \
    https://app.rungutan.com/v1/api/file/get | jq . -r

{
    "Url": "https://link-to-download-File System",
    "ResultsMetadata": {
        "team_id": "my-team",
        "file_id": "file_id"
    }
}

CLI

Get URL to download via CLI:

$ rungutan file get --csv_id affa3935-f47d-48be-a962-ea8db156427f
{
    "Url": "https://link-to-download-File System",
    "ResultsMetadata": {
        "team_id": "my-team",
        "file_id": "file_id"
    }
}

Remove file

Web

In order to remove a file, you have to browse to the File System page and click on the “Remove File” button for the relevant file.

API call

The API call is:

curl -s \
    -d '{
        "file_id": "file_id",
        "team_id": "my-team"
        }' \
    -H "X-Api-Key: my_api_key" \
    -X POST \
    https://app.rungutan.com/v1/api/file/remove | jq . -r

{
    "message": "Successfully deleted File System file"
}

CLI

Get URL to download via CLI:

$ rungutan file get --file_id affa3935-f47d-48be-a962-ea8db156427f
{
    "message": "Successfully deleted File System file"
}