Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Infrastructure services can be accessed from "http(s)://<mydomain>.emakin.com/rest/v1" url. Service methods can be called in rest format.

...

RequestResponse


No Format
POST http://ertanmydomain.emakin.com/rest/v1/getToken
 
{
     "apiKey": "xxxx",
     "logonId": "user@emakin.com",
     "logonProvider": "Organization"
}



No Format
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
 
{"d":"41AA3CE3CAFB..............BF8114"}


...

RequestResponse


No Format
POST http://ertanmydomain.emakin.com/rest/v1/getTokenFromUserInfo
 
{
     "apiKey": "xxxx",
     "userInfo": {
     	"providerNamelogonProvider": "LinkedIn",
        "id": "wcomx2h3jd",
        "name": "Ertan Tike",
        "email": "emakin@noreply.com",
     }
}



No Format
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
 
{"d":"41AA3CE3CAFB..............BF8114"}


...

RequestResponse


No Format
POST http://ertanmydomain.emakin.com/rest/v1/getWorklist
 
{
     "apiKey": "xxxx",
     "logonId": "user@emakin.com",
     "logonProvider": "Organization",
     "tag": null,
     "start": 0,
     "maxLength": 30,
     "queryXml" : ""
}



No Format
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
 
{
   "d":[
      {
         "Id":"e5134318-88bd-4a33-b561-4d78380734ce",
         "Caption":"A new task",
         "Start":"/Date(1445812020394)/",
         "End":null,
         "Instructions":"Please complete.",
         "State":"Waiting",
         "Number":12471
      },
      {
         "Id":"796a34c6-fd2e-450e-a2af-8124ea68f8ca",
         "Caption":"A new other task",
         "Start":"/Date(1445512843034)/",
         "End":null,
         "Instructions":"Please complete.",
         "State":"Waiting",
         "Number":12468
      }
   ]
}


...

RequestResponse


No Format
POST http://ertanmydomain.emakin.com/rest/v1/getWorklistCount
 
{
     "apiKey": "xxxx",
     "logonId": "user@emakin.com",
     "logonProvider": "Organization",
     "tag": null,
     "queryXml" : ""
}



No Format
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
 
{
   "d":50
}


...

RequestResponse


No Format
POST http://ertanmydomain.emakin.com/rest/v1/getWorkItem

{
     "apiKey": "xxxx",
     "logonId": "user@emakin.com",
     "logonProvider": "Organization",
     "id": "e5134318-88bd-4a33-b561-4d78380734ce"
}



No Format
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
     "d": {
         "Id": "e5134318-88bd-4a33-b561-4d78380734ce",
         "Caption": "A new task",
         "Culture": "en-US",
         "Start": "/Date(1445812020394)/",
         "End": null,
         "DeadlineDate": null,
         "InstanceNumber": 12471,
         "IsReadOnly": false,
         "SelectedActionId": null,
         "Actions": [
             {
                 "Id": "2b0aa720-82f8-4a62-b7a1-2389203fa5e7",
                 "Name": "Complete",
                 "Color": "",
                 "BackgroundColor": "",
                 "Order": 1,
                 "Hidden" : false,
                 "RequireComment": false,
                 "ConfirmationMessage": "",
                 "ValidationGroup": ""
             },
             {
                 "Id": "c5350e5c-6e03-4b72-9522-49ab7f849b8a",
                 "Name": "Cancel",
                 "Color": "",
                 "BackgroundColor": "",
                 "Order": 2,
                 "Hidden" : false,
                 "RequireComment": true,
                 "ConfirmationMessage": "",
                 "ValidationGroup": ""
             }
         ]
     }
 }


...

RequestResponse


No Format
POST http://ertanmydomain.emakin.com/rest/v1/selectAction

{
     "apiKey": "xxxx",
     "logonId": "user@emakin.com",
     "logonProvider": "Organization",
     "id": "e5134318-88bd-4a33-b561-4d78380734ce",
     "action": "c5350e5c-6e03-4b72-9522-49ab7f849b8a",
     "data": null
}



No Format
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
     "d": [ "716F8FCB-98C2-4591-8C43-043D54DEAADA" ]
}


...

RequestResponse


No Format
POST http://ertanmydomain.emakin.com/rest/v1/initiateByProcess

{
     "apiKey": "xxxx",
     "logonId": "user@emakin.com",
     "logonProvider": "Organization",
     "process": "e5134318-88bd-4a33-b561-4d78380734ce",
     "task": "c5350e5c-6e03-4b72-9522-49ab7f849b8a",
     "version": null,
     "data": "<pool><myField>ABC</myField></pool>",
     "culture": null
}



No Format
HTTP/1.1 200 OK

{
     "d": "716F8FCB-98C2-4591-8C43-043D54DEAADA"
}

ExecuteModule

...



Trigger

Triggers an event for listeners on all processes and returns array of id number of triggered work items. When there is no listener return value is a empty array.

Required Scope

moduleevent_executetrigger

Parameters

Parameter NameDescription
apiKeyCaller system indentifieridentifier.
logonIdUser logon id
logonProviderUser logon provider.
processeventNameName or id of processevent
moduleName of module
functionName of function
argumentsArray of function parameterstestModeTrigger the test mode or not work items
inputDataEvent Data in XML can be null.
cultureCulture preference. Can be null.

Example Call

RequestResponse


No Format
POST http://ertanmydomain.emakin.com/rest/v1/executeModuletrigger

{
     "apiKey": "xxxx",
     "logonId": "user@emakin.com",
     "logonProvider": "Organization",
     "processeventName" : "myprocessmyEvent",
     "moduleinputData": "mymodule<pool><eventParameter>ABC</eventParameter></pool>",
     "functiontestMode": "myfunction"false,
     "argumentsculture": ["arg1","arg2"]null
}



No Format
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
     // function result
"d": ["716F8FCB-98C2-4591-8C43-043D54DEAADA"]
}

Trigger

Triggers an event for listeners on all processes and returns array of id number of triggered work items. When there is no listener return value is a empty array.

Required Scope

event_trigger

Parameters

...



...

Query

Query is xml based string that specifies the requested result. If not specified, default query is performed.

Query definition uses the following column names to be specified as a result set column name, criteria and order.

Worklist Columns

NameDescription
IdUnique work item identifier
NameName of a work item
CaptionLocalized caption of a work item.
StateState of work a  item.
StartStart date of a work item
EndEnd date of a work item. Can be null.
IsDeadlinedA boolean that specifies the deadline has occurred.
DeadlineDateDeadline date. Can be null.

Example Call

...

No Format
POST http://ertan.emakin.com/rest/v1/trigger

{
     "apiKey": "xxxx",
     "logonId": "user@emakin.com",
     "logonProvider": "Organization",
     "eventName" : "myEvent",
     "inputData": "<pool><eventParameter>ABC</eventParameter></pool>",
     "testMode": false,
     "culture": null
}

...

No Format
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
     "d": ["716F8FCB-98C2-4591-8C43-043D54DEAADA"]
}

Query

Query is xml based string that specifies the requested result. If not specified, default query is performed.

Query definition uses the following column names to be specified as a result set column name, criteria and order.

Worklist Columns

...

Query contains the following sections;

Columns

List of column names that requested. 

Where

List of criteria to be performed. Criteria name can be specified from column names.

Order

List of order to be performed. Order name can be specified from column names.

Example Query Xml

...

languagexml

...

NextReminderDateNext reminder date. Can be null.
SentRemindersNumber of sent reminders
InstructionsInstructions of work item
InstanceIdUnique instance identifier
PreviousWorkItemIdPrevious id number of work item. Can be null.
ActionIdUnique action identifier. Can be null.
CompletedByIdId number of completed by user. Can be null.
CompletedByDisplay name of completed by user. Can be null.
NumberInstance number
PriorityInstance priority
ProcessIdId number of process
ProcessNameName of process
FromIdId number of initiator user. Can be null.
FromDisplay name of initiator user. Can be null.
FolderIdId number of related folder id.
FolderNameName of related folder.
AssignedToList of assigned users
VersionNumberVersion number of related process
VersionIdId number of related process version
TestModeA boolean that specifies instance is in test mode or not.
Instance.StartStart date of instance
Instance.StateState of instance

Query contains the following sections;

Columns

List of column names that requested. 

Where

List of criteria to be performed. Criteria name can be specified from column names.

Order

List of order to be performed. Order name can be specified from column names.

Example Query Xml

Code Block
languagexml
<Query Start="" MaxLength="25">
    <Columns>
        <Column Expression="Id"/>
        <Column Expression="Instructions"/>
        <Column Expression="State"/>
        <Column Expression="FromId"/>
        <Column Expression="From"/>
        <Column Expression="SentReminders"/>
        <Column Expression="HasHistory"/>
        <Column Expression="Caption"/>
        <Column Expression="Start"/>
        <Column Expression="DeadlineDate"/>
        <Column Expression="End"/>
        <Column Expression="FolderName"/>
        <Column Expression="InstructionsNumber"/>
    </Columns>
   <Column Expression="State"/> <Where>
        <Criteria>
  <Column Expression="FromId"/>         <Column<Criteria Expression="From"/>"Caption" Comparison="Like">
         <Column Expression="SentReminders"/>      <Value>My Task*</Value>
 <Column Expression="HasHistory"/>         <Column Expression="Caption"/></Criteria>
        <Column Expression="Start"/></Criteria>
    </Where>
    <Column Expression="DeadlineDate"/><Order>
        <Order <Column Expression="EndStart"/>
        <Column Expression Type="FolderNameDescending" />
        <Column Expression="Number"/>
    </Columns>
    <Where>
        <Criteria>
            <Criteria Expression="Caption" Comparison="Like">
                <Value>My Task*</Value>
            </Criteria>
        </Criteria>
    </Where>
    <Order>
        <Order Expression="Start" Type="Descending" />
    </Order>
</Query>

...

Returns the decision result.

Required Scope

decision_execute

Parameters

...

Example Call

...

No Format
POST https://ertan.emakin.com/rest/v1/decision

{
     "apiKey": "",
     "logonId": "user@emakin.com",
     "logonProvider": "Organization",
     "process" : "Decision",
     "model" : "dinner",
     "decision" : "Dish",
     "inputData": "<pool><Season>Fall</Season><NumberOfGuests>2</NumberOfGuests></pool>"
}

...

No Format
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 26

{"d":{"Dish":"Spareribs"}}

ActivityStream

Returns the activity stream of an object.

Required Scope

activity_read

Parameters

...

Example Call

...

No Format
POST https://ertan.emakin.com/rest/v1/activitystream

{
     "apiKey": "",
     "logonId": "user@emakin.com",
     "logonProvider": "Organization",
     "channelId": "2f9e4a39-66e0-45e8-9ef4-13ed00cc4089"
}

...

</Order>
</Query>


Decision

Returns the decision result.

Required Scope

decision_execute

Parameters

Parameter NameDescription
apiKeyCaller system identifier.
logonIdUser logon id
logonProviderUser logon provider.
processName or Id number of the process
modelName or Id number of the decision model
decisionName or Id number of the decision
inputDataDecision input data. Xml or Json string.

Example Call

RequestResponse


No Format
POST https://mydomain.emakin.com/rest/decision

{
     "taskapiKey": "New Project Proposal",

     "actorlogonId": {
        "name": "User name",
  "user@emakin.com",
     "typelogonProvider": "User"
      }Organization",
      "@idprocess" : "7bea8d21-4007-464c-a137-6bd3811c4f95Decision",
      "@typemodel" : "completedinner",

     "actorIddecision" : "467a3ace-3e67-4c44-ae75-7a48bad80490Dish",
      "objectIdinputData": "9b1e9c8f-9c87-4361-bcdc-8d3948e647e1",
      "objectType": "workitem",
      "published": "2020-11-06T15:15:46.636457+03:00"
    }
}

...

<pool><Season>Fall</Season><NumberOfGuests>2</NumberOfGuests></pool>"
}



No Format
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 26

{"d":{"Dish":"Spareribs"}}