Skip to content

Allows users to create scripts using the Microsoft C# language

Notifications You must be signed in to change notification settings

ProcessMaker/package-csharp

Repository files navigation

ProcessMakerSDK - the C# library for the ProcessMaker API

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

This C# SDK is automatically generated by the OpenAPI Generator project:

Frameworks supported

  • .NET 4.0 or later
  • Windows Phone 7.1 (Mango)

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742

Installation

Run the following command to generate the DLL

  • [Mac/Linux] /bin/sh build.sh
  • [Windows] build.bat

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using ProcessMakerSDK.Api;
using ProcessMakerSDK.Client;
using ProcessMakerSDK.Model;

Packaging

A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.

This .nuspec uses placeholders from the .csproj, so build the .csproj directly:

nuget pack -Build -OutputDirectory out ProcessMakerSDK.csproj

Then, publish to a local feed or other host and consume the new package via Nuget as usual.

Getting Started

using System.Diagnostics;
using ProcessMakerSDK.Api;
using ProcessMakerSDK.Client;
using ProcessMakerSDK.Model;

namespace Example
{
    public class Example
    {
        public static void Main()
        {

            Configuration.Default.BasePath = "http://localhost/api/1.0";
            // Configure OAuth2 access token for authorization: pm_api_auth_code
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure API key authorization: pm_api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new CommentsApi(Configuration.Default);
            var commentsEditable = new CommentsEditable(); // CommentsEditable | 

            try
            {
                // Save a new comment
                Comments result = apiInstance.CreateComments(commentsEditable);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling CommentsApi.CreateComments: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }

        }
    }
}

Documentation for API Endpoints

All URIs are relative to http://localhost/api/1.0

Class Method HTTP request Description
CommentsApi CreateComments POST /comments Save a new comment
CommentsApi DeleteComments DELETE /comments/id Delete a comments
CommentsApi GetCommentById GET /comments/commentId Get single comment by ID
CommentsApi GetComments GET /comments Returns all comments for a given type
CommentsApi UpdateComment PUT /comments/commentId Update a comment
EnvironmentVariablesApi CreateEnvironmentVariables POST /environment_variables Save a new environment_variables
EnvironmentVariablesApi DeleteEnvironmentVariables DELETE /environment_variables/{environment_variables_id} Delete a environment_variables
EnvironmentVariablesApi GetEnvironmentVariables GET /environment_variables Returns all environmentVariables that the user has access to
EnvironmentVariablesApi GetEnvironmentVariablesById GET /environment_variables/{environment_variables_id} Get single environment_variables by ID
EnvironmentVariablesApi UpdateEnvironmentVariables PUT /environment_variables/{environment_variables_id} Update a environment_variables
FilesApi CreateFile POST /requests/{request_id}/files Save a new media file
FilesApi DeleteFile DELETE /requests/{request_id} Delete a media file
FilesApi GetFiles GET /requests/{request_id}/files Returns the list of files associated to a request
FilesApi GetFilesById GET /requests/{request_id}/files/{file_id} Get a file uploaded to a request
FilesApi UpdateFile PUT /requests/{request_id}/files/{file_id} Update a media file
GroupMembersApi CreateGroupMember POST /group_members Save a new group member
GroupMembersApi DeleteGroupMember DELETE /group_members/{group_member_id} Delete a group member
GroupMembersApi GetGroupMemberById GET /group_members/{group_member_id} Get single group member by ID
GroupMembersApi GetGroupMembers GET /group_members Returns all groups for a given member
GroupMembersApi GetGroupMembersAvailable GET /group_members_available Returns all groups available for a given member
GroupMembersApi GetUserMembersAvailable GET /user_members_available Returns all users available for a given member
GroupUsersApi GetMembers GET /group_users Returns all users of a group
GroupsApi CreateGroup POST /groups Save a new group
GroupsApi DeleteGroup DELETE /groups/{group_id} Delete a group
GroupsApi GetGroupById GET /groups/{group_id} Get single group by ID
GroupsApi GetGroups GET /groups Returns all groups that the user has access to
GroupsApi UpdateGroup PUT /groups/{group_id} Update a group
NotificationsApi CreateNotification POST /notifications Save a new notifications
NotificationsApi DeleteNotification DELETE /notifications/notificationId Delete a notification
NotificationsApi GetNotificationById GET /notifications/notificationId Get single notification by ID
NotificationsApi GetNotifications GET /notifications Returns all notifications that the user has access to
NotificationsApi ProcessMakerHttpControllersApiNotificationControllerUpdateAsRead PUT /read_notifications Mark notifications as read by the user
NotificationsApi ProcessMakerHttpControllersApiNotificationControllerUpdateAsReadAll PUT /read_all_notifications Mark notifications as read by id and type
NotificationsApi UpdateNotification PUT /notifications/notificationId Update a notification
PermissionsApi ProcessMakerHttpControllersApiPermissionControllerUpdate PUT /permissions Update the permissions of an user
ProcessCategoriesApi CreateProcessCategory POST /process_categories Save a new process Category
ProcessCategoriesApi DeleteProcessCategory DELETE /process_categories/{process_category_id} Delete a process category
ProcessCategoriesApi GetProcessCategories GET /process_categories Returns all processes categories that the user has access to
ProcessCategoriesApi GetProcessCategoryById GET /process_categories/{process_category_id} Get single process category by ID
ProcessCategoriesApi UpdateProcessCategory PUT /process_categories/{process_category_id} Update a process Category
ProcessRequestsApi DeleteProcessRequest DELETE /requests/{process_request_id} Delete a process request
ProcessRequestsApi GetProcessRequestById GET /requests/{process_request_id} Get single process request by ID
ProcessRequestsApi GetProcessesRequests GET /requests Returns all process Requests that the user has access to
ProcessRequestsApi UpdateProcessRequest PUT /requests/{process_request_id} Update a process request
ProcessesApi AssignmentProcess POST /processes/{process_id}/import/assignments Update assignments after import
ProcessesApi CreateProcess POST /processes Save a new process
ProcessesApi DeleteProcess DELETE /processes/{processId} Delete a process
ProcessesApi ExportProcess GET /processes/{processId}/export Export a single process by ID
ProcessesApi GetProcessById GET /processes/{processId} Get single process by ID
ProcessesApi GetProcesses GET /processes Returns all processes that the user has access to
ProcessesApi ImportProcess POST /processes/import Import a new process
ProcessesApi RestoreProcess PUT /processes/{processId}/restore Restore an inactive process
ProcessesApi StartProcesses GET /start_processes Returns the list of processes that the user can start
ProcessesApi TriggerStartEvent POST /process_events/{process_id} Start a new process
ProcessesApi UpdateProcess PUT /processes/{processId} Update a process
ScreenCategoriesApi CreateScreenCategory POST /screen_categories Save a new Screen Category
ScreenCategoriesApi DeleteScreenCategory DELETE /screen_categories/screen_category_id Delete a screen category
ScreenCategoriesApi GetScreenCategories GET /screen_categories Returns all screens categories that the user has access to
ScreenCategoriesApi GetScreenCategoryById GET /screen_categories/screen_category_id Get single screen category by ID
ScreenCategoriesApi UpdateScreenCategory PUT /screen_categories/screen_category_id Update a screen Category
ScreensApi CreateScreens POST /screens Save a new screens
ScreensApi DeleteScreen DELETE /screens/screensId Delete a screen
ScreensApi DuplicateScript PUT /screens/screensId/duplicate duplicate a screen
ScreensApi ExportScreen GET /screens/screensId/export Export a single screen by ID
ScreensApi GetScreens GET /screens Returns all screens that the user has access to
ScreensApi GetScreensById GET /screens/screensId Get single screens by ID
ScreensApi ImportScreen POST /screens/import Import a new screen
ScreensApi UpdateScreen PUT /screens/screensId Update a screen
ScriptsApi CreateScript POST /scripts Save a new script
ScriptsApi DeleteScript DELETE /scripts/scriptsId Delete a script
ScriptsApi DuplicateScreen PUT /scripts/scriptsId/duplicate duplicate a script
ScriptsApi GetScripts GET /scripts Returns all scripts that the user has access to
ScriptsApi GetScriptsById GET /scripts/scriptsId Get single script by ID
ScriptsApi GetScriptsPreview GET /scripts/{script_id}/preview Test script code without saving it
ScriptsApi UpdateScript PUT /scripts/scriptsId Update a script
TaskAssignmentsApi CreateTaskAssignments POST /task_assignments Save a new task assignments
TaskAssignmentsApi UpdateTaskAssignments PUT /task_assignments/{task_assignments_id} Update a task assignments
TasksApi GetTasks GET /tasks Returns all tasks that the user has access to
TasksApi UpdateTask PUT /tasks/{task_id} Update a task
UsersApi CreateUser POST /users Save a new users
UsersApi DeleteUser DELETE /users/{user_id} Delete a user
UsersApi GetUserById GET /users/{user_id} Get single user by ID
UsersApi GetUsers GET /users Returns all users
UsersApi UpdateUsers PUT /users/{user_id} Update a user

Documentation for Models

Documentation for Authorization

pm_api_auth_code

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: /oauth/authorize
  • Scopes: N/A

pm_api_bearer

  • Type: HTTP basic authentication

pm_api_key

  • Type: API key

  • API key parameter name: Authorization

  • Location: HTTP header

About

Allows users to create scripts using the Microsoft C# language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages