Skip to content

API Access

All operations require authentication.

5 operationsv1/me/api
Agent setup

Retrieve all credentialsProduction

GET
/1.0/me/api/credential

Query parameters

applicationId
integer

Filter by applicationId

status
CredentialStateEnum

Filter by status

ValuesexpiredpendingValidationrefusedvalidated

Response

200integer[]successful operation

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/1.0/me/api/credential \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ 0]

Retrieve information about a credentialProduction

GET
/1.0/me/api/credential/{credentialId}

Path parameters

credentialId
required
integer

Credential ID

Response

200ApiCredentialsuccessful operation
allowedIPs
ipBlock[]

If defined, list of ip blocks which are allowed to call API with this credential

applicationId
read-only
integer

ID of associated API Application

creation
read-only
stringdate-time

Creation date of this credential

credentialId
read-only
integer

ID of this credential

expiration
read-only
stringdate-time

Expiration date of this credential

lastUse
read-only
stringdate-time

Last use date of this credential

ovhSupport
read-only
boolean

States whether this credential has been created by yourself or by the OVH support team

rules
read-only
AccessRule[]

API routes allowed to this credential

status
read-only
CredentialStateEnum

State of to this credential

ValuesexpiredpendingValidationrefusedvalidated

Example uses credentialId = 0

$ curl https://api.eu.ovhcloud.com/1.0/me/api/credential/{credentialId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "allowedIPs": [ "192.0.2.0/24" ], "applicationId": 0, "creation": "2024-01-01T12:00:00Z", "credentialId": 0, "expiration": "2024-01-01T12:00:00Z", "lastUse": "2024-01-01T12:00:00Z", "ovhSupport": true, "rules": [ { "method": "DELETE", "path": "string" } ], "status": "expired"}

Edit a credentialProduction

PUT
/1.0/me/api/credential/{credentialId}

Path parameters

credentialId
required
integer

Credential ID

Request body (required)

allowedIPs
ipBlock[]

If defined, list of ip blocks which are allowed to call API with this credential

applicationId
read-only
integer

ID of associated API Application

creation
read-only
stringdate-time

Creation date of this credential

credentialId
read-only
integer

ID of this credential

expiration
read-only
stringdate-time

Expiration date of this credential

lastUse
read-only
stringdate-time

Last use date of this credential

ovhSupport
read-only
boolean

States whether this credential has been created by yourself or by the OVH support team

rules
read-only
AccessRule[]

API routes allowed to this credential

status
read-only
CredentialStateEnum

State of to this credential

ValuesexpiredpendingValidationrefusedvalidated

Response

200—successful operation

Example uses credentialId = 0

$ curl https://api.eu.ovhcloud.com/1.0/me/api/credential/{credentialId} \
  -H "authorization: Bearer $OVH_TOKEN"

Delete a credentialProduction

DELETE
/1.0/me/api/credential/{credentialId}

Path parameters

credentialId
required
integer

Credential ID

Response

200—successful operation

Example uses credentialId = 0

$ curl https://api.eu.ovhcloud.com/1.0/me/api/credential/{credentialId} \
  -H "authorization: Bearer $OVH_TOKEN"

Get associated applicationProduction

GET
/1.0/me/api/credential/{credentialId}/application

Path parameters

credentialId
required
integer

Credential ID

Response

200ApiApplicationsuccessful operation
applicationId
read-only
integer

ID of this Application

applicationKey
read-only
string

Key of this application

description
read-only
string

Description of this application

name
read-only
string

Name of this application

status
read-only
ApplicationStatusEnum

Status of this application

Valuesactiveblockedinactivetrusted

Example uses credentialId = 0

$ curl https://api.eu.ovhcloud.com/1.0/me/api/credential/{credentialId}/application \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "applicationId": 0, "applicationKey": "string", "description": "string", "name": "string", "status": "active"}