---
title: "Interface ILinkHelper"
slug: "web-sdk--stylelabs.m.sdk.webclient.contracts.ilinkhelper"
abstract: ""
---
# Interface ILinkHelper

Contains functionality to build and parse links.

## Namespace: StylelabsStylelabs.MSdkWebClientContracts

## Assembly: Stylelabs.M.Sdk.WebClient.dll

## Syntax

```csharp
public interface ILinkHelper
```

## Methods

### CommandToLinkAsync(string, string)

Generates a link to a command.

#### Declaration

```csharp
Task<Link> CommandToLinkAsync(string @namespace, string command)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | namespace | The namespace. |
| string | command | The command. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### CopyEntityToLinkAsync(long)

Creates a link to the copy entity endpoint.

#### Declaration

```csharp
Task<Link> CopyEntityToLinkAsync(long id)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| long | id | The entity id. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### CreateUploadToLinkAsync()

Generates a link to create an upload.

#### Declaration

```csharp
Task<Link> CreateUploadToLinkAsync()
```

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### DataSourcesLinkAsync()

Creates a link to the data sources endpoint.

#### Declaration

```csharp
Task<Link> DataSourcesLinkAsync()
```

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### DataSourceToLinkAsync(string)

Creates a link to the datasource with the specified `name`.

#### Declaration

```csharp
Task<Link> DataSourceToLinkAsync(string name)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | The name of the datasource to link to. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A link to the datasource with the specified `name`. |

### DefinitionsToLinksAsync(IEnumerable<long>, long?, long?, bool?)

Creates links to the specified entity definitions by id.

#### Declaration

```csharp
Task<Link> DefinitionsToLinksAsync(IEnumerable<long> ids, long? skip = null, long? take = null, bool? includeConditionalMembers = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| IEnumerable<>long | ids | The ids of the entity definitions to include in the result. |
| long | skip | Number of results to skip. |
| long | take | Number or results to fetch. |
| bool | includeConditionalMembers | Optionally include conditional members. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | Links to the entity definitions with the specified `ids`. |

### DefinitionsToLinksAsync(IEnumerable<string>, long?, long?, bool?)

Creates links to the specified entity definitions by name.

#### Declaration

```csharp
Task<Link> DefinitionsToLinksAsync(IEnumerable<string> names, long? skip = null, long? take = null, bool? includeConditionalMembers = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| IEnumerable<>string | names | The names of the entity definitions to include in the result. |
| long | skip | Number of results to skip. |
| long | take | Number or results to fetch. |
| bool | includeConditionalMembers | Optionally include conditional members. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | Links to the entity definitions with the specified `names`. |

### DefinitionsToLinksAsync(long?, long?, bool?)

Creates a link to the entity definitions endpoint.

#### Declaration

```csharp
Task<Link> DefinitionsToLinksAsync(long? skip = null, long? take = null, bool? includeConditionalMembers = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| long | skip | Number of results to skip. |
| long | take | Number or results to fetch. |
| bool | includeConditionalMembers | Optionally include conditional members. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | Links to the entity definitions included in this batch. |

### DefinitionToLinkAsync(long, bool?)

Creates a link to the entity definition with the specified `id`.

#### Declaration

```csharp
Task<Link> DefinitionToLinkAsync(long id, bool? includeConditionalMembers = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| long | id | The id of the entity definition to link to. |
| bool | includeConditionalMembers | Optionally include conditional members. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A link to the entity definition with the specified `id`. |

### DefinitionToLinkAsync(string, bool?)

Creates a link to the entity definition with the specified `name`.

#### Declaration

```csharp
Task<Link> DefinitionToLinkAsync(string name, bool? includeConditionalMembers = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | The name of the entity definition to link to. |
| bool | includeConditionalMembers | Optionally include conditional members. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A link to the entity definition with the specified `name`. |

### DefinitionToLinkV2Async(string, bool?)

Creates a link to the entity definition with the specified `name`.

#### Declaration

```csharp
Task<Link> DefinitionToLinkV2Async(string name, bool? includeConditionalMembers = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | The name of the entity definition to link to. |
| bool | includeConditionalMembers | Optionally include conditional members. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A link to the entity definition with the specified `name`. |

### DownloadOrderToLinkAsync(long)

Generates a link to send a download order.

#### Declaration

```csharp
Task<Link> DownloadOrderToLinkAsync(long downloadOrderId)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| long | downloadOrderId | The download order id. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### EntitiesLinkAsync()

Creates a link to the entities endpoint.

#### Declaration

```csharp
Task<Link> EntitiesLinkAsync()
```

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### EntitiesToLinksAsync(IEnumerable<long>)

Creates links to the entities with the specified `ids`.

#### Declaration

```csharp
Task<IList<Link>> EntitiesToLinksAsync(IEnumerable<long> ids)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| IEnumerable<>long | ids | The ids of the entities to link to. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>IList<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | Link to the entities with the specified `ids`. |

### EntityToLinkAsync(long, CultureInfo)

Creates a link to the entity with the specified `id`.

#### Declaration

```csharp
Task<Link> EntityToLinkAsync(long id, CultureInfo culture = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| long | id | The id of the entity to link to. |
| CultureInfo | culture | Optional culture for the entity. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A link to the entity with the specified `id`. |

### EntityToLinkAsync(string)

Creates a link to the entity with the specified `identifier`.

#### Declaration

```csharp
Task<Link> EntityToLinkAsync(string identifier)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | identifier | The identifier of the entity to link to. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A link to the entity with the specified `identifier`. |

### ExecuteScriptToLinkAsync(string)

Gets the link to execute a script with specified `identifier`.

#### Declaration

```csharp
Task<Link> ExecuteScriptToLinkAsync(string identifier)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | identifier | The identifier of the script. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### ExplainUserPermissionsForEntityToLinkAsync(long, long)

Returns a user's permissions for an entity.

#### Declaration

```csharp
Task<Link> ExplainUserPermissionsForEntityToLinkAsync(long id, long userId)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| long | id | The identifier of the entity. |
| long | userId | The identifier of the user. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | The [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### FetchJobsToLinkAsync()

Gets the link to the fetch jobs.

#### Declaration

```csharp
Task<Link> FetchJobsToLinkAsync()
```

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | The fetch job endpoint link. |

### FinalizeUploadToLinkAsync()

Generates a link to finalize an upload.

#### Declaration

```csharp
Task<Link> FinalizeUploadToLinkAsync()
```

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### IdentifierFromEntityAsync(Link)

Extracts the identifier of an entity from the specified `link`.

#### Declaration

```csharp
Task<string> IdentifierFromEntityAsync(Link link)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | link | The link to extract the identifier from. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>string | The identifier as extracted from the link. If the link doesn't contain an identifier, null is returned. |

### IdFromDownloadOrderAsync(Link)

Gets the download order id from the specified link.

#### Declaration

```csharp
Task<long?> IdFromDownloadOrderAsync(Link link)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | link | The link. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>long | Download order id. |

### IdFromEntityAsync(Link)

Extracts the id of an entity from the specified `link`.

#### Declaration

```csharp
Task<long?> IdFromEntityAsync(Link link)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | link | The link to extract the name from. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>long | The id as extracted from the link. If the link doesn't contain an id, null is returned. |

### IdFromFetchJobsAsync(Link)

Extracts the id from a FetchJobs with the specified `link`.

#### Declaration

```csharp
Task<long?> IdFromFetchJobsAsync(Link link)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | link | The link to extract the id from. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>long | The id as extracted from the link. If the link doesn't contain an id, null is returned. |

### IdFromPolicyAsync(Link)

Extracts the id from a policy with the specified `link`.

#### Declaration

```csharp
Task<long?> IdFromPolicyAsync(Link link)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | link | The link to extract the id from. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>long | The id as extracted from the link. If the link doesn't contain an id, null is returned. |

### IdsFromEntitiesAsync(IEnumerable<Link>)

Extracts the id of entities from the specified `links`.

#### Declaration

```csharp
Task<IList<long>> IdsFromEntitiesAsync(IEnumerable<Link> links)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| IEnumerable<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | links | The links to extract the names from. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>IList<>long | The ids as extracted from the links. |

### NameFromDataSourceAsync(Link)

Extracts the name of a datasource from the specified `link`.

#### Declaration

```csharp
Task<string> NameFromDataSourceAsync(Link link)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | link | The link to extract the name from. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>string | The name as extracted from the link. If the link doesn't contain a name, null is returned. |

### NameFromDefinitionAsync(Link)

Extracts the name of an entity definition from the specified `link`.

#### Declaration

```csharp
Task<string> NameFromDefinitionAsync(Link link)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | link | The link to extract the name from. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>string | The name as extracted from the link. If the link doesn't contain a name, null is returned. |

### NamesFromDefinitionsAsync(IEnumerable<Link>)

Extracts the names of the specified entity definition links.

#### Declaration

```csharp
Task<IList<string>> NamesFromDefinitionsAsync(IEnumerable<Link> links)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| IEnumerable<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | links | The links to extract the names from. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>IList<>string | The names as extracted from the links. If the link doesn't contain a name, null is returned. |

### PackageLinkAsync()

Gets the link to the package endpoint.

#### Declaration

```csharp
Task<Link> PackageLinkAsync()
```

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### PermissionsForEntityToLinkAsync(long)

Creates a link to the permissions for entity endpoint.

#### Declaration

```csharp
Task<Link> PermissionsForEntityToLinkAsync(long id)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| long | id | The entity id. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### PolicyToLinkAsync(long)

Generates a link to the policy.

#### Declaration

```csharp
Task<Link> PolicyToLinkAsync(long id)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| long | id | The policy id. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### ResetPasswordToLinkAsync(long)

Gets the link to reset the password of the specified user.

#### Declaration

```csharp
Task<Link> ResetPasswordToLinkAsync(long userId)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| long | userId | Id of the user. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### SendConfirmationMailToLinkAsync(long)

Generates a link to send a confirmation mail.

#### Declaration

```csharp
Task<Link> SendConfirmationMailToLinkAsync(long userId)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| long | userId | The user id. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### SendNotificationToLinkAsync(string)

Generates a link to send a notification.

#### Declaration

```csharp
Task<Link> SendNotificationToLinkAsync(string notificationType)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | notificationType | The notification type. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### SetUserPasswordToLinkAsync(long)

Gets the link to set the password of the specified user.

#### Declaration

```csharp
Task<Link> SetUserPasswordToLinkAsync(long userId)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| long | userId | Id of the user. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) | A [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |
