# Web Cloud › Domains › Tasks API

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

> 8 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/web-cloud/domains/tasks/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/web-cloud/domains/tasks.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/web-cloud/domains/tasks.json?format=openapi3

## Operations

- `GET /domain/name/{domainName}/task` — List tasks related to a managed domain name resource
- `GET /domain/name/{domainName}/task/{taskId}` — Get a specific task related to a managed domain name resource
- `PUT /domain/name/{domainName}/task/{taskId}` — Update a domain name task with additional details
- `GET /domain/{serviceName}/task` — List all domain tasks
- `GET /domain/{serviceName}/task/{id}` — Get details about a domain task
- `POST /domain/{serviceName}/task/{id}/accelerate` — Accelerate the task
- `POST /domain/{serviceName}/task/{id}/cancel` — Cancel the task
- `POST /domain/{serviceName}/task/{id}/relaunch` — Relaunch the task

## List tasks related to a managed domain name resource

`GET /v2/domain/name/{domainName}/task`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/tasks/#get-domain-name-domainname-task

**Status:** Beta version  
**IAM actions:** `domain:apiovh:name/task/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `domainName` | path | string | yes | Domain name |
| `status` | query | common.TaskStatusEnum |  | Filter the tasks by status — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | query | domain.task.TaskTypeEnum |  | Filter the tasks by type (operation name, for example DomainTrade, DomainContactUpdate) — one of `ContactControl`, `ContactControlAcknowledge`, `ContactControlCorrect`, `ContactControlNotify`, `DomainAfterMarket`, `DomainContactControl`, `DomainContactUpdate`, `DomainCreate`, `DomainDelete`, `DomainDnsUpdate`, `DomainDsUpdate`, `DomainEmailRedirectionsCreate`, … |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.task.DomainTask[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `additionalDetails` | domain.task.AdditionalDetails | read-only | Operation-specific details, present for certain task types like DomainIncomingTransfer |
| `additionalDetails.dnssec` | domain.task.additionalDetails.DnssecTransferStatus | read-only | DNSSEC-related transfer analysis details |
| `additionalDetails.dnssec.decision` | domain.task.additionalDetails.dnssecTransferStatus.Decision | read-only | Decision taken regarding DNSSEC handling during the transfer |
| `additionalDetails.dnssec.preTransfer` | domain.task.additionalDetails.dnssecTransferStatus.PreTransfer | read-only | DNSSEC status detected before the transfer |
| `additionalDetails.dnssec.registry` | domain.task.additionalDetails.dnssecTransferStatus.Registry | read-only | Registry capability information regarding DNSSEC |
| `additionalDetails.dnssecRiskAcknowledged` | boolean |  | Set to true to accept the DNSSEC risk and proceed with the transfer |
| `additionalDetails.estimatedCompletionAt` | string (date-time) | read-only | Estimated date when the task will complete |
| `createdAt` | string (date-time) | read-only | Creation date of the task |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `finishedAt` | string (date-time) | read-only | Ending date of the task |
| `id` | string (uuid) | read-only | Unique identifier of the task |
| `link` | string | read-only | Link to the related resource |
| `message` | string | read-only | Description of the task |
| `progress` | common.TaskProgress[] | read-only | Progress steps of the asynchronous operation |
| `progress[].name` | string | read-only | Progress step name |
| `progress[].status` | common.TaskStatusEnum | read-only | Current status of the progress step — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `startedAt` | string (date-time) | read-only | Starting date of the task |
| `status` | common.TaskStatusEnum | read-only | Current global status of the task — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the task |
| `updatedAt` | string (date-time) | read-only | Last update of the task |

```json
[
  {
    "additionalDetails": {
      "dnssec": {
        "decision": {
          "autoHandling": true,
          "preserveDnssec": true,
          "reason": "string",
          "status": "BLOCKED",
          "synchronizeDnsRecords": true
        },
        "preTransfer": {
          "dnskeyCount": 0,
          "dsCount": 0,
          "hadDnssec": true,
          "hasDnskey": true
        },
        "registry": {
          "supportsDnssec": true
        }
      },
      "dnssecRiskAcknowledged": true,
      "estimatedCompletionAt": "2024-01-01T12:00:00Z"
    },
    "createdAt": "2024-01-01T12:00:00Z",
    "errors": [
      {
        "message": "string"
      }
    ],
    "finishedAt": "2024-01-01T12:00:00Z",
    "id": "00000000-0000-0000-0000-000000000000",
    "link": "string",
    "message": "string",
    "progress": [
      {
        "name": "string",
        "status": "DONE"
      }
    ],
    "startedAt": "2024-01-01T12:00:00Z",
    "status": "DONE",
    "type": "string",
    "updatedAt": "2024-01-01T12:00:00Z"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/domain/name/{domainName}/task" \
  -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("/v2/domain/name/{domainName}/task")

# 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("/v2/domain/name/{domainName}/task");

print_r($result);
?>
```

## Get a specific task related to a managed domain name resource

`GET /v2/domain/name/{domainName}/task/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/tasks/#get-domain-name-domainname-task-taskid

**Status:** Beta version  
**IAM actions:** `domain:apiovh:name/task/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `taskId` | path | string (uuid) | yes | Task ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.task.DomainTask | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `additionalDetails` | domain.task.AdditionalDetails | read-only | Operation-specific details, present for certain task types like DomainIncomingTransfer |
| `additionalDetails.dnssec` | domain.task.additionalDetails.DnssecTransferStatus | read-only | DNSSEC-related transfer analysis details |
| `additionalDetails.dnssec.decision` | domain.task.additionalDetails.dnssecTransferStatus.Decision | read-only | Decision taken regarding DNSSEC handling during the transfer |
| `additionalDetails.dnssec.preTransfer` | domain.task.additionalDetails.dnssecTransferStatus.PreTransfer | read-only | DNSSEC status detected before the transfer |
| `additionalDetails.dnssec.registry` | domain.task.additionalDetails.dnssecTransferStatus.Registry | read-only | Registry capability information regarding DNSSEC |
| `additionalDetails.dnssecRiskAcknowledged` | boolean |  | Set to true to accept the DNSSEC risk and proceed with the transfer |
| `additionalDetails.estimatedCompletionAt` | string (date-time) | read-only | Estimated date when the task will complete |
| `createdAt` | string (date-time) | read-only | Creation date of the task |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `finishedAt` | string (date-time) | read-only | Ending date of the task |
| `id` | string (uuid) | read-only | Unique identifier of the task |
| `link` | string | read-only | Link to the related resource |
| `message` | string | read-only | Description of the task |
| `progress` | common.TaskProgress[] | read-only | Progress steps of the asynchronous operation |
| `progress[].name` | string | read-only | Progress step name |
| `progress[].status` | common.TaskStatusEnum | read-only | Current status of the progress step — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `startedAt` | string (date-time) | read-only | Starting date of the task |
| `status` | common.TaskStatusEnum | read-only | Current global status of the task — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the task |
| `updatedAt` | string (date-time) | read-only | Last update of the task |

```json
{
  "additionalDetails": {
    "dnssec": {
      "decision": {
        "autoHandling": true,
        "preserveDnssec": true,
        "reason": "string",
        "status": "BLOCKED",
        "synchronizeDnsRecords": true
      },
      "preTransfer": {
        "dnskeyCount": 0,
        "dsCount": 0,
        "hadDnssec": true,
        "hasDnskey": true
      },
      "registry": {
        "supportsDnssec": true
      }
    },
    "dnssecRiskAcknowledged": true,
    "estimatedCompletionAt": "2024-01-01T12:00:00Z"
  },
  "createdAt": "2024-01-01T12:00:00Z",
  "errors": [
    {
      "message": "string"
    }
  ],
  "finishedAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "link": "string",
  "message": "string",
  "progress": [
    {
      "name": "string",
      "status": "DONE"
    }
  ],
  "startedAt": "2024-01-01T12:00:00Z",
  "status": "DONE",
  "type": "string",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/domain/name/{domainName}/task/{taskId}" \
  -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("/v2/domain/name/{domainName}/task/{taskId}")

# 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("/v2/domain/name/{domainName}/task/{taskId}");

print_r($result);
?>
```

## Update a domain name task with additional details

`PUT /v2/domain/name/{domainName}/task/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/tasks/#put-domain-name-domainname-task-taskid

**Status:** Beta version  
**IAM actions:** `domain:apiovh:name/task/edit`

Provide additional details on a task to unblock its processing.

## Acknowledge DNSSEC risk

When an incoming transfer is blocked due to a DNSSEC risk, set `dnssecRiskAcknowledged` to `true` to accept the risk and proceed with the transfer. When omitted or set to `false`, no action is taken.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domainName` | path | string | yes | Domain name |
| `taskId` | path | string (uuid) | yes | Task ID |

### Request body (required)

Type: `domain.task.AdditionalDetails`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `dnssec` | domain.task.additionalDetails.DnssecTransferStatus | read-only | DNSSEC-related transfer analysis details |
| `dnssec.decision` | domain.task.additionalDetails.dnssecTransferStatus.Decision | read-only | Decision taken regarding DNSSEC handling during the transfer |
| `dnssec.decision.autoHandling` | boolean | read-only | Whether DNSSEC handling is performed automatically |
| `dnssec.decision.preserveDnssec` | boolean | read-only | Whether DNSSEC records will be preserved after transfer |
| `dnssec.decision.reason` | string | read-only | Human-readable explanation of the decision |
| `dnssec.decision.status` | domain.task.additionalDetails.dnssecTransferStatus.DecisionStatusEnum | read-only | Status of the DNSSEC transfer decision — one of `BLOCKED`, `PROCEED` |
| `dnssec.decision.synchronizeDnsRecords` | boolean | read-only | Whether DNS records will be synchronized after transfer |
| `dnssec.preTransfer` | domain.task.additionalDetails.dnssecTransferStatus.PreTransfer | read-only | DNSSEC status detected before the transfer |
| `dnssec.preTransfer.dnskeyCount` | integer | read-only | Number of DNSKEY records found |
| `dnssec.preTransfer.dsCount` | integer | read-only | Number of DS records found |
| `dnssec.preTransfer.hadDnssec` | boolean | read-only | Whether the domain had active DNSSEC before transfer |
| `dnssec.preTransfer.hasDnskey` | boolean | read-only | Whether the domain had DNSKEY records |
| `dnssec.registry` | domain.task.additionalDetails.dnssecTransferStatus.Registry | read-only | Registry capability information regarding DNSSEC |
| `dnssec.registry.supportsDnssec` | boolean | read-only | Whether the registry supports DNSSEC |
| `dnssecRiskAcknowledged` | boolean |  | Set to true to accept the DNSSEC risk and proceed with the transfer |
| `estimatedCompletionAt` | string (date-time) | read-only | Estimated date when the task will complete |

```json
{
  "dnssecRiskAcknowledged": true
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.task.DomainTask | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `additionalDetails` | domain.task.AdditionalDetails | read-only | Operation-specific details, present for certain task types like DomainIncomingTransfer |
| `additionalDetails.dnssec` | domain.task.additionalDetails.DnssecTransferStatus | read-only | DNSSEC-related transfer analysis details |
| `additionalDetails.dnssec.decision` | domain.task.additionalDetails.dnssecTransferStatus.Decision | read-only | Decision taken regarding DNSSEC handling during the transfer |
| `additionalDetails.dnssec.preTransfer` | domain.task.additionalDetails.dnssecTransferStatus.PreTransfer | read-only | DNSSEC status detected before the transfer |
| `additionalDetails.dnssec.registry` | domain.task.additionalDetails.dnssecTransferStatus.Registry | read-only | Registry capability information regarding DNSSEC |
| `additionalDetails.dnssecRiskAcknowledged` | boolean |  | Set to true to accept the DNSSEC risk and proceed with the transfer |
| `additionalDetails.estimatedCompletionAt` | string (date-time) | read-only | Estimated date when the task will complete |
| `createdAt` | string (date-time) | read-only | Creation date of the task |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `finishedAt` | string (date-time) | read-only | Ending date of the task |
| `id` | string (uuid) | read-only | Unique identifier of the task |
| `link` | string | read-only | Link to the related resource |
| `message` | string | read-only | Description of the task |
| `progress` | common.TaskProgress[] | read-only | Progress steps of the asynchronous operation |
| `progress[].name` | string | read-only | Progress step name |
| `progress[].status` | common.TaskStatusEnum | read-only | Current status of the progress step — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `startedAt` | string (date-time) | read-only | Starting date of the task |
| `status` | common.TaskStatusEnum | read-only | Current global status of the task — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the task |
| `updatedAt` | string (date-time) | read-only | Last update of the task |

```json
{
  "additionalDetails": {
    "dnssec": {
      "decision": {
        "autoHandling": true,
        "preserveDnssec": true,
        "reason": "string",
        "status": "BLOCKED",
        "synchronizeDnsRecords": true
      },
      "preTransfer": {
        "dnskeyCount": 0,
        "dsCount": 0,
        "hadDnssec": true,
        "hasDnskey": true
      },
      "registry": {
        "supportsDnssec": true
      }
    },
    "dnssecRiskAcknowledged": true,
    "estimatedCompletionAt": "2024-01-01T12:00:00Z"
  },
  "createdAt": "2024-01-01T12:00:00Z",
  "errors": [
    {
      "message": "string"
    }
  ],
  "finishedAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "link": "string",
  "message": "string",
  "progress": [
    {
      "name": "string",
      "status": "DONE"
    }
  ],
  "startedAt": "2024-01-01T12:00:00Z",
  "status": "DONE",
  "type": "string",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/domain/name/{domainName}/task/{taskId}" \
  -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: domain.task.AdditionalDetails
result = client.put("/v2/domain/name/{domainName}/task/{taskId}",
	dnssecRiskAcknowledged = None, # Set to true to accept the DNSSEC risk and proceed with the transfer (type: boolean, 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: domain.task.AdditionalDetails
$result = $ovh->put("/v2/domain/name/{domainName}/task/{taskId}", array(
	dnssecRiskAcknowledged => null, // Set to true to accept the DNSSEC risk and proceed with the transfer (type: boolean, nullable)
));

print_r($result);
?>
```

## List all domain tasks

`GET /1.0/domain/{serviceName}/task`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/tasks/#get-domain-servicename-task

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:task/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `function` | query | string |  | Filter the value of function property (like) |
| `serviceName` | path | string | yes | Service name |
| `status` | query | domain.OperationStatusEnum |  | Filter the value of status property (=) — one of `cancelled`, `doing`, `done`, `error`, `problem`, `todo` |
| `type` | query | domain.OperationTypeEnum |  | Filter the value of type property (=) — one of `alldom`, `domain` |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/task" \
  -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("/domain/{serviceName}/task")

# 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("/domain/{serviceName}/task");

print_r($result);
?>
```

## Get details about a domain task

`GET /1.0/domain/{serviceName}/task/{id}`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/tasks/#get-domain-servicename-task-id

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:task/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | domain.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `canAccelerate` | boolean | read-only | Can accelerate the task |
| `canCancel` | boolean | read-only | Can cancel the task |
| `canRelaunch` | boolean | read-only | Can relaunch the task |
| `comment` | string | read-only | Comment about the task |
| `creationDate` | string (date-time) | read-only | Creation date of the task |
| `domain` | string | read-only | Domain of the task |
| `doneDate` | string (date-time) | read-only | Done date of the task |
| `function` | string | read-only | Function of the task |
| `id` | integer | read-only | Id of the task |
| `lastUpdate` | string (date-time) | read-only | Last update date of the task |
| `status` | domain.OperationStatusEnum | read-only | Status of the task — one of `cancelled`, `doing`, `done`, `error`, `problem`, `todo` |
| `todoDate` | string (date-time) | read-only | Todo date of the task |
| `type` | domain.OperationTypeEnum | read-only | type of the task — one of `alldom`, `domain` |

```json
{
  "canAccelerate": true,
  "canCancel": true,
  "canRelaunch": true,
  "comment": "string",
  "creationDate": "2024-01-01T12:00:00Z",
  "domain": "string",
  "doneDate": "2024-01-01T12:00:00Z",
  "function": "string",
  "id": 0,
  "lastUpdate": "2024-01-01T12:00:00Z",
  "status": "cancelled",
  "todoDate": "2024-01-01T12:00:00Z",
  "type": "alldom"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/task/{id}" \
  -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("/domain/{serviceName}/task/{id}")

# 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("/domain/{serviceName}/task/{id}");

print_r($result);
?>
```

## Accelerate the task

`POST /1.0/domain/{serviceName}/task/{id}/accelerate`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/tasks/#post-domain-servicename-task-id-accelerate

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:task/accelerate`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |
| `serviceName` | path | string | yes | Service name |

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/task/{id}/accelerate" \
  -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.post("/domain/{serviceName}/task/{id}/accelerate")

# 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->post("/domain/{serviceName}/task/{id}/accelerate");

print_r($result);
?>
```

## Cancel the task

`POST /1.0/domain/{serviceName}/task/{id}/cancel`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/tasks/#post-domain-servicename-task-id-cancel

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:task/cancel`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |
| `serviceName` | path | string | yes | Service name |

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/task/{id}/cancel" \
  -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.post("/domain/{serviceName}/task/{id}/cancel")

# 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->post("/domain/{serviceName}/task/{id}/cancel");

print_r($result);
?>
```

## Relaunch the task

`POST /1.0/domain/{serviceName}/task/{id}/relaunch`

Link: https://developers.eu.ovhcloud.com/reference/web-cloud/domains/tasks/#post-domain-servicename-task-id-relaunch

**Status:** Stable production version  
**IAM actions:** `domain:apiovh:task/relaunch`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id |
| `serviceName` | path | string | yes | Service name |

### Responses

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

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/domain/{serviceName}/task/{id}/relaunch" \
  -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.post("/domain/{serviceName}/task/{id}/relaunch")

# 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->post("/domain/{serviceName}/task/{id}/relaunch");

print_r($result);
?>
```
