> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SuperOffice.WebApi.Agents.ProjectAgent

# \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent">\</a> Class ProjectAgent

Namespace: [SuperOffice.WebApi.Agents](SuperOffice.WebApi.Agents.md)\
Assembly: SuperOffice.WebApi.dll

Collection of all services that works with Project data.

```csharp theme={null}
public class ProjectAgent : AgentBase, IProjectAgent, IAgentBase, IDisposable
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[AgentBase](SuperOffice.WebApi.Agents.AgentBase.md) ←
[ProjectAgent](SuperOffice.WebApi.Agents.ProjectAgent.md)

#### Implements

[IProjectAgent](SuperOffice.WebApi.Agents.IProjectAgent.md),
[IAgentBase](SuperOffice.WebApi.Agents.IAgentBase.md),
[IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

#### Inherited Members

[AgentBase.\_json](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__json),
[AgentBase.\_binary](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__binary),
[AgentBase.\_config](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__config),
[AgentBase.\_client](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__client),
[AgentBase.\_disposeClient](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__disposeClient),
[AgentBase.Merge(RequestOptions)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Merge_SuperOffice_WebApi_RequestOptions_),
[AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromObject_System_Net_Http_HttpMethod_System_String_System_Object_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromStream_System_Net_Http_HttpMethod_System_String_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromObjectWithStream_System_Net_Http_HttpMethod_System_String_System_Object_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.ParseAuthorization(IAuthorization)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ParseAuthorization_SuperOffice_WebApi_Authorization_IAuthorization_),
[AgentBase.CancelRequest()](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_CancelRequest),
[AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_SendRequestObject_System_Net_Http_HttpMethod_System_String_System_Object_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_SendRequestObjectWithStream_System_Net_Http_HttpMethod_System_String_System_Object_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.SendRequest(HttpRequestMessage, RequestOptions)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_SendRequest_System_Net_Http_HttpRequestMessage_SuperOffice_WebApi_RequestOptions_),
[AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ThrowOnResponseErrorAsync_System_Net_Http_HttpRequestMessage_System_Net_Http_HttpResponseMessage_),
[AgentBase.ParseResponse\<T\&gt;(HttpResponseMessage)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ParseResponse__1_System_Net_Http_HttpResponseMessage_),
[AgentBase.Finally(RequestOptions)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Finally_SuperOffice_WebApi_RequestOptions_),
[AgentBase.Dispose()](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Dispose),
[AgentBase.Configuration](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Configuration),
[AgentBase.Client](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Client),
[AgentBase.HasRunningRequest](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_HasRunningRequest),
[AgentBase.ClientCancellationTokenSource](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ClientCancellationTokenSource),
[AgentBase.ProgressListener](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ProgressListener),
[AgentBase.UploadProgressListener](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_UploadProgressListener),
[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Examples

\<pre>\<code class="lang-csharp">using SuperOffice.WebApi;
using SuperOffice.WebApi.Agents;

var mySession = new WebApiOptions("[http://example.com/super/api](http://example.com/super/api)");
mySession.Authorization = new AuthorizationUsernamePassword("user", "pass");
using (ProjectAgent agent = new ProjectAgent(mySession))
\{
// call methods on agent here...
}\</code>\</pre>

## Constructors

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_\_ctor\_System\_Net\_Http\_HttpClient\_">\</a> ProjectAgent(HttpClient)

Constructor: Collection of all services that works with Project data.

```csharp theme={null}
public ProjectAgent(HttpClient httpClient)
```

#### Parameters

`httpClient` [HttpClient](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient)

Use this HTTP client instead of making own HttpClient instance.

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_\_ctor\_SuperOffice\_WebApi\_WebApiOptions\_System\_Net\_Http\_HttpClient\_">\</a> ProjectAgent(WebApiOptions, HttpClient)

Constructor: Collection of all services that works with Project data.

```csharp theme={null}
public ProjectAgent(WebApiOptions options, HttpClient httpClient = null)
```

#### Parameters

`options` [WebApiOptions](SuperOffice.WebApi.WebApiOptions.md)

Base URL and authentication values.

`httpClient` [HttpClient](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient)

Optional: Use this HTTP client instead of making a new one.

## Methods

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_AddProjectMembersAsync\_System\_Int32\_SuperOffice\_WebApi\_Data\_ProjectMember\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> AddProjectMembersAsync(int, ProjectMember\[], RequestOptions)

Add multiple project members to a project

```csharp theme={null}
public Task AddProjectMembersAsync(int projectEntityId, ProjectMember[] projectMembers, RequestOptions requestOptions = null)
```

#### Parameters

`projectEntityId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Project to add members to

`projectMembers` [ProjectMember](SuperOffice.WebApi.Data.ProjectMember.md)\[]

Project members to add

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_CreateDefaultProjectEntityAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultProjectEntityAsync(RequestOptions)

Set default values into a new ProjectEntity.
NetServer calculates default values on the entity, which is required when creating/storing a new instance

```csharp theme={null}
public Task<ProjectEntity> CreateDefaultProjectEntityAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectEntity](SuperOffice.WebApi.Data.ProjectEntity.md)\&gt;

A blank ProjectEntity

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_CreateDefaultProjectEventEntityAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultProjectEventEntityAsync(RequestOptions)

Set default values into a new ProjectEventEntity.
NetServer calculates default values on the entity, which is required when creating/storing a new instance

```csharp theme={null}
public Task<ProjectEventEntity> CreateDefaultProjectEventEntityAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectEventEntity](SuperOffice.WebApi.Data.ProjectEventEntity.md)\&gt;

A blank ProjectEventEntity

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_CreateDefaultProjectMemberAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultProjectMemberAsync(RequestOptions)

Set default values into a new ProjectMember.
NetServer calculates default values on the entity, which is required when creating/storing a new instance

```csharp theme={null}
public Task<ProjectMember> CreateDefaultProjectMemberAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectMember](SuperOffice.WebApi.Data.ProjectMember.md)\&gt;

A blank ProjectMember

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_CreateNewEntryAsync\_SuperOffice\_WebApi\_Data\_DuplicateEntry\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateNewEntryAsync(DuplicateEntry, RequestOptions)

Creates a new project based on external duplicate

```csharp theme={null}
public Task<int> CreateNewEntryAsync(DuplicateEntry duplicate, RequestOptions requestOptions = null)
```

#### Parameters

`duplicate` [DuplicateEntry](SuperOffice.WebApi.Data.DuplicateEntry.md)

The duplicate to create a new entry based upon

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[int](https://learn.microsoft.com/dotnet/api/system.int32)\&gt;

The database identity of the newly created entry

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_DeleteProjectEntityAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteProjectEntityAsync(int, RequestOptions)

Deletes the ProjectEntity

```csharp theme={null}
public Task DeleteProjectEntityAsync(int projectEntityId, RequestOptions requestOptions = null)
```

#### Parameters

`projectEntityId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identity of the ProjectEntity

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_DeleteProjectEventEntityAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteProjectEventEntityAsync(int, RequestOptions)

Deletes the ProjectEventEntity

```csharp theme={null}
public Task DeleteProjectEventEntityAsync(int projectEventEntityId, RequestOptions requestOptions = null)
```

#### Parameters

`projectEventEntityId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identity of the ProjectEventEntity

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_DeleteProjectEventEntityFromProjectIdAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteProjectEventEntityFromProjectIdAsync(int, RequestOptions)

Delete a project event based on a project id. Does not delete the project, but does delete the published and ExternalEvent and AudienceVisibility records.

```csharp theme={null}
public Task DeleteProjectEventEntityFromProjectIdAsync(int projectId, RequestOptions requestOptions = null)
```

#### Parameters

`projectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The project id of the external event to delete.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

Nothing

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_DeleteProjectMemberAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteProjectMemberAsync(int, RequestOptions)

Deletes the ProjectMember

```csharp theme={null}
public Task DeleteProjectMemberAsync(int projectMemberId, RequestOptions requestOptions = null)
```

#### Parameters

`projectMemberId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identity of the ProjectMember

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_DeleteProjectMemberByIdsAsync\_System\_Int32\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteProjectMemberByIdsAsync(int\[], RequestOptions)

Deletes projectmembers rows.

```csharp theme={null}
public Task DeleteProjectMemberByIdsAsync(int[] projectMemberIds, RequestOptions requestOptions = null)
```

#### Parameters

`projectMemberIds` [int](https://learn.microsoft.com/dotnet/api/system.int32)\[]

An Array of projectmember ids.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_DeleteProjectMembersAsync\_System\_Int32\_System\_Int32\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteProjectMembersAsync(int, int\[], RequestOptions)

Delete the given project members from a project

```csharp theme={null}
public Task DeleteProjectMembersAsync(int projectEntityId, int[] memberIds, RequestOptions requestOptions = null)
```

#### Parameters

`projectEntityId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Project to remove members from

`memberIds` [int](https://learn.microsoft.com/dotnet/api/system.int32)\[]

Project member ids

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetDuplicateRulesAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetDuplicateRulesAsync(RequestOptions)

Retrieve all available duplicate rules for project

```csharp theme={null}
public Task<DuplicateRule[]> GetDuplicateRulesAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[DuplicateRule](SuperOffice.WebApi.Data.DuplicateRule.md)\[]\&gt;

All available duplicate rules

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetDuplicatesAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetDuplicatesAsync(string, RequestOptions)

Get duplicates(exact or similar in the database) based on the name

```csharp theme={null}
public Task<DuplicateEntry[]> GetDuplicatesAsync(string name, RequestOptions requestOptions = null)
```

#### Parameters

`name` [string](https://learn.microsoft.com/dotnet/api/system.string)

Name used for lookup

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[DuplicateEntry](SuperOffice.WebApi.Data.DuplicateEntry.md)\[]\&gt;

Any records matching the specified name

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetMyMemberProjectsAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetMyMemberProjectsAsync(RequestOptions)

Returning the projects where an user is project member.

```csharp theme={null}
public Task<Project[]> GetMyMemberProjectsAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Project](SuperOffice.WebApi.Data.Project.md)\[]\&gt;

The list of projects.

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetMyProjectEventsAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetMyProjectEventsAsync(RequestOptions)

Gets all project events that belongs to the currently logged on user. The list of events are filtered by the Audience Visibility restrictions set when the project event is created.

```csharp theme={null}
public Task<ProjectEvent[]> GetMyProjectEventsAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectEvent](SuperOffice.WebApi.Data.ProjectEvent.md)\[]\&gt;

Array of project events

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetMyProjectsAsync\_System\_Boolean\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetMyProjectsAsync(bool, RequestOptions)

Returning the projects belonging to an associate. If memberProjects is false only the projects where the associate is project responsible is returned, otherwise both the projects where the associate is project responsible and project member is returned.

```csharp theme={null}
public Task<Project[]> GetMyProjectsAsync(bool includeMemberProjects, RequestOptions requestOptions = null)
```

#### Parameters

`includeMemberProjects` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

True to include projects where the user is project member.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Project](SuperOffice.WebApi.Data.Project.md)\[]\&gt;

The list of projects

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetMyPublishedProjectsAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetMyPublishedProjectsAsync(RequestOptions)

Get published projects from the logged in user.

```csharp theme={null}
public Task<Project[]> GetMyPublishedProjectsAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Project](SuperOffice.WebApi.Data.Project.md)\[]\&gt;

Projects

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetNextMilestoneAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetNextMilestoneAsync(int, RequestOptions)

Next upcoming milestone appointment

```csharp theme={null}
public Task<Appointment> GetNextMilestoneAsync(int projectId, RequestOptions requestOptions = null)
```

#### Parameters

`projectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Project id - primary key

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Appointment](SuperOffice.WebApi.Data.Appointment.md)\&gt;

Upcoming milestone appointment

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetNextProjectStatusAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetNextProjectStatusAsync(int, RequestOptions)

```csharp theme={null}
public Task<int> GetNextProjectStatusAsync(int projectId, RequestOptions requestOptions = null)
```

#### Parameters

`projectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[int](https://learn.microsoft.com/dotnet/api/system.int32)\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectAsync(int, RequestOptions)

Gets a specific Project object.

```csharp theme={null}
public Task<Project> GetProjectAsync(int projectId, RequestOptions requestOptions = null)
```

#### Parameters

`projectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identifier of the Project object

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Project](SuperOffice.WebApi.Data.Project.md)\&gt;

Project

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectEntityAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectEntityAsync(int, RequestOptions)

Gets a specific ProjectEntity object.

```csharp theme={null}
public Task<ProjectEntity> GetProjectEntityAsync(int projectEntityId, RequestOptions requestOptions = null)
```

#### Parameters

`projectEntityId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identifier of the ProjectEntity object

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectEntity](SuperOffice.WebApi.Data.ProjectEntity.md)\&gt;

ProjectEntity

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectEntityWithoutMembersAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectEntityWithoutMembersAsync(int, RequestOptions)

Get a project entity with no project members. Project members property is always an empty array.

```csharp theme={null}
public Task<ProjectEntity> GetProjectEntityWithoutMembersAsync(int projectId, RequestOptions requestOptions = null)
```

#### Parameters

`projectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The project id of the project.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectEntity](SuperOffice.WebApi.Data.ProjectEntity.md)\&gt;

Project entity with the specified id. The project members property is always an empty array.

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectEventAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectEventAsync(int, RequestOptions)

Gets a specific ProjectEvent object.

```csharp theme={null}
public Task<ProjectEvent> GetProjectEventAsync(int projectEventId, RequestOptions requestOptions = null)
```

#### Parameters

`projectEventId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identifier of the ProjectEvent object

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectEvent](SuperOffice.WebApi.Data.ProjectEvent.md)\&gt;

ProjectEvent

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectEventEntityAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectEventEntityAsync(int, RequestOptions)

Gets a specific ProjectEventEntity object.

```csharp theme={null}
public Task<ProjectEventEntity> GetProjectEventEntityAsync(int projectEventEntityId, RequestOptions requestOptions = null)
```

#### Parameters

`projectEventEntityId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identifier of the ProjectEventEntity object

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectEventEntity](SuperOffice.WebApi.Data.ProjectEventEntity.md)\&gt;

ProjectEventEntity

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectEventEntityFromProjectIdAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectEventEntityFromProjectIdAsync(int, RequestOptions)

Get a ProjectEventEntity based on a projectId.

```csharp theme={null}
public Task<ProjectEventEntity> GetProjectEventEntityFromProjectIdAsync(int projectId, RequestOptions requestOptions = null)
```

#### Parameters

`projectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The projectId to get a ProjectEventEntity for

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectEventEntity](SuperOffice.WebApi.Data.ProjectEventEntity.md)\&gt;

ProjectEventEntity

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectEventListAsync\_System\_Int32\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectEventListAsync(int\[], RequestOptions)

Gets an array of specific ProjectEvent objects.

```csharp theme={null}
public Task<ProjectEvent[]> GetProjectEventListAsync(int[] projectEventIds, RequestOptions requestOptions = null)
```

#### Parameters

`projectEventIds` [int](https://learn.microsoft.com/dotnet/api/system.int32)\[]

The identifiers of the ProjectEvent object

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectEvent](SuperOffice.WebApi.Data.ProjectEvent.md)\[]\&gt;

Array of ProjectEvent objects

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectEventOnPersonAsync\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectEventOnPersonAsync(int, int, RequestOptions)

Gets a ProjectEvent object from a project and a person.

```csharp theme={null}
public Task<ProjectEvent> GetProjectEventOnPersonAsync(int projectId, int personId, RequestOptions requestOptions = null)
```

#### Parameters

`projectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The project Id

`personId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Id of the person the project events belong to.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectEvent](SuperOffice.WebApi.Data.ProjectEvent.md)\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectEventsOnPersonAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectEventsOnPersonAsync(int, RequestOptions)

Gets all project events that belongs to the person specified. The list of events are filtered by the Audience Visibility restrictions set when the project event is created.

```csharp theme={null}
public Task<ProjectEvent[]> GetProjectEventsOnPersonAsync(int personId, RequestOptions requestOptions = null)
```

#### Parameters

`personId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Id of the person the project events belong to.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectEvent](SuperOffice.WebApi.Data.ProjectEvent.md)\[]\&gt;

Array of project events

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectFencingInfoAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectFencingInfoAsync(RequestOptions)

Get the current project fencing status for the tenant

```csharp theme={null}
public Task<FencingInfo> GetProjectFencingInfoAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[FencingInfo](SuperOffice.WebApi.Data.FencingInfo.md)\&gt;

Current fencing status including count, maximum, and warning state

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectImageAsync\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectImageAsync(int, string, RequestOptions)

Returns the project image that is displayed in the CRM application.

```csharp theme={null}
public Task<byte[]> GetProjectImageAsync(int projectId, string returnContentType = "application/octet-stream", RequestOptions requestOptions = null)
```

#### Parameters

`projectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The project id of the project the image belongs to.

`returnContentType` [string](https://learn.microsoft.com/dotnet/api/system.string)

Accept content-type. Default "application/octet-stream". Could also be "application/pdf", "text/plain", "text/html", or "multipart/related"

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[byte](https://learn.microsoft.com/dotnet/api/system.byte)\[]\&gt;

The project image.

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectListAsync\_System\_Int32\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectListAsync(int\[], RequestOptions)

Gets an array of specific Project objects.

```csharp theme={null}
public Task<Project[]> GetProjectListAsync(int[] projectIds, RequestOptions requestOptions = null)
```

#### Parameters

`projectIds` [int](https://learn.microsoft.com/dotnet/api/system.int32)\[]

The identifiers of the Project object

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Project](SuperOffice.WebApi.Data.Project.md)\[]\&gt;

Array of Project objects

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectMemberAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectMemberAsync(int, RequestOptions)

Gets a specific ProjectMember object.

```csharp theme={null}
public Task<ProjectMember> GetProjectMemberAsync(int projectMemberId, RequestOptions requestOptions = null)
```

#### Parameters

`projectMemberId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identifier of the ProjectMember object

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectMember](SuperOffice.WebApi.Data.ProjectMember.md)\&gt;

ProjectMember

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectMembersAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectMembersAsync(int, RequestOptions)

Returns an array of project members

```csharp theme={null}
public Task<ProjectMember[]> GetProjectMembersAsync(int projectId, RequestOptions requestOptions = null)
```

#### Parameters

`projectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The project id

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectMember](SuperOffice.WebApi.Data.ProjectMember.md)\[]\&gt;

An array of project members

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectMembersByIdAsync\_System\_Int32\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectMembersByIdAsync(int\[], RequestOptions)

Returns an array of project members

```csharp theme={null}
public Task<ProjectMember[]> GetProjectMembersByIdAsync(int[] projectMemberIds, RequestOptions requestOptions = null)
```

#### Parameters

`projectMemberIds` [int](https://learn.microsoft.com/dotnet/api/system.int32)\[]

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectMember](SuperOffice.WebApi.Data.ProjectMember.md)\[]\&gt;

An array of project members

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectsFromContactAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectsFromContactAsync(int, RequestOptions)

Returns all projects where the given contact has projectmembers.

```csharp theme={null}
public Task<Project[]> GetProjectsFromContactAsync(int contactId, RequestOptions requestOptions = null)
```

#### Parameters

`contactId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The contact id

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Project](SuperOffice.WebApi.Data.Project.md)\[]\&gt;

ProjectListEntity

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetProjectsFromPersonAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProjectsFromPersonAsync(int, RequestOptions)

Return all projects where the person is project member.

```csharp theme={null}
public Task<Project[]> GetProjectsFromPersonAsync(int personId, RequestOptions requestOptions = null)
```

#### Parameters

`personId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The person id

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Project](SuperOffice.WebApi.Data.Project.md)\[]\&gt;

ProjectListEntity

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetPublishedProjectAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetPublishedProjectAsync(int, RequestOptions)

Get published project by project id.

```csharp theme={null}
public Task<Project> GetPublishedProjectAsync(int projectId, RequestOptions requestOptions = null)
```

#### Parameters

`projectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The project id.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Project](SuperOffice.WebApi.Data.Project.md)\&gt;

Project

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetPublishedProjectsAsync\_System\_Int32\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetPublishedProjectsAsync(int\[], RequestOptions)

Get published projects by project ids.

```csharp theme={null}
public Task<Project[]> GetPublishedProjectsAsync(int[] projectIds, RequestOptions requestOptions = null)
```

#### Parameters

`projectIds` [int](https://learn.microsoft.com/dotnet/api/system.int32)\[]

The array of project ids

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Project](SuperOffice.WebApi.Data.Project.md)\[]\&gt;

Projects

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_GetPublishedProjectsOnPersonIdAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetPublishedProjectsOnPersonIdAsync(int, RequestOptions)

Get published projects where person  is a member

```csharp theme={null}
public Task<Project[]> GetPublishedProjectsOnPersonIdAsync(int personId, RequestOptions requestOptions = null)
```

#### Parameters

`personId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The person id

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Project](SuperOffice.WebApi.Data.Project.md)\[]\&gt;

Array of project

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_HasGuideActivitiesAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> HasGuideActivitiesAsync(int, RequestOptions)

```csharp theme={null}
public Task<bool> HasGuideActivitiesAsync(int projectId, RequestOptions requestOptions = null)
```

#### Parameters

`projectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_HasGuideAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> HasGuideAsync(int, RequestOptions)

Does this project have a guide associated with its project type?

```csharp theme={null}
public Task<bool> HasGuideAsync(int projectId, RequestOptions requestOptions = null)
```

#### Parameters

`projectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Project id

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

True if the project has a guide

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_IsNumberValidAsync\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> IsNumberValidAsync(int, string, RequestOptions)

Checks if the number is unique or required.  The setting is configured from admin under system options.

```csharp theme={null}
public Task<bool> IsNumberValidAsync(int contactId, string number, RequestOptions requestOptions = null)
```

#### Parameters

`contactId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The Project id

`number` [string](https://learn.microsoft.com/dotnet/api/system.string)

The number to check for uniqueness and validity

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

True if the number is valid

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_MergeAsync\_System\_Int32\_System\_Int32\_System\_Boolean\_SuperOffice\_WebApi\_RequestOptions\_">\</a> MergeAsync(int, int, bool, RequestOptions)

Merge two projects into one, removing the source project in the process

```csharp theme={null}
public Task MergeAsync(int sourceProjectId, int destinationProjectId, bool replaceEmptyFieldsOnDestination, RequestOptions requestOptions = null)
```

#### Parameters

`sourceProjectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Id of source project for merge. This project is removed after the merge is completed.

`destinationProjectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Id of destination project to merge to. This project is updated with info from the source.

`replaceEmptyFieldsOnDestination` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

Fill in empty fields on destination from source?

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_OfferAutoNextStatusOnApppointmentCompletedAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> OfferAutoNextStatusOnApppointmentCompletedAsync(int, RequestOptions)

```csharp theme={null}
public Task<bool> OfferAutoNextStatusOnApppointmentCompletedAsync(int appointmentId, RequestOptions requestOptions = null)
```

#### Parameters

`appointmentId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_SaveProjectEntityAsync\_SuperOffice\_WebApi\_Data\_ProjectEntity\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveProjectEntityAsync(ProjectEntity, RequestOptions)

Updates the existing ProjectEntity or creates a new ProjectEntity if the id parameter is 0.

```csharp theme={null}
public Task<ProjectEntity> SaveProjectEntityAsync(ProjectEntity projectEntity, RequestOptions requestOptions = null)
```

#### Parameters

`projectEntity` [ProjectEntity](SuperOffice.WebApi.Data.ProjectEntity.md)

The ProjectEntity that is saved.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectEntity](SuperOffice.WebApi.Data.ProjectEntity.md)\&gt;

New or updated ProjectEntity

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_SaveProjectEntityWithoutMembersAsync\_SuperOffice\_WebApi\_Data\_ProjectEntity\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveProjectEntityWithoutMembersAsync(ProjectEntity, RequestOptions)

Save a project entity, the project members are ignored.

```csharp theme={null}
public Task<ProjectEntity> SaveProjectEntityWithoutMembersAsync(ProjectEntity projectEntity, RequestOptions requestOptions = null)
```

#### Parameters

`projectEntity` [ProjectEntity](SuperOffice.WebApi.Data.ProjectEntity.md)

The project entity to save. Any set project members are ignored.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectEntity](SuperOffice.WebApi.Data.ProjectEntity.md)\&gt;

The saved project entity without any project members. The project members property is always an empty array.

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_SaveProjectEventEntityAsync\_SuperOffice\_WebApi\_Data\_ProjectEventEntity\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveProjectEventEntityAsync(ProjectEventEntity, RequestOptions)

Updates the existing ProjectEventEntity or creates a new ProjectEventEntity if the id parameter is 0.

```csharp theme={null}
public Task<ProjectEventEntity> SaveProjectEventEntityAsync(ProjectEventEntity projectEventEntity, RequestOptions requestOptions = null)
```

#### Parameters

`projectEventEntity` [ProjectEventEntity](SuperOffice.WebApi.Data.ProjectEventEntity.md)

The ProjectEventEntity that is saved.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectEventEntity](SuperOffice.WebApi.Data.ProjectEventEntity.md)\&gt;

New or updated ProjectEventEntity

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_SaveProjectMemberAsync\_SuperOffice\_WebApi\_Data\_ProjectMember\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveProjectMemberAsync(ProjectMember, RequestOptions)

Updates the existing ProjectMember or creates a new ProjectMember if the id parameter is 0.

```csharp theme={null}
public Task<ProjectMember> SaveProjectMemberAsync(ProjectMember projectMember, RequestOptions requestOptions = null)
```

#### Parameters

`projectMember` [ProjectMember](SuperOffice.WebApi.Data.ProjectMember.md)

The ProjectMember that is saved.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectMember](SuperOffice.WebApi.Data.ProjectMember.md)\&gt;

New or updated ProjectMember

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_SaveProjectMembersFunctionAndCommentAsync\_System\_Int32\_\_\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveProjectMembersFunctionAndCommentAsync(int\[], int, string, RequestOptions)

Saves role and comment on an array of projectmembers represented by ids

```csharp theme={null}
public Task SaveProjectMembersFunctionAndCommentAsync(int[] projectMemberIds, int roleId, string comment, RequestOptions requestOptions = null)
```

#### Parameters

`projectMemberIds` [int](https://learn.microsoft.com/dotnet/api/system.int32)\[]

`roleId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

`comment` [string](https://learn.microsoft.com/dotnet/api/system.string)

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_SetCompletedAsync\_System\_Int32\_System\_Boolean\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetCompletedAsync(int, bool, RequestOptions)

Set the completed flag on the project

```csharp theme={null}
public Task SetCompletedAsync(int projectId, bool isCompleted, RequestOptions requestOptions = null)
```

#### Parameters

`projectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

`isCompleted` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

True if the project is completed, false if it is not

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

This method has no return value

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_SetDuplicateRulesStatusAsync\_SuperOffice\_WebApi\_Data\_DuplicateRule\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetDuplicateRulesStatusAsync(DuplicateRule\[], RequestOptions)

Set which duplicate rules should be active or not

```csharp theme={null}
public Task SetDuplicateRulesStatusAsync(DuplicateRule[] rules, RequestOptions requestOptions = null)
```

#### Parameters

`rules` [DuplicateRule](SuperOffice.WebApi.Data.DuplicateRule.md)\[]

Duplicate rules to update active status for

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_SetProjectImageAsync\_System\_Int32\_System\_Byte\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetProjectImageAsync(int, byte\[], RequestOptions)

Stores the project image that is displayed in the CRM application.

```csharp theme={null}
public Task SetProjectImageAsync(int projectId, byte[] image, RequestOptions requestOptions = null)
```

#### Parameters

`projectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The project id of the project the image belongs to.

`image` [byte](https://learn.microsoft.com/dotnet/api/system.byte)\[]

The project image.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_UpdateProjectMemberAsync\_SuperOffice\_WebApi\_Data\_ProjectMember\_SuperOffice\_WebApi\_RequestOptions\_">\</a> UpdateProjectMemberAsync(ProjectMember, RequestOptions)

Updates a ProjectMember row.

```csharp theme={null}
public Task<ProjectMember> UpdateProjectMemberAsync(ProjectMember projectMember, RequestOptions requestOptions = null)
```

#### Parameters

`projectMember` [ProjectMember](SuperOffice.WebApi.Data.ProjectMember.md)

ProjectMember to update

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProjectMember](SuperOffice.WebApi.Data.ProjectMember.md)\&gt;

The Updated ProjectMember

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_UpdateProjectMembersAsync\_System\_Int32\_SuperOffice\_WebApi\_Data\_ProjectMember\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> UpdateProjectMembersAsync(int, ProjectMember\[], RequestOptions)

Update existing project members. Not creating new (only projectmember\_id > 0 accepted)

```csharp theme={null}
public Task UpdateProjectMembersAsync(int projectId, ProjectMember[] projectMembers, RequestOptions requestOptions = null)
```

#### Parameters

`projectId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Project of which members will be updated

`projectMembers` [ProjectMember](SuperOffice.WebApi.Data.ProjectMember.md)\[]

Project members to update

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

This method has no return value

### \<a id="SuperOffice\_WebApi\_Agents\_ProjectAgent\_ValidateProjectEntityAsync\_SuperOffice\_WebApi\_Data\_ProjectEntity\_SuperOffice\_WebApi\_RequestOptions\_">\</a> ValidateProjectEntityAsync(ProjectEntity, RequestOptions)

Check that entity is ready for saving, return error messages by field.

```csharp theme={null}
public Task<StringDictionary> ValidateProjectEntityAsync(ProjectEntity projectEntity, RequestOptions requestOptions = null)
```

#### Parameters

`projectEntity` [ProjectEntity](SuperOffice.WebApi.Data.ProjectEntity.md)

Entity to be checked for errors.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[StringDictionary](SuperOffice.WebApi.Data.StringDictionary.md)\&gt;

Error messages tagged by field.
