Skip to content

Latest commit

 

History

History
620 lines (464 loc) · 18.8 KB

ScreensApi.md

File metadata and controls

620 lines (464 loc) · 18.8 KB

ProcessMakerSDK.Api.ScreensApi

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

Method HTTP request Description
CreateScreens POST /screens Save a new screens
DeleteScreen DELETE /screens/screensId Delete a screen
DuplicateScript PUT /screens/screensId/duplicate duplicate a screen
ExportScreen GET /screens/screensId/export Export a single screen by ID
GetScreens GET /screens Returns all screens that the user has access to
GetScreensById GET /screens/screensId Get single screens by ID
ImportScreen POST /screens/import Import a new screen
UpdateScreen PUT /screens/screensId Update a screen

CreateScreens

Screens CreateScreens (ScreensEditable screensEditable)

Save a new screens

Example

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

namespace Example
{
    public class CreateScreensExample
    {
        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.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new ScreensApi(Configuration.Default);
            var screensEditable = new ScreensEditable(); // ScreensEditable | 

            try
            {
                // Save a new screens
                Screens result = apiInstance.CreateScreens(screensEditable);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ScreensApi.CreateScreens: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
screensEditable ScreensEditable

Return type

Screens

Authorization

pm_api_auth_code, pm_api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteScreen

Screens DeleteScreen (string screensId)

Delete a screen

Example

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

namespace Example
{
    public class DeleteScreenExample
    {
        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.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new ScreensApi(Configuration.Default);
            var screensId = screensId_example;  // string | ID of screen to return

            try
            {
                // Delete a screen
                Screens result = apiInstance.DeleteScreen(screensId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ScreensApi.DeleteScreen: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
screensId string ID of screen to return

Return type

Screens

Authorization

pm_api_auth_code, pm_api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DuplicateScript

Screens DuplicateScript (string screensId, ScreensEditable screensEditable)

duplicate a screen

Example

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

namespace Example
{
    public class DuplicateScriptExample
    {
        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.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new ScreensApi(Configuration.Default);
            var screensId = screensId_example;  // string | ID of screen to return
            var screensEditable = new ScreensEditable(); // ScreensEditable | 

            try
            {
                // duplicate a screen
                Screens result = apiInstance.DuplicateScript(screensId, screensEditable);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ScreensApi.DuplicateScript: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
screensId string ID of screen to return
screensEditable ScreensEditable

Return type

Screens

Authorization

pm_api_auth_code, pm_api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ExportScreen

Screens ExportScreen (string screensId)

Export a single screen by ID

Example

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

namespace Example
{
    public class ExportScreenExample
    {
        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.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new ScreensApi(Configuration.Default);
            var screensId = screensId_example;  // string | ID of screen to return

            try
            {
                // Export a single screen by ID
                Screens result = apiInstance.ExportScreen(screensId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ScreensApi.ExportScreen: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
screensId string ID of screen to return

Return type

Screens

Authorization

pm_api_auth_code, pm_api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetScreens

InlineResponse20016 GetScreens (string filter = null, string orderBy = null, string orderDirection = null, int? perPage = null, string include = null)

Returns all screens that the user has access to

Example

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

namespace Example
{
    public class GetScreensExample
    {
        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.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new ScreensApi(Configuration.Default);
            var filter = filter_example;  // string | Filter results by string. Searches Name, Description, and Status. Status must match exactly. Others can be a substring. (optional) 
            var orderBy = orderBy_example;  // string | Field to order results by (optional) 
            var orderDirection = orderDirection_example;  // string |  (optional)  (default to asc)
            var perPage = 56;  // int? |  (optional) 
            var include = include_example;  // string | Include data from related models in payload. Comma seperated list. (optional)  (default to "")

            try
            {
                // Returns all screens that the user has access to
                InlineResponse20016 result = apiInstance.GetScreens(filter, orderBy, orderDirection, perPage, include);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ScreensApi.GetScreens: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
filter string Filter results by string. Searches Name, Description, and Status. Status must match exactly. Others can be a substring. [optional]
orderBy string Field to order results by [optional]
orderDirection string [optional] [default to asc]
perPage int? [optional]
include string Include data from related models in payload. Comma seperated list. [optional] [default to ""]

Return type

InlineResponse20016

Authorization

pm_api_auth_code, pm_api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetScreensById

Screens GetScreensById (string screensId)

Get single screens by ID

Example

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

namespace Example
{
    public class GetScreensByIdExample
    {
        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.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new ScreensApi(Configuration.Default);
            var screensId = screensId_example;  // string | ID of screens to return

            try
            {
                // Get single screens by ID
                Screens result = apiInstance.GetScreensById(screensId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ScreensApi.GetScreensById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
screensId string ID of screens to return

Return type

Screens

Authorization

pm_api_auth_code, pm_api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ImportScreen

Screens ImportScreen (System.IO.Stream file)

Import a new screen

Example

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

namespace Example
{
    public class ImportScreenExample
    {
        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.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new ScreensApi(Configuration.Default);
            var file = new System.IO.Stream(); // System.IO.Stream | file to upload

            try
            {
                // Import a new screen
                Screens result = apiInstance.ImportScreen(file);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ScreensApi.ImportScreen: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
file System.IO.Stream file to upload

Return type

Screens

Authorization

pm_api_auth_code, pm_api_key

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateScreen

Screens UpdateScreen (string screensId, ScreensEditable screensEditable)

Update a screen

Example

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

namespace Example
{
    public class UpdateScreenExample
    {
        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.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new ScreensApi(Configuration.Default);
            var screensId = screensId_example;  // string | ID of screen to return
            var screensEditable = new ScreensEditable(); // ScreensEditable | 

            try
            {
                // Update a screen
                Screens result = apiInstance.UpdateScreen(screensId, screensEditable);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ScreensApi.UpdateScreen: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
screensId string ID of screen to return
screensEditable ScreensEditable

Return type

Screens

Authorization

pm_api_auth_code, pm_api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]