# DefaultApi

All URIs are relative to *https://raw.githubusercontent.com/api/v1*

| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**addVMToInspection**](DefaultApi.md#addvmtoinspection) | **POST** /vms/{id}/inspection | Add VirtualMachine to inspection queue |
| [**createGroup**](DefaultApi.md#creategroupoperation) | **POST** /groups | Create a new group |
| [**deleteGroup**](DefaultApi.md#deletegroup) | **DELETE** /groups/{id} | Delete group |
| [**getAgentStatus**](DefaultApi.md#getagentstatus) | **GET** /agent | Get agent status |
| [**getCollectorStatus**](DefaultApi.md#getcollectorstatus) | **GET** /collector | Get collector status |
| [**getGroup**](DefaultApi.md#getgroup) | **GET** /groups/{id} | Get group by ID with its VMs |
| [**getInspectorStatus**](DefaultApi.md#getinspectorstatus) | **GET** /inspector | Get inspector status |
| [**getInspectorVddkStatus**](DefaultApi.md#getinspectorvddkstatus) | **GET** /inspector/vddk | Get VDDK status |
| [**getInventory**](DefaultApi.md#getinventory) | **GET** /inventory | Get collected inventory |
| [**getVM**](DefaultApi.md#getvm) | **GET** /vms/{id} | Get details about a vm |
| [**getVMs**](DefaultApi.md#getvms) | **GET** /vms | Get list of VMs with filtering and pagination |
| [**getVersion**](DefaultApi.md#getversion) | **GET** /version | Get agent version information |
| [**listGroups**](DefaultApi.md#listgroups) | **GET** /groups | List all groups |
| [**putInspectorCredentials**](DefaultApi.md#putinspectorcredentials) | **PUT** /inspector/credentials | Set or replace inspector credentials |
| [**putInspectorVddk**](DefaultApi.md#putinspectorvddk) | **PUT** /inspector/vddk | Upload VDDK tarball |
| [**removeVMFromInspection**](DefaultApi.md#removevmfrominspection) | **DELETE** /vms/{id}/inspection | Remove VirtualMachine from inspection queue |
| [**setAgentMode**](DefaultApi.md#setagentmode) | **POST** /agent | Change agent mode |
| [**startCollector**](DefaultApi.md#startcollector) | **POST** /collector | Start inventory collection |
| [**startInspection**](DefaultApi.md#startinspectionoperation) | **POST** /inspector | Start inspection for VMs |
| [**stopCollector**](DefaultApi.md#stopcollector) | **DELETE** /collector | Stop collection |
| [**stopInspection**](DefaultApi.md#stopinspection) | **DELETE** /inspector | Stop inspector entirely |
| [**updateGroup**](DefaultApi.md#updategroupoperation) | **PATCH** /groups/{id} | Update group |



## addVMToInspection

> VmInspectionStatus addVMToInspection(id)

Add VirtualMachine to inspection queue

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { AddVMToInspectionRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  const body = {
    // string
    id: id_example,
  } satisfies AddVMToInspectionRequest;

  try {
    const data = await api.addVMToInspection(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **id** | `string` |  | [Defaults to `undefined`] |

### Return type

[**VmInspectionStatus**](VmInspectionStatus.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **202** | VM added to inspection queue |  -  |
| **400** | Inspector not running |  -  |
| **404** | VirtualMachine not found |  -  |
| **409** | VM already in inspection queue |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## createGroup

> Group createGroup(createGroupRequest)

Create a new group

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { CreateGroupOperationRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  const body = {
    // CreateGroupRequest
    createGroupRequest: ...,
  } satisfies CreateGroupOperationRequest;

  try {
    const data = await api.createGroup(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **createGroupRequest** | [CreateGroupRequest](CreateGroupRequest.md) |  | |

### Return type

[**Group**](Group.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **201** | Group created |  -  |
| **400** | Invalid request (e.g., invalid filter syntax) |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## deleteGroup

> deleteGroup(id)

Delete group

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { DeleteGroupRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  const body = {
    // string | Group ID
    id: id_example,
  } satisfies DeleteGroupRequest;

  try {
    const data = await api.deleteGroup(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **id** | `string` | Group ID | [Defaults to `undefined`] |

### Return type

`void` (Empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **204** | Group deleted |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## getAgentStatus

> AgentStatus getAgentStatus()

Get agent status

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { GetAgentStatusRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  try {
    const data = await api.getAgentStatus();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**AgentStatus**](AgentStatus.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Agent status |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## getCollectorStatus

> CollectorStatus getCollectorStatus()

Get collector status

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { GetCollectorStatusRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  try {
    const data = await api.getCollectorStatus();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**CollectorStatus**](CollectorStatus.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Collector status |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## getGroup

> GroupResponse getGroup(id, sort, page, pageSize)

Get group by ID with its VMs

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { GetGroupRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  const body = {
    // string | Group ID
    id: id_example,
    // Array<string> | Sort fields with direction (e.g., \"name:asc\" or \"cluster:desc,name:asc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues. (optional)
    sort: ["cluster:asc","name:desc"],
    // number | Page number for pagination (optional)
    page: 56,
    // number | Number of items per page (optional)
    pageSize: 56,
  } satisfies GetGroupRequest;

  try {
    const data = await api.getGroup(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **id** | `string` | Group ID | [Defaults to `undefined`] |
| **sort** | `Array<string>` | Sort fields with direction (e.g., \&quot;name:asc\&quot; or \&quot;cluster:desc,name:asc\&quot;). Valid fields are name, vCenterState, cluster, diskSize, memory, issues. | [Optional] |
| **page** | `number` | Page number for pagination | [Optional] [Defaults to `1`] |
| **pageSize** | `number` | Number of items per page | [Optional] [Defaults to `undefined`] |

### Return type

[**GroupResponse**](GroupResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Group details with VMs |  -  |
| **404** | Group not found |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## getInspectorStatus

> InspectorStatus getInspectorStatus(includeVddk, includeCredentials)

Get inspector status

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { GetInspectorStatusRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  const body = {
    // boolean | If true, include uploaded VDDK metadata (`version`, `md5`) when present. omitted if VDDK was never uploaded. (optional)
    includeVddk: true,
    // boolean | If true, include configured vCenter URL and username (password is never returned). omitted if was never set. (optional)
    includeCredentials: true,
  } satisfies GetInspectorStatusRequest;

  try {
    const data = await api.getInspectorStatus(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **includeVddk** | `boolean` | If true, include uploaded VDDK metadata (&#x60;version&#x60;, &#x60;md5&#x60;) when present. omitted if VDDK was never uploaded. | [Optional] [Defaults to `false`] |
| **includeCredentials** | `boolean` | If true, include configured vCenter URL and username (password is never returned). omitted if was never set. | [Optional] [Defaults to `false`] |

### Return type

[**InspectorStatus**](InspectorStatus.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Inspector status |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## getInspectorVddkStatus

> VddkProperties getInspectorVddkStatus()

Get VDDK status

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { GetInspectorVddkStatusRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  try {
    const data = await api.getInspectorVddkStatus();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**VddkProperties**](VddkProperties.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the current properties of the uploaded VMware VDDK tar. If the VDDK package has not been uploaded, a 404 response is returned.  |  -  |
| **404** | Vddk not found |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## getInventory

> GetInventory200Response getInventory(withAgentId, groupId)

Get collected inventory

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { GetInventoryRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  const body = {
    // boolean | If true, include the agentId in the response (Compatible with manual inventory upload). (optional)
    withAgentId: true,
    // string | Filter inventory to VMs matching this group\'s filter expression (optional)
    groupId: groupId_example,
  } satisfies GetInventoryRequest;

  try {
    const data = await api.getInventory(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **withAgentId** | `boolean` | If true, include the agentId in the response (Compatible with manual inventory upload). | [Optional] [Defaults to `false`] |
| **groupId** | `string` | Filter inventory to VMs matching this group\&#39;s filter expression | [Optional] [Defaults to `undefined`] |

### Return type

[**GetInventory200Response**](GetInventory200Response.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Collected inventory |  -  |
| **404** | Inventory not available |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## getVM

> VirtualMachineDetail getVM(id)

Get details about a vm

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { GetVMRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  const body = {
    // string | VirtualMachine id
    id: id_example,
  } satisfies GetVMRequest;

  try {
    const data = await api.getVM(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **id** | `string` | VirtualMachine id | [Defaults to `undefined`] |

### Return type

[**VirtualMachineDetail**](VirtualMachineDetail.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | VirtualMachine details |  -  |
| **404** | VirtualMachine not found |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## getVMs

> VirtualMachineListResponse getVMs(byExpression, sort, page, pageSize)

Get list of VMs with filtering and pagination

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { GetVMsRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  const body = {
    // string | Filter by expression (matches VMs with the provided expression) (optional)
    byExpression: exp1,
    // Array<string> | Sort fields with direction (e.g., \"name:asc\" or \"cluster:desc,name:asc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues. (optional)
    sort: ["cluster:asc","name:desc"],
    // number | Page number for pagination (optional)
    page: 56,
    // number | Number of items per page (optional)
    pageSize: 56,
  } satisfies GetVMsRequest;

  try {
    const data = await api.getVMs(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **byExpression** | `string` | Filter by expression (matches VMs with the provided expression) | [Optional] [Defaults to `undefined`] |
| **sort** | `Array<string>` | Sort fields with direction (e.g., \&quot;name:asc\&quot; or \&quot;cluster:desc,name:asc\&quot;). Valid fields are name, vCenterState, cluster, diskSize, memory, issues. | [Optional] |
| **page** | `number` | Page number for pagination | [Optional] [Defaults to `1`] |
| **pageSize** | `number` | Number of items per page | [Optional] [Defaults to `undefined`] |

### Return type

[**VirtualMachineListResponse**](VirtualMachineListResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | List of VMs |  -  |
| **400** | Invalid request parameters |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## getVersion

> VersionInfo getVersion()

Get agent version information

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { GetVersionRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  try {
    const data = await api.getVersion();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**VersionInfo**](VersionInfo.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Version information |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## listGroups

> GroupListResponse listGroups(byName, page, pageSize)

List all groups

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { ListGroupsRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  const body = {
    // string | Filter groups by name (case-insensitive substring match) (optional)
    byName: byName_example,
    // number | Page number (1-indexed) (optional)
    page: 56,
    // number | Number of groups per page (optional)
    pageSize: 56,
  } satisfies ListGroupsRequest;

  try {
    const data = await api.listGroups(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **byName** | `string` | Filter groups by name (case-insensitive substring match) | [Optional] [Defaults to `undefined`] |
| **page** | `number` | Page number (1-indexed) | [Optional] [Defaults to `1`] |
| **pageSize** | `number` | Number of groups per page | [Optional] [Defaults to `20`] |

### Return type

[**GroupListResponse**](GroupListResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | List of groups |  -  |
| **400** | Invalid filter expression |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## putInspectorCredentials

> putInspectorCredentials(vcenterCredentials)

Set or replace inspector credentials

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { PutInspectorCredentialsRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  const body = {
    // VcenterCredentials
    vcenterCredentials: ...,
  } satisfies PutInspectorCredentialsRequest;

  try {
    const data = await api.putInspectorCredentials(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **vcenterCredentials** | [VcenterCredentials](VcenterCredentials.md) |  | |

### Return type

`void` (Empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: Not defined


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Credentials updated successfully |  -  |
| **400** | Bad Credentials |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## putInspectorVddk

> VddkProperties putInspectorVddk(file)

Upload VDDK tarball

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { PutInspectorVddkRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  const body = {
    // Blob | VDDK tarball
    file: BINARY_DATA_HERE,
  } satisfies PutInspectorVddkRequest;

  try {
    const data = await api.putInspectorVddk(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **file** | `Blob` | VDDK tarball | [Defaults to `undefined`] |

### Return type

[**VddkProperties**](VddkProperties.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: `multipart/form-data`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Upload successful |  -  |
| **409** | Conflict |  -  |
| **413** | File exceeds 64MB limit |  -  |
| **400** | Bad request |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## removeVMFromInspection

> VmInspectionStatus removeVMFromInspection(id)

Remove VirtualMachine from inspection queue

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { RemoveVMFromInspectionRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  const body = {
    // string
    id: id_example,
  } satisfies RemoveVMFromInspectionRequest;

  try {
    const data = await api.removeVMFromInspection(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **id** | `string` |  | [Defaults to `undefined`] |

### Return type

[**VmInspectionStatus**](VmInspectionStatus.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | VMs removed from queue |  -  |
| **400** | Inspector not running or VirtualMachine cannot be canceled |  -  |
| **404** | VirtualMachine not found or not in the queue |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## setAgentMode

> AgentStatus setAgentMode(agentModeRequest)

Change agent mode

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { SetAgentModeRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  const body = {
    // AgentModeRequest
    agentModeRequest: ...,
  } satisfies SetAgentModeRequest;

  try {
    const data = await api.setAgentMode(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **agentModeRequest** | [AgentModeRequest](AgentModeRequest.md) |  | |

### Return type

[**AgentStatus**](AgentStatus.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Mode changed |  -  |
| **400** | Invalid request |  -  |
| **409** | Conflict |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## startCollector

> CollectorStatus startCollector(collectorStartRequest)

Start inventory collection

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { StartCollectorRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  const body = {
    // CollectorStartRequest
    collectorStartRequest: ...,
  } satisfies StartCollectorRequest;

  try {
    const data = await api.startCollector(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **collectorStartRequest** | [CollectorStartRequest](CollectorStartRequest.md) |  | |

### Return type

[**CollectorStatus**](CollectorStatus.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **202** | Collection started |  -  |
| **400** | Invalid request |  -  |
| **409** | Collection already in progress |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## startInspection

> InspectorStatus startInspection(startInspectionRequest)

Start inspection for VMs

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { StartInspectionOperationRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  const body = {
    // StartInspectionRequest
    startInspectionRequest: ...,
  } satisfies StartInspectionOperationRequest;

  try {
    const data = await api.startInspection(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **startInspectionRequest** | [StartInspectionRequest](StartInspectionRequest.md) |  | |

### Return type

[**InspectorStatus**](InspectorStatus.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **202** | Inspection started |  -  |
| **400** | Invalid request |  -  |
| **409** | Inspector already running |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## stopCollector

> stopCollector()

Stop collection

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { StopCollectorRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  try {
    const data = await api.stopCollector();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

`void` (Empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **204** | Collection stopped |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## stopInspection

> InspectorStatus stopInspection()

Stop inspector entirely

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { StopInspectionRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  try {
    const data = await api.stopInspection();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**InspectorStatus**](InspectorStatus.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | VMs removed from queue |  -  |
| **400** | Already in canceling state |  -  |
| **404** | Inspector not running |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## updateGroup

> Group updateGroup(id, updateGroupRequest)

Update group

### Example

```ts
import {
  Configuration,
  DefaultApi,
} from '@openshift-migration-advisor/agent-sdk';
import type { UpdateGroupOperationRequest } from '@openshift-migration-advisor/agent-sdk';

async function example() {
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
  const api = new DefaultApi();

  const body = {
    // string | Group ID
    id: id_example,
    // UpdateGroupRequest
    updateGroupRequest: ...,
  } satisfies UpdateGroupOperationRequest;

  try {
    const data = await api.updateGroup(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **id** | `string` | Group ID | [Defaults to `undefined`] |
| **updateGroupRequest** | [UpdateGroupRequest](UpdateGroupRequest.md) |  | |

### Return type

[**Group**](Group.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Group updated |  -  |
| **400** | Invalid request (e.g., invalid filter syntax) |  -  |
| **404** | Group not found |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

