Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Go API client for nativebpm

REST API for managing, executing, and monitoring workflows, human tasks, incidents, and outgoing webhooks inside the NativeBPM Cloud-Native engine.

Authentication

Requests must include a session cookie or a Bearer API token: Authorization: Bearer <API_TOKEN>

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.0
  • Package version: 1.0.0
  • Generator version: 7.24.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Import the package in a go file in your project and run go mod tidy:

import nativebpm "gitlab.com/nativebpm/sdk/go"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value nativebpm.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), nativebpm.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value nativebpm.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), nativebpm.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using nativebpm.ContextOperationServerIndices and nativebpm.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), nativebpm.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), nativebpm.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
DefaultAPI ClaimTask Post /api/tasks/{id}/claim Claim human task
DefaultAPI CompleteInstanceTask Post /api/instances/{id}/complete Complete a wait state / task activity in process instance
DefaultAPI CompleteTask Post /api/tasks/{id}/complete Complete human task
DefaultAPI CreateWebhook Post /api/webhooks Create webhook target
DefaultAPI DeleteWebhook Delete /api/webhooks/{id} Delete webhook target
DefaultAPI DeployDefinition Post /api/deploy Deploy process definition
DefaultAPI GetInstance Get /api/instances/{id} Get process instance
DefaultAPI GetInstanceHistory Get /api/instances/{id}/history Get process instance execution history
DefaultAPI GetInstanceVisualization Get /api/instances/{id}/visualization Get process instance visualization data
DefaultAPI GetInstanceVisualizationWidget Get /api/instances/{id}/visualization/widget Get process instance visualization widget HTML
DefaultAPI GetSMTPConfig Get /api/smtp-config Get SMTP configuration
DefaultAPI GetUserGroups Get /api/users/{username}/groups Get user groups
DefaultAPI ListDefinitions Get /api/definitions List process definitions
DefaultAPI ListIncidents Get /api/instances/{id}/incidents List incidents for process instance
DefaultAPI ListInstances Get /api/instances List process instances
DefaultAPI ListTasks Get /api/tasks List human/user tasks
DefaultAPI ListWebhookDeliveries Get /api/webhooks/{id}/deliveries List deliveries for webhook
DefaultAPI ListWebhooks Get /api/webhooks List configured outgoing webhooks
DefaultAPI ResolveIncident Post /api/instances/{id}/incidents/{incidentId}/resolve Resolve process incident
DefaultAPI ResumeInstance Post /api/instances/{id}/resume Resume process instance
DefaultAPI StartInstance Post /api/definitions/{id}/start Start process instance
DefaultAPI TestWebhook Post /api/webhooks/{id}/test Test webhook target
DefaultAPI UpdateWebhook Put /api/webhooks/{id} Update webhook target

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author