Table of ContentsView in Frames

Retrieving CDMI capabilities with curl

You can retrieve the CDMI capabilities of the StorageGRID Webscale system to determine which CDMI functions the StorageGRID Webscale system supports. Knowing the CDMI capabilities helps you understand the functions that client applications can perform with the StorageGRID Webscale system.

Before you begin

You must know the IP address and port number for an API Gateway Node or the Storage Node.

About this task

In the following task, IP_address and port are for an API Gateway Node or the Storage Node.

Note: If you copy a command from this section and paste the command into another application, the copy-and-paste process might remove dashes that appear between words near a line break. You must ensure that the pasted command includes all dashes before you run the command.

Steps

  1. From a client application, use curl to retrieve CDMI capabilities from the StorageGRID Webscale system: curl -X GET --header 'Host: IP_address:port' --header 'Content-Type: application/cdmi-capability' --header 'X-CDMI-Specification-Version: 1.0.2' -k https://IP_address:port/CDMI/cdmi_capabilities/
    A response that looks similar to the following appears:
    {"objectType":"application/cdmi-capability",
    "objectID":"00006FFD0009B74801","objectName":"cdmi_capabilities/",
    "parentURI":"/CDMI/",
    "parentID":"00006FFD001912410500000000000000000000000000000000",
    "capabilities":{"cdmi_domains":"true",
    "cdmi_metadata_maxitems":"32",
    "cdmi_metadata_maxsize":"4096",
    "cdmi_metadata_maxtotalsize":"32768",
    "cdmi_multipart_mime":"true",
    "cdmi_object_access_by_ID":"true",
    "cdmi_post_dataobject_by_ID":"true",
    "cdmi_security_data_integrity":"true"},"childrenrange":"0-2",
    "children":["container/","dataobject/","domain/"]}

    The supported CDMI capabilities are displayed after "capabilities": for example, "cdmi_domains":"true".

    IP_address and port are for an API Gateway Node or the Storage Node.

  2. Optional: Retrieve CDMI capabilities for other CDMI object types, such as domain and data objects, by appending the required capability name to the URL with a trailing forward slash.
    For more information about the different objects, see the CDMI specification.
    Example
    The following command retrieves the data system metadata capabilities: curl -X GET --header 'Host: IP_address:port' --header 'Content-Type: application/cdmi-capability' --header 'X-CDMI-Specification-Version: 1.0.2' -k https://IP_address:port/CDMI/cdmi_capabilities/dataobject/

    IP_address and port are for an API Gateway Node or Storage Node.

    A response similar to the following appears:

    {"objectType":"application/cdmi-capability",
    "objectID":"00006FFD0009B60802","objectName":"dataobject/",
    "parentURI":"/CDMI/cdmi_capabilities/",
    "parentID":"00006FFD0009B74801",
    "capabilities":{"cdmi_read_value":"true","cdmi_read_value_range":"true",
    "cdmi_read_metadata":"true","cdmi_delete_dataobject":"true",
    "cdmi_size":"true","cdmi_ctime":"true",
    "cdmi_atime":"true",
    "cdmi_data_redundancy":"2","cdmi_immediate_redundancy":"true",
    "cdmi_hash":"true","cdmi_value_hash":["SHA256"]},
    "childrenrange":"","children":[]}

    This response includes the "cdmi_value_hash" capability, indicating that the SHA-256 hash algorithm is supported.