# Network › IP addresses › WHOIS API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Network product's sections: https://developers.eu.ovhcloud.com/reference/network/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 3 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/network/ip-addresses/whois/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/network/ip-addresses/whois.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/network/ip-addresses/whois.json?format=openapi3

## Operations

- `GET /ip/{ip}/ripe` — Get RIPE information
- `POST /ip/{ip}/changeOrg` — Change the organization
- `PUT /ip/{ip}/ripe` — Update RIPE information

## Get RIPE information

`GET /1.0/ip/{ip}/ripe`

Link: https://developers.eu.ovhcloud.com/reference/network/ip-addresses/whois/#get-ip-ip-ripe

**Status:** Stable production version  
**IAM actions:** `ip:apiovh:ripe/get`

Get RIPE information. Returns the netname and description registered for the block in the RIPE database, as shown in WHOIS.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | path | ipBlock | yes | IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24) |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ip.RipeInfos | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | IP RIPE description |
| `netname` | string |  | IP RIPE netname |

```json
{
  "description": "string",
  "netname": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/ip/{ip}/ripe" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/ip/{ip}/ripe")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/ip/{ip}/ripe");

print_r($result);
?>
```

## Change the organization

`POST /1.0/ip/{ip}/changeOrg`

Link: https://developers.eu.ovhcloud.com/reference/network/ip-addresses/whois/#post-ip-ip-changeorg

**Status:** Stable production version  
**IAM actions:** `ip:apiovh:changeOrg`

Change the organization. Sets the RIR organization (from /me/ipOrganisation) on the block's registry record (async task).

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | path | ipBlock | yes | IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24) |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `organisation` | string | yes | Your organisation id (RIPE_XXXX) to add on block informations |

```json
{
  "organisation": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ip.IpTask | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `comment` | string | read-only | Details of this task |
| `destination` | ip.RoutedTo | read-only | Destination for moveFloatingIp tasks |
| `destination.serviceName` | string |  | Service where ip is routed to |
| `doneDate` | string (date-time) | read-only | Completion date |
| `function` | ip.TaskFunctionEnum | read-only | Function name — one of `arinBlockReassign`, `changeRipeOrg`, `checkAndReleaseIp`, `genericMoveFloatingIp`, `supernetByoipFailoverPartitioning` |
| `lastUpdate` | string (date-time) | read-only | last update |
| `startDate` | string (date-time) | read-only | Task Creation date |
| `status` | ip.TaskStatusEnum | read-only | Task status — one of `cancelled`, `customerError`, `doing`, `done`, `init`, `ovhError`, `todo` |
| `taskId` | integer | read-only | the id of the task |

```json
{
  "comment": "string",
  "destination": {
    "serviceName": "string"
  },
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "arinBlockReassign",
  "lastUpdate": "2024-01-01T12:00:00Z",
  "startDate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "taskId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/ip/{ip}/changeOrg" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: string
result = client.post("/ip/{ip}/changeOrg",
	organisation = None, # Your organisation id (RIPE_XXXX) to add on block informations (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: string
$result = $ovh->post("/ip/{ip}/changeOrg", array(
	organisation => null, // Your organisation id (RIPE_XXXX) to add on block informations (type: string)
));

print_r($result);
?>
```

## Update RIPE information

`PUT /1.0/ip/{ip}/ripe`

Link: https://developers.eu.ovhcloud.com/reference/network/ip-addresses/whois/#put-ip-ip-ripe

**Status:** Stable production version  
**IAM actions:** `ip:apiovh:ripe/edit`

Update RIPE information. Changes the netname and description registered for the block in the RIPE database, as shown in WHOIS.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | path | ipBlock | yes | IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24) |

### Request body (required)

Type: `ip.RipeInfos`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | IP RIPE description |
| `netname` | string |  | IP RIPE netname |

```json
{
  "description": "string",
  "netname": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/ip/{ip}/ripe" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: ip.RipeInfos
result = client.put("/ip/{ip}/ripe",
	description = None, # IP RIPE description (type: string, nullable)
	netname = None, # IP RIPE netname (type: string, nullable)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: ip.RipeInfos
$result = $ovh->put("/ip/{ip}/ripe", array(
	description => null, // IP RIPE description (type: string, nullable)
	netname => null, // IP RIPE netname (type: string, nullable)
));

print_r($result);
?>
```
