Skip to content

Instantly share code, notes, and snippets.

@LoicMahieu
Created June 15, 2015 09:22
Show Gist options
  • Save LoicMahieu/4912e0e3e1bc7ce3dadb to your computer and use it in GitHub Desktop.
Save LoicMahieu/4912e0e3e1bc7ce3dadb to your computer and use it in GitHub Desktop.
OVH Object Storage

Reminder for OVH Object storage API

OVH Part

  • GET /cloud/project
[
  "123"
]
  • GET /cloud/project/{serviceName}/storage

serviceName = 123

[
  {
    storedBytes: 186452
    region: "SBG1"
    name: "igloo-test"
    id: "123"
    storedObjects: 2
  }
]
  • GET /cloud/project/{serviceName}/storage/access

serviceName = 123

{
  token: "xyz"
  endpoints: [
    {
      url: "https://storage.sbg1.cloud.ovh.net/v1/AUTH_abc"
      region: "SBG1"
    }
  ]
}

Object Storage

List objects

curl -i \
  -H "X-Auth-Token: xyz" \
  -X GET \
  https://storage.sbg1.cloud.ovh.net/v1/AUTH_abc/igloo-test

Create object

$FILENAME : File name

curl -i \
  -H "X-Auth-Token: xyz" \
  -X PUT \
  --data @file.png \
  https://storage.sbg1.cloud.ovh.net/v1/AUTH_abc/igloo-test/$FILENAME

Delete object

$FILENAME : File name

curl -i \
  -H "X-Auth-Token: xyz" \
  -X DELETE \
  https://storage.sbg1.cloud.ovh.net/v1/AUTH_abc/igloo-test/$FILENAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment