Certificate

The Certificate file system is a feature that allows you to reference certificate files within the test data after uploading them by injecting them into each request as part of the Mutual Authentication system in case your system requires it.

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

[...]
"test_name": "Test that does Mutual Authentication using uploaded cert file"
"file_name_certificate": "my_uploaded_cert_file",
[...]

As you can see, all you have to do is define the certificate file name in the “root” of the test data JSON.

Permissions

Member role vs API call

List certificate files

Upload certificate file

Download certificate file

Remove certificate file

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 certificate files

Web

In order to view the certificate files on our platform, all you have to do is browse to the Certificate page.

API call

The API call is:

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

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

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

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

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

CLI

List all certificate keys:

$ rungutan certificate list
{
  "Certificate": [
    {
      "certificate_id": "affa3935-f47d-48be-a962-ea8db156427d",
      "file_name_certificate": "test",
      "member_email": "[email protected]",
      "uploaded_date": "2021-04-12T23:11:41Z"
    },
    {
      "certificate_id": "affa3935-f47d-48be-a962-ea8db156427f",
      "file_name_certificate": "test",
      "member_email": "[email protected]",
      "uploaded_date": "2021-04-12T23:11:41Z"
    }
  ]
}

Filter based on certificate_id:

$ rungutan csv list --certificate_id affa3935-f47d-48be-a962-ea8db156427d
{
  "Certificate": [
    {
      "certificate_id": "affa3935-f47d-48be-a962-ea8db156427d",
      "file_name_certificate": "test",
      "member_email": "[email protected]",
      "uploaded_date": "2021-04-12T23:11:41Z"
    }
  ]
}

Upload certificate file

Web

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

API call

This action is not available through an API call.

CLI

This action is not available through an API call.

Download certificate file

Web

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

API call

The API call is:

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

{
    "Url": "https://link-to-download-certificate",
    "ResultsMetadata": {
        "team_id": "my-team",
        "certificate_id": "certificate_id"
    }
}

CLI

Get URL to download via CLI:

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

Remove certificate file

Web

In order to download an existing certificate file, you have to browse to the Certificate page and click on the “Remove Certificate” button for the relevant file.

API call

The API call is:

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

{
    "message": "Successfully deleted certificate file"
}

CLI

Get URL to download via CLI:

$ rungutan certificate get --certificate_id affa3935-f47d-48be-a962-ea8db156427f
{
    "message": "Successfully deleted certificate file"
}