# Studio Activities SDK

> The **UiPath.Activities.API** SDK package is hosted on the [Official](https://docs.uipath.com/studio/docs/managing-activities-packages) activities feed (`https://pkgs.dev.azure.com/uipath/Public.Feeds/_packaging/UiPath-Official/nuget/v3/index.json`).

The **UiPath.Activities.API** SDK package is hosted on the [Official](https://docs.uipath.com/studio/docs/managing-activities-packages) activities feed (`https://pkgs.dev.azure.com/uipath/Public.Feeds/_packaging/UiPath-Official/nuget/v3/index.json`).

Among others, the package is used for:

* [Building Workflow Analyzer Rules](https://docs.uipath.com/sdk/other/latest/developer-guide/building-workflow-analyzer-rules#building-workflow-analyzer-rules) rules by adding descriptions, parameters, and integrating them in Studio's [Workflow Analyzer Settings](https://docs.uipath.com/studio/docs/about-workflow-analyzer) window.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/sdk/sdk-docs-image-105328-68925663-3c3ecb30.webp)
* [Building Activities Project Settings](https://docs.uipath.com/sdk/other/latest/developer-guide/building-activities-project-settings#building-activities-project-settings) by adding categories, sections, numeric input fields, combo boxes, and integrating them in the [Activity Project Settings](https://docs.uipath.com/studio/docs/configuring-activity-project-settings) window in Studio, much like activities from UiPath packages.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/sdk/sdk-docs-image-105444-81cfb0aa-ed489bd5.webp)
* [Creating Custom Wizards](https://docs.uipath.com/sdk/other/latest/developer-guide/creating-custom-wizards) and integrating them in the Studio ribbon.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/sdk/sdk-docs-image-105440-f74fbe99-0ad1c1a8.webp)

  :::important
  The **UiPath.Activities.API** SDK package must be used as a development dependency in your custom project. Read more about [Development Dependencies](https://github.com/NuGet/Home/wiki/DevelopmentDependency-support-for-PackageReference).
  :::

## How to Use the API

When the activities are loaded into Studio, a reference to [IWorkflowDesignApi](https://docs.uipath.com/sdk/other/latest/developer-guide/uipathstudioactivitiesapi#iworkflowdesignapi) is provided in several ways:

1. Inside the `IRegisterMetadata` implementation add a `public void Initialize(object api)` method. This method is called during the activity loading process and the activity can store the `api` parameter for later usage.
2. Define a class that implements [IRegisterWorkflowDesignApi](https://docs.uipath.com/sdk/other/latest/developer-guide/uipathstudioactivitiesapi#iregisterworkflowdesignapi). The method `IRegisterWorkflowDesignApi.Initialize(IWorkflowDesignApi api)` is called during the activity loading process, and the activity can store the `api` parameter for later usage. When using this method only Studio versions from 2019.6 are able to load your package.
3. Obtain a reference of the `api` object by calling `context.Services.GetService<IWorkflowDesignApi>()` where `context` is a [System.Activities.Presentation.EditingContext](https://docs.microsoft.com/en-us/dotnet/api/system.activities.presentation.editingcontext?view=netframework-4.8), usually accessible for activity designers.

## Design Feature Keys

It is important to perform a preliminary check against the `DesignFeatureKeys` to see if the needed feature keys are supported. For more information, see the [DesignFeatureKeys](https://docs.uipath.com/sdk/other/latest/developer-guide/uipathstudioactivitiesapi#designfeaturekeys).

In order to check for a feature, you need to call the `HasFeature` method on the `IWorkflowDesignApi` reference, otherwise calls to the relevant api methods might fail with [MissingMemberException](https://docs.microsoft.com/en-us/dotnet/api/system.missingmemberexception?view=netframework-4.8) or [MissingMethodException](https://docs.microsoft.com/en-us/dotnet/api/system.missingmethodexception?view=netframework-4.8) on older Studio versions.

```
IWorkflowDesignApi studioActivitiesApi;
            // How to check for a feature.
            if (studioActivitiesApi.HasFeature(UiPath.Studio.Activities.Api.DesignFeatureKeys.Settings))
            {
                // Call Method or lambda that is using specific feature
                // This ensures that the code is JIT compiled only after the feature check
           }
```

## Interfaces

The following interfaces are available:

* [IExtensionsInstallerService](https://docs.uipath.com/sdk/other/latest/developer-guide/uipathstudioactivitiesapi#iextensionsinstallerservice)
* [IOrganizationalSettingsService](https://docs.uipath.com/sdk/other/latest/developer-guide/uipathstudioactivitiesapi#iorganizationalsettingsservice)
* [IRegisterAnalyzerConfiguration](https://docs.uipath.com/sdk/other/latest/developer-guide/uipathstudioactivitiesapi#iregisteranalyzerconfiguration)
* [IRegisterWorkflowDesignApi](https://docs.uipath.com/sdk/other/latest/developer-guide/uipathstudioactivitiesapi#iregisterworkflowdesignapi)
* [IStudioDesignSettingsService](https://docs.uipath.com/sdk/other/latest/developer-guide/uipathstudioactivitiesapi#istudiodesignsettingsservice)
* [IWorkflowDesignApi](https://docs.uipath.com/sdk/other/latest/developer-guide/uipathstudioactivitiesapi#iworkflowdesignapi)
* [IWindowOperationsService](https://docs.uipath.com/sdk/other/latest/developer-guide/uipathstudioactivitiesapi#iwindowoperationsservice)
