---
updatedAt: 2026-03-01T18:58:38.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/netstorage/llms.txt
---

# List used NetStorage CP codes

```curl cURL
egcurl --eg-section default --request GET \

  --url "https://$hostname/storage/v1/cpcodes/used" \
  --header "Accept: application/json" 
```

```node Node
const EdgeGrid = require("akamai-edgegrid");
const os = require("os");
const edgercPath = os.homedir + "/.edgerc.txt";
const edgercSection = "default";
const eg = new EdgeGrid({
    path: edgercPath,
    section: edgercSection
});

eg.auth({
    path: `/storage/v1/cpcodes/used`,
    method: "GET",
    headers: {

        "Accept": "application/json"
    }
});
eg.send(function (error, response, body) {
    console.log(body);
});
```

```python Python
import requests
from akamai.edgegrid import EdgeGridAuth, EdgeRc
from urllib.parse import urljoin



edgerc = EdgeRc('~/.edgerc.txt')
section = 'default'
baseurl = 'https://%s' % edgerc.get(section, 'host')

session = requests.Session()
session.auth = EdgeGridAuth.from_edgerc(edgerc, section)

path = '/storage/v1/cpcodes/used'
headers = {

    "Accept": "application/json"
}

result = session.get(urljoin(baseurl, path), headers=headers)
print(result.status_code)
print(result.json())
```

```json Response Example
{
    "items": [
        {
            "cpcodeId": 123456,
            "storageGroupId": 28896,
            "storageGroupName": "mediadocs",
            "provisionStatus": "PROVISIONED"
        },
        {
            "cpcodeId": 234567,
            "storageGroupId": 28898,
            "storageGroupName": "netstoragedocs",
            "provisionStatus": "PROVISIONED"
        },
   ]
}
```

# Configure your client authentication

<!-- curl@1 -->
<!-- node@1-7 -->
<!-- python@1 -->

Before you can use this API, you need to [Create authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials).

To adapt this sample code, configure your client to use a signing library to pass in an `Authorization` header. Go to [EdgeGrid libraries](https://techdocs.akamai.com/developer/docs/authenticate-with-edgegrid#edgegrid-libraries) to see what's available. 

This recipe includes samples for [cURL](https://github.com/akamai/edgegrid-curl), [Node.js](https://github.com/akamai/AkamaiOPEN-edgegrid-node), and [Python](https://github.com/akamai/AkamaiOPEN-edgegrid-python).

# Form the request

<!-- curl@3-4 -->
<!-- node@10-16 -->
<!-- python@14-18 -->

Identify the endpoint

# Call the API

<!-- curl@1-5 -->
<!-- node@1-100 -->
<!-- python@1-100 -->

Issue a GET call to this endpoint.

# Review the response output.



The API responds with the `storageGroupId` and `storageGroupName` associated with each CP code in use.