---
description: Collection of functions to interact with the Programs API endpoint.
---

# IProgramsService.Programs

{% hint style="info" %}
All URI’s are relative to the VTN URL configured.
{% endhint %}

<table><thead><tr><th width="228">Method</th><th>HTTP request</th><th>Description</th></tr></thead><tbody><tr><td><a href="#createprogramasync">CreateProgramAsync</a></td><td>POST /programs</td><td>Create a program</td></tr><tr><td><a href="#deleteprogramasync">DeleteProgramAsync</a></td><td>DELETE /programs/{programID}</td><td>Delete a program</td></tr><tr><td><a href="#searchprogramsasync">SearchProgramsAsync</a></td><td>GET /programs</td><td>Searches all programs</td></tr><tr><td><a href="#findprogrambyidasync">FindProgramByIdAsync</a></td><td>GET /programs/{programID}</td><td>Searches programs by program ID</td></tr><tr><td><a href="#updateprogramasync">UpdateProgramAsync</a></td><td>PUT /programs/{programID}</td><td>Update a program</td></tr></tbody></table>

## CreateProgramAsync

```csharp
Task<Program> CreateProgramAsync(
    Program program,
    RequestOptions? options = default,
    CancellationToken cancellationToken = default)
```

Create a new program in the server.

## **DeleteProgramAsync**

```csharp
Task<Program> DeleteProgramAsync(
    string programId,
    RequestOptions? options = default,
    CancellationToken cancellationToken = default)
```

Delete an existing program with the program ID.

## **SearchProgramsAsync**

```csharp
Task<List<Program>> SearchProgramsAsync(
    string? targetType = default,
    List<string>? targetValues = default,
    int? skip = default,
    int? limit = default,
 RequestOptions? options = default,
    CancellationToken cancellationToken = default)
```

Searches all programs known to the server. Use skip and pagination query params to limit response size.

## **FindProgramByIdAsync**

```csharp
Task<Program> FindProgramByIdAsync(
    string programId,
    RequestOptions? options = default,
    CancellationToken cancellationToken = default)
```

Find program associated by the program ID.

## **UpdateProgramAsync**

```csharp
Task<Program> UpdateProgramAsync(
    string programId,
    Program program,
    RequestOptions? options = default,
    CancellationToken cancellationToken = default)
```

Update an existing program with specified program ID.
