---
name: cephaas-curl
title: Using `cURL`
description: You can get the most out working with the command-line in most environments with IBM&reg; Storage Ceph&reg; as a Service and `cURL`.
last-updated: 2026-06-12
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/cephaas?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Using `cURL`
{: #curl}

You can get the most out working with the command-line in most environments with IBM&reg; Storage Ceph&reg; as a Service and `cURL`.
{: shortdesc}

Here's a 'cheat sheet' of basic `curl` commands for the IBM&reg; Storage Ceph&reg; as a Service REST API.



Using `curl` assumes a certain amount of familiarity with the command-line and Object Storage, and have the necessary information from a [credential](https://cloud.ibm.com/docs/cephaas?topic=cephaas-about-object-storage&format=markdown#about-hmac-creds), the [endpoints reference](https://cloud.ibm.com/docs/cephaas?topic=cephaas-endpoints&format=markdown), or the [console](https://cloud.ibm.com/docs/cephaas?topic=cephaas-getting-started&format=markdown). If any terms or variables are unfamiliar, they can be found in the [glossary](https://cloud.ibm.com/docs/overview?topic=overview-glossary&format=markdown).

**Note**: Personally Identifiable Information (PII): When _naming_ buckets or objects, do not use any information that can identify any user (natural person) by name, location, or any other means.
{: tip}

## Request an IAM Token
{: #curl-iam}

Two ways you can generate an IAM `oauth` token for authenticating requests are using a `curl` command with an API key (described later), or from the command-line by using [IBM Cloud&reg; CLI](https://cloud.ibm.com/docs/cli?topic=cli-ibmcloud_commands_iam&format=markdown#ibmcloud_iam_oauth_tokens).

### Request an IAM token by using an API key
{: #curl-token}

Ensure that you have an API key. You can get one from [IBM Cloud&reg; Identity and Access Management](https://cloud.ibm.com/iam/apikeys).

```curl
curl -X "POST" "https://iam.cloud.ibm.com/oidc/token" \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/x-www-form-urlencoded' \
     --data-urlencode "apikey={api-key}" \
     --data-urlencode "response_type=cloud_iam" \
     --data-urlencode "grant_type=urn:ibm:params:oauth:grant-type:apikey"
```
{: codeblock}

## Get your resource instance ID
{: #curl-instance-id}

Some of the following commands require an `ibm-service-instance-id` parameter. To find this value, go to the **Credentials** tab of your Object Storage instance in the cloud console. Create a credential if needed, then use the _View credentials_ menu to see the JSON format. Use the value of `resource_instance_id`.

For use with curl APIs, you need only the UUID that starts after the last single colon and ends before the final double colon. For example, the ID `crn:v1:bluemix:public:software-defined-storage:global:a/81caa0254631ce5f9330ae427618f209:39d8d161-22c4-4b77-a856-f11db5130d7d::` can be abbreviated to `39d8d161-22c4-4b77-a856-f11db5130d7d`.
{: tip}



## Next Steps
{: #curl-next-steps}

The detailed description of the RESTful API for IBM Storage Ceph as a Service can be found in the [IBM Storage Ceph as a Service Object Storage API Documentation](https://cloud.ibm.com/docs/apis/object-storage){: external}.