Skip to main content
A newer release of this product is available.

Test Swift REST API configuration

Contributors netapp-madkat netapp-lhalbert

You can use the Swift CLI to test your connection to the StorageGRID system and to verify that you can read and write objects.

Before you begin
About this task

If you have not configured security, you must add the --insecure flag to each of these commands.

Steps
  1. Query the info URL for your StorageGRID Swift deployment:

    swift
    -U <Tenant_Account_ID:Account_User_Name>
    -K <User_Password>
    -A https://<FQDN | IP>:<Port>/info
    capabilities

    This is sufficient to test that your Swift deployment is functional. To further test account configuration by storing an object, continue with the additional steps.

  2. Put an object in the container:

    touch test_object
    swift
    -U <Tenant_Account_ID:Account_User_Name>
    -K <User_Password>
    -A https://<FQDN | IP>:<Port>/auth/v1.0
    upload test_container test_object
    --object-name test_object
  3. Get the container to verify the object:

    swift
    -U <Tenant_Account_ID:Account_User_Name>
    -K <User_Password>
    -A https://<FQDN | IP>:<Port>/auth/v1.0
    list test_container
  4. Delete the object:

    swift
    -U <Tenant_Account_ID:Account_User_Name>
    -K <User_Password>
    -A https://<FQDN | IP>:<Port>/auth/v1.0
    delete test_container test_object
  5. Delete the container:

    swift
    -U `<_Tenant_Account_ID:Account_User_Name_>`
    -K `<_User_Password_>`
    -A `\https://<_FQDN_ | _IP_>:<_Port_>/auth/v1.0'
    delete test_container