You are on page 1of 287

WorkFlow RESTful API

Documentation
Contents

1. Introduction ----------------------------------------------------------------------------------------------------------------- 4
2. Authentication -------------------------------------------------------------------------------------------------------------- 5
3. Entity Beans ----------------------------------------------------------------------------------------------------------------- 7
1. Complete and Simple Bean------------------------------------------------------------------------------------------- 7
2. Setting Entitys child beans ------------------------------------------------------------------------------------------- 9
3. Searching entities------------------------------------------------------------------------------------------------------ 10
4. Limiting attributes returned in search ---------------------------------------------------------------------------- 11
5. Returning errors with messages ----------------------------------------------------------------------------------- 12
6. Date and Date Time Bean attributes ------------------------------------------------------------------------------ 13
7. Number and Decimal Bean attributes ---------------------------------------------------------------------------- 13
8. Reading Custom Field values --------------------------------------------------------------------------------------- 14
9. Setting Custom Field values ----------------------------------------------------------------------------------------- 17
1. Custom Field formats---------------------------------------------------------------------------------------------- 18
2. Length options ------------------------------------------------------------------------------------------------------ 24
10. Entity Beans listing ------------------------------------------------------------------------------------------------- 27
4. HTTP response codes ---------------------------------------------------------------------------------------------------- 37
5. APIs Listing------------------------------------------------------------------------------------------------------------------ 38
1. Account ------------------------------------------------------------------------------------------------------------------ 39
2. Case ----------------------------------------------------------------------------------------------------------------------- 40
3. Case Type ---------------------------------------------------------------------------------------------------------------- 44
4. Company ----------------------------------------------------------------------------------------------------------------- 45
5. Contact ------------------------------------------------------------------------------------------------------------------- 46
6. Custom Field ------------------------------------------------------------------------------------------------------------ 47
7. Custom Table ----------------------------------------------------------------------------------------------------------- 48
8. Department ------------------------------------------------------------------------------------------------------------- 49
9. Message------------------------------------------------------------------------------------------------------------------ 50
10. Project----------------------------------------------------------------------------------------------------------------- 51
11. User -------------------------------------------------------------------------------------------------------------------- 52

2 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


12. User Type ------------------------------------------------------------------------------------------------------------- 53
6. Detailed WorkFlow API -------------------------------------------------------------------------------------------------- 54
1. Account ------------------------------------------------------------------------------------------------------------------ 54
2. Case ----------------------------------------------------------------------------------------------------------------------- 67
3. Case Type -------------------------------------------------------------------------------------------------------------- 175
4. Company --------------------------------------------------------------------------------------------------------------- 179
5. Contact ----------------------------------------------------------------------------------------------------------------- 185
6. Custom Field ---------------------------------------------------------------------------------------------------------- 195
7. Custom Table --------------------------------------------------------------------------------------------------------- 202
8. Department ----------------------------------------------------------------------------------------------------------- 224
9. Message---------------------------------------------------------------------------------------------------------------- 229
10. Project--------------------------------------------------------------------------------------------------------------- 234
11. User ------------------------------------------------------------------------------------------------------------------ 244
12. User Type ----------------------------------------------------------------------------------------------------------- 254
7. Appendix A Countries ----------------------------------------------------------------------------------------------- 259
8. Appendix B States ---------------------------------------------------------------------------------------------------- 265
9. Appendix C Custom Field Types ----------------------------------------------------------------------------------- 267
10. Appendix D Error Codes ----------------------------------------------------------------------------------------- 268
11. Appendix E - WorkFlow API Overview -------------------------------------------------------------------------- 270
1. Account ---------------------------------------------------------------------------------------------------------------- 270
2. Case --------------------------------------------------------------------------------------------------------------------- 270
3. Case Type -------------------------------------------------------------------------------------------------------------- 272
4. Company --------------------------------------------------------------------------------------------------------------- 272
5. Contact ----------------------------------------------------------------------------------------------------------------- 272
6. Custom Field ---------------------------------------------------------------------------------------------------------- 272
7. Custom Table --------------------------------------------------------------------------------------------------------- 273
8. Department ----------------------------------------------------------------------------------------------------------- 273
9. Message---------------------------------------------------------------------------------------------------------------- 273
10. Project--------------------------------------------------------------------------------------------------------------- 274
11. User ------------------------------------------------------------------------------------------------------------------ 274
12. User Type ----------------------------------------------------------------------------------------------------------- 274

3 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


1. Introduction

CallidusCloud WorkFlow RESTful Service API (further referenced as WorkFlow API) is intended to
allow third party applications to collaborate with WorkFlow. WorkFlow API enables its consumers to
easily perform various operations over WorkFlow objects using standard HTTP methods: GET, POST, PUT
and DELETE.

HTTP methods are used in this way:

1) GET retrieve an entity


2) POST create a new entity
3) PUT update an entity
4) DELETE delete an entity

For the call to be successfully completed user performing an API call must be authenticated.

Note: In order to easily try out the examples from this document you can use Google Chromes
Postman Rest Client extension, Mozila Firefoxs RESTClient add on or any other similar product. We
recommend Google Chromes extension Postman Rest Client which has a lot of options including call
history, favourite calls, support for authorization, support for uploading files etc.

4 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


2. Authentication

Each WorkFlow API request must be authenticated. Two request headers are required in reach
request in order to authenticate the user performing an API call:

1) Authorization header
WorkFlow API uses Basis Authentication mechanism with standard HTTP headers which
means that no handshakes have to be done. User performing WorkFlow API call must be a
WorkFlow user with admin rights. Username used for WorkFlow API authentication is users
login name and password is users WS Token which can be found in Setup -> Users -> Users -
> Edit specific user.

The Authorization header is constructed as follows:


1. Username and WS Token are combined together using semicolon into a string
"username:WsToken".
2. The resulting string is then encoded using Base64 encoding.
3. The authorization method and a space "Basic " is then put before the encoded
string.

Example: For user with login name jsmith and WSToken 0mr3ot99LYMvit77J9sf
Authorization header will look like this:

Authorization: Basic anNtaXRoOjBtcjNvdDk5TFlNdml0NzdKOXNm

Java code example for creating Authorization header looks like this:

String userName = "jsmith";


String wsToken = "0mr3ot99LYMvit77J9sf";
String nameToken = userName + ":" + wsToken;
byte[] encodedBytes = Base64.encodeBase64(nameToken.getBytes());
String encoded = new String(encodedBytes); // anNtaXRoOjBtcjNvdDk5TFlNdml0NzdKOXNm
String headerValue = "Basic " + encoded;
String header = "Authorization: " + headerValue;
System.out.println(header); // Authorization: Basic anNtaXRoOjBtcjNvdDk5TFlNdml0NzdKOXNm

C# code is very similar and would look like this:

byte [] bytesToEncode = Encoding.UTF8.GetBytes("jsmith:0mr3ot99LYMvit77J9sf");


String encodedText = Convert.ToBase64String(bytesToEncode); // anNtaXRoOjBtcjNvdDk5TFlNdml0NzdKOXNm

5 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


2) domain header
Domain header will tell WorkFlow to which domain does the API call refer to. On example,
domain header might look like this:
domain: workflow_api_test
If user performing API call cannot be identified 403 Forbidden status will be returned.

6 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


3. Entity Beans

Each WorkFlow entity (case, account, contact, user etc.) has its Bean representation which contains
entitys attributes. Beans are used to transfer data between requestor and WorkFlow. Here is what you
need to know about Entity Beans before starting to use WorkFlow API.

1. Complete and Simple Bean


Each entity has its complete and simple bean representation. Complete entity Bean is returned
when that same entity is requested and simple Bean representation is used when the entity exists as a
child entity of some other entity Bean.

On example, Contact Bean has account attribute and when Contact is returned it contains all
information about contact and simplified account field representation.

Example of complete AccountBean:

GET /accounts/account_b

Response body:

{
"billing_address": {
"address2": "Fake Street 456",
"address3": "Third Street 100",
"city": "San Francisco",
"country": {
"name": "USA",
"system_id": "usa"
},
"state": {
"name": "California",
"system_id": "CA"
},
"street": "Some Street 123",
"zip": "12345"
},
"custom_fields": [
{
"name": "Day Went Live",
"system_id": "day_went_live",
"type_name": "Date",
"type_system_id": 3,
"value": "10/01/13",
"value_formatted": "01/10/13"
}
],
"description": "This is Account B.",
"employees": "500",

7 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"fax": "555-555-777",
"location": "San Francisco",
"name": "Account B",
"phone": "555-555-777",
"shipping_address": { "address2":
"Fake Street 456", "address3":
"Third Street 100", "city":
"San Francisco", "country":
{
"name": "USA",
"system_id": "usa"
},
"state": {
"name": "California",
"system_id": "CA"
},
"street": "Some Street 123",
"zip": "12345"
},
"system_id": "account_b",
"uri": "http://localhost:8080/wpm/api/accounts/account_b",
"web_site": "www.accountb.com"
}

We can see that the complete AccountBean contains more than 10 attributes.

Contact is requested via GET /contacts/jsmith_someaddress_com. Contact contains simple


representation of AccountBean which only has three attribures (name, syste_id and uri).

GET /contacts/jsmith_someaddress_com

Response body:

{
"account": {
"name": "Account B",
"system_id": "account_b",
"uri": "http://localhost:8080/wpm/api/accounts/account_b"
},
"active": true,
"address": {
"address2": "Second Street 456",
"address3": "Third Street 789",
"city": "San Francisco",
"country": {
"name": "USA",
"system_id": "usa"
},
"state": {
"name": "California",
"system_id": "CA"
},
"street": "First Street 123",
"zip": "12345"
},
"cell_phone": "555-555-456",
"custom_fields": [
{
"name": "Contact Role",
"system_id": "contact_role",
"type_name": "Checkbox",
"type_system_id": 8,

8 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"value": "Consultant",
"value_formatted": "Consultant"
}
],
"department": "",
"email": "jsmith@someaddress.com",
"fax": "555-555-741",
"first_name": "John",
"home_phone": "555-555-789",
"id": 1894,
"job_title": "Developer",
"last_name": "Smith",
"middle_name": "",
"name": "John Smith",
"phone": "555-555-123",
"system_id": "jsmith_someaddress_com",
"uri": "http://localhost:8080/wpm/api/contacts/jsmith_someaddress_com"
}

2. Setting Entitys child beans


When an Entity is requested via GET method WorkFlow API returns complete entity with its child
entities as simple beans. When a new Entity is created via POST method or updated via PUT method,
entitys child bean is set by sending childs system id which is set as parents attribute.

On example, contact has account attribute which is used do display data about account when certain
contact is requested. On the other hand, when contact is created/updated we use contacts attribute
account_system_id to set the account to contact.

The other example is CaseBean which uses owner_system_id, contact_system_id,


project_system_id and other similar Bean attributes to set case owner, contact, project etc.

Example for setting account while creating a new contact:

POST /contacts

Request body:

{
"account_system_id": "account_b",
"active": true,
"cell_phone": "555-555-111",
"custom_fields": [
{
"systemId": "contact_role",
"value": "consultant"
}
],
"department": "",
"email": "jsmith@someaddress.com",
"first_name": "John",
"home_phone": "555-555-987",
"job_title": "Developer",
"last_name": "Smith",
"phone": "866.612.7312"
}

9 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


3. Searching entities
Most resources have methods for performing a search based on set criteria. Search criteria is set
through query parameters. Response which is returned contains ResultBean which has list of objects
and a few other attributes:

- total: number of entities that satisfy search criteria


- page_size: number of entities which are going to returned in the search result. Maximum
number of entities returned in one search request can be up to 100. If page_size attribute is
not set than page_size is set to default value of 10 entities.
- page: It represents page number which is going to be returned in the result bean. It is used for
pagination in combination with page_size.

On example, if case search GET /cases?assignee=John&page=1&page_size=10 finds more than 50 cases,


attritubes page=1 and page_size=10 will tell WorkFlow API to return first ten cases. If there is a need for
next 10 cases, second page (page=2) would be requested and the request would look like this: GET
/cases?assignee=John&page=2&page_size=10.

JSON example of department search:

GET /departments?name=accounting&page=1&page_size=5

{
"completed_in": 89,
"departments": [
{
"company": {
"name": "My Company Inc.",
"system_id": "my_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/my_company_inc"
},
"gate_keeper": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith2",
"system_id": "jsmith2",
"uri": "http://localhost:8080/wpm/api/users/jsmith2",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"name": "Accounting",
"system_id": "accounting",
"uri": "http://localhost:8080/wpm/api/departments/accounting"
},
{
"company": {
"name": "Other Company, Inc.",
"system_id": "other_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/other_company_inc"
},

10 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"name": "Other Company Accounting",
"system_id": "other_company_accounting",
"uri": "http://localhost:8080/wpm/api/departments/other_company_accounting"
}
],
"page": 1,
"page_size": 5,
"total": 2
}

4. Limiting attributes returned in search


Search response contains a list of complete Bean objects. If there is a need to return a limited
number of attributes then these attribute names are supposed to be send as query parameter with
name mask. This parameter has the value of attribute names separated by space and it will tell
WorkFlow API which attributes should it include inside the response.

An example case search which returns all case attributes would look like this:

GET /cases?assignee=jsmith tsmith&owner=tsmith&page=1&page_size=5

Response body would contain 5 cases that have jsmith and smith as assigness and in which tsmith is the
owner. All these cases would have complete Bean representation (all case attributes would be
returned). To return only case key, case name, assignees and status we form the request this way:

GET /cases?assignee=jsmith tsmith&owner=tsmith&mask=case_key name assignees status&page=1&page_size=5

Search result will contain CaseBeans with 4 required fields.

Response body:
{
"cases": [
{
"assignees": [
{
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
],
"case_key": "Task-sp-3",
"name": "REST API - Case 3 - UPDATED",
"status": {
"name": "Described",
"system_id": "described"
}
},
{
"assignees": [
{

11 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
{
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
],
"case_key": "Task-sp-7",
"name": "Case 2",
"status": {
"name": "Described",
"system_id": "described"
}
}
],
"completed_in": 397,
"page": 1,
"page_size": 5,
"total": 2
}

5. Returning errors with messages


If a specific WorkFlow REST API call fails, besides HTTP Status code API returns ErrorBean with two
attributes: error_code and error_messages. Atribute error_code tells which exception type
occured and error_messages provide a list of messages which describe the error with the specific
details. Error codes returned by WorkFlow REST API are listed in Appendix D.

This is an example of returned ErrorBean:

{
"error_code": "LENGTH_GREATER_THAN_MAXIMUM",
"error_messages": [
"Invalid custom Field Participate In Event value '[event_1, event_2, event_3]'. Must be less than or
equal to 2."
]
}

12 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


This example contains multiple error messages inside error_messages list:

{
"error_code": "CONSTRAINT_VIOLATIONS",
"error_messages": [
"CustomField label is required.",
"CustomField field type is required.",
"CustomField system id is required.",
"CustomField name is required."
]
}

6. Date and Date Time Bean attributes


Bean attributes which have Date and Date Time type, display their value based on the date/time
settings for the user who is preforming a WorkFlow REST API call. These settings for each user are
located on WorkFlows user side under Tools -> Settings -> Time and date Settings.

For example:

CaseBean has created_on attribute. User performing REST API call has the following settings:

- Time Zone: Europe/Prague


- Date Display Format: 31.03.08
- Time Display Format: 23:02:12
When some case is requested via GET /cases/Task-sp-2, created on attribute has the following value:

"created_on": "09.10.13 14:36:44"

7. Number and Decimal Bean attributes


Returned format of Number and Decimal Bean attributes vary on users number format settings.
User format can be changed on WorkFlows user page under Tools -> Settings -> Information -> Number
Format.

AccountBean has employees attribute with Number type (Integer) which is used for setting the
number of accounts employees. Attribute employees is always set in this format 12345. For
displaying the value in users number format attribute employees_formatted is used.

AccountBean has annual_revenue attribute with BigDecimal type which is used for setting the value
of accounts revenue. Attribute annual_revenue is always set in this format 1234.56. For displaying
the value in users number format attribute annual_revenue_formatted is used.

13 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


For example, if user has 1,234.5 number format, fields will look like in the example below:

GET /accounts/some_company_account

Response body:

{
"annual_revenue": 54321.35,
"annual_revenue_formatted": 54,321.35,
...
"employees": 10523,
"employees_formatted": 10,523,
...
}

8. Reading Custom Field values


This section explains the format of Custom Field values which WorkFlow API returns inside the
response. The following entities have custom fields: case, user, project, account and contact.

CustomFieldBean has two attributes which are used to show the value of custom field:

- value shows the value in default system format.


- value_formatted shows the value based on users setting.

Value and value_formatted vary based on Custom Field type:

a) Date and Date time custom fields:


Custom Fields which have Date or Date Time type, depend on users date/time settings. These
settings can be changed on Workflows user page under Tools -> Settings -> Time and Date Settings.
CustomFieldBean attributes look like this:

- value - shows the value in default system format - MM/dd/yyyy HH:mm:ss (24h
notation)

- value_formatted - shows the value based on users date/time settings.

For example, user John Smith uses next date/time settings:

- Time Zone: Europe/Prague


- Date Display Format: 31.03.08
- Time Display Format: 23:02:12

14 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


Request GET /cases/Task-sp-2/custom_fields/when_the_issue_resolved returns:

{
"name": "When the issue resolved",
"system_id": "when_the_issue_resolved",
"type_name": "Date and Time",
"type_system_id": 16,
"value": "10/08/2013 17:16:00",
"value_formatted": "08.10.13 17:16:00"
}

b) Number, Currency and Decimal custom fields:


These custom fields depend on users number format. User format can be changed on WorkFlows
user page under Tools -> Settings -> Information -> Number Format. CustomFieldBean attributes look
like this:

- value - shows the value in US format.


- value_formatted - shows the value based on users number format settings.

For example, user John Smith uses 1.234,56 number format settings.

Request GET /cases/Task-sp-2/custom_fields/price returns:


{
"name": "Price",
"system_id": "price",
"type_name": "Currency",
"type_system_id": 33,
"value": "123456789.12",
"value_formatted": "123.456.789,12"
}

c) Custom Fields with predefined values (checkbox, radio button, pick list)
The following Custom Field Types have Predefined Values option: Autocomplete, Checkbox, Multiple
Autocomplete, Multiple Choice Pick Up List, Pick List and Radio Button.

- value - shows Predefined Value labels separaded by semicolon.


- value_formatted - shows Predefined Value labels separaded by semicolon (the same as
value).

15 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


For example, Checkbox custom field with name Available colors has six predefined vauels:

Label SystemID
Blue bl
Red rd
Green grn
Yellow ylw
White wht
Black blk

Case Task-sp-2 has blue, green and white colors selected.

Request GET /cases/Task-sp-2/custom_fields/available_colors returns:

{
"name": "Available colors",
"system_id": "available_colors",
"type_name": "Checkbox",
"type_system_id": 8,
"value": "Blue; Green; White",
"value_formatted": "Blue; Green; White"
}

d) Project Autocomplete, User Autocomplete and Department Autocomplete custom


fields
CustomFieldBeans attribute "autocomplete_value" is used for returning the value of selected
item combined with items system_id in form: system_id:value. For example: "autocomplete_value":
"sp:Sales Project".

Request GET /cases/Task-sp-2/custom_fields/project_auto returns:

{
"autocomplete_value": "sp:Sales Project",
"name": "project auto",
"system_id": "project_auto",
"type_name": "Project Autocomplete",
"type_system_id": 13,
"value": "Sales Project",
"value_formatted": "Sales Project"
}

16 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


9. Setting Custom Field values
Custom Field value is set through CustomFieldBean. These Custom Field Types are supported for
setting values by WorkFlow API:

Text Number Radio Button Date Project Autocomplete


Large Text Decimal Pick List Date and Time Department Autocomplete
Rich Text Editor Number Autocomplete User Autocomplete
Email Currenc -----------------------
URL y Checkbox
Percent Multiple Choice Pick Up List
Multiple Autocomplete

Two CustomFieldBeans attributes must be sent to WorkFlow API: system_id and value.

Example request:

POST /cases/Task-sp-2/custom_fields

Request body:
{
"system_id": "business_phone",
"value": "555-555-123"
}

17 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


1. Custom Field formats

This table shows the formats of certain Custom Fields values by Field Type expected by WorkFlow API:

Custom Field Type Expected value format(s)


Date 02/25/13
2013-02-25
Feb 25, 2013
Date and Time 04/28/13 14:45:16
04/28/2013 14:45:16
Number 123456789
Decimal 1234567.9578
Currency 10999.99
Percent 65.6
Email someemail@somedomain.com
Autocomplete
One (and only one) predefined values system id:
Radio Button
green_color
Pick List
Checkbox One or more predefined values system ids
Multiple Autocomplete separated by comma (and a space - optional):
Multiple Choice Pick Up List option_1, option_2, option_3
or
option_1,option_2,option_3
Project Autocomplete System id of one selected item:
Department Autocomplete sales_project
User Autocomplete accounting
jsmith

Example request for setting value of Date Custom Field

a) Sending invalid value:


POST /cases/Task-sp-2/custom_fields

Request body:

{
"system_id": "day_went_live",
"value": "02.25.13"
}

18 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


Response body:

{
"error_code": "BAD_DATE_FORMAT",
"error_messages": [
"Value '02.25.13' cannot be converted to Date. Expected date formats (02/25/13, 2013-02-25 or Feb 25,
2013)."
]
}

b) Sending valid value:


POST /cases/Task-sp-2/custom_fields

Request body:
{
"system_id": "day_went_live",
"value": "02/25/13"
}

Response body (CaseBean):

{
...
"case_key": "Task-sp-2",
...
"custom_fields": [
{
"name": "Day Went Live",
"system_id": "day_went_live",
"type_name": "Date",
"type_system_id": 3,
"value": "02/25/13",
"value_formatted": "25.02.13"
},
...
],
...
"system_id": "Task-sp-2",
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-2"
}

19 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


Example request for setting value of Checkbox Custom Field

Available colors custom field has 6 predefined values:

Label SystemID
Blue bl
Red rd
Green grn
Yellow ylw
White wht
Black blk

a) Sending invalid value:


POST /cases/Task-sp-2/custom_fields

Request body:

{
"system_id": "available_colors",
"value": "bl,grn,somenonexistingcolor"
}

Response body:
{
"error_code": "CUSTOM_FIELD_VALUE_DOES_NOT_EXIST",
"error_messages": [
"'bl,grn,somenonexistingcolor' is not valid value for Custom Field Available colors."
]
}

b) Sending valid value:


POST /cases/Task-sp-2/custom_fields

Request body:
{
"system_id": "available_colors",
"value": "bl, wht, ylw"
}

20 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


Response body (CaseBean):

{
...
"case_key": "Task-sp-2",
...
"custom_fields": [
{
"name": "Available colors",
"system_id": "available_colors",
"type_name": "Checkbox",
"type_system_id": 8,
"value": "Blue; White; Yellow",
"value_formatted": "Blue; White; Yellow"
},
...
],
...
"system_id": "Task-sp-2",
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-2"
}

Example request for setting value of Radio Button Custom Field

Product Group custom field has 3 predefined values:

Label SystemID
Group 1 group_1
Group 2 group_2
Group 3 group_3

a) Sending invalid value:


POST /cases/Task-sp-2/custom_fields

Request body:

{
"system_id": "product_group",
"value": "group_1, group_2"
}

Response body:
{
"error_code": "CUSTOM_FIELD_VALUE_NOT_VALID",
"error_messages": [
"Multiple value 'group_1, group_2' cannot be set to Radio Button. Single system_id expected."
]
}

21 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


b) Sending valid value:
POST /cases/Task-sp-2/custom_fields

Request body:

{
"system_id": "product_group",
"value": "group_2"
}

Response body (CaseBean):

{
...
"case_key": "Task-sp-2",
...
"custom_fields": [
{
"name": "Product Group",
"system_id": "product_group",
"type_name": "Radio Button",
"type_system_id": 7,
"value": "Group 2",
"value_formatted": "Group 2"
},
...
],
...
"system_id": "Task-sp-2",
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-2"
}

Example request for setting value of Project Autocomplete Custom Field

On example, Project Autocomplete has all projects available for selection. Selected projects system_id is
sent along with the system_id of selected project.

a) Sending invalid value:


POST /cases/Task-sp-2/custom_fields

Request body:

{
"system_id": "project_auto",
"value": "some_non_existing_system_id"
}

22 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


Response body:

{
"error_code": "CUSTOM_FIELD_VALUE_DOES_NOT_EXIST",
"error_messages": [
"'some_non_existing_system_id' is not valid value for Custom Field project auto."
]
}

b) Sending valid value:


POST /cases/Task-sp-2/custom_fields

Request body:

{
"system_id": "project_auto",
"value": "sp"
}

Response body (CaseBean):

{
...
"case_key": "Task-sp-2",
...
"custom_fields": [
{
"autocomplete_value": "sp:Sales Project",
"name": "project auto",
"system_id": "project_auto",
"type_name": "Project Autocomplete",
"type_system_id": 13,
"value": "Sales Project",
"value_formatted": "Sales Project"
},
...
],
...
"system_id": "Task-sp-2",
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-2"
}

23 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


2. Length options

Custom Field values which are set through CustomFieldBean must meet specific requirements.

a) Minimum and maximum number of characters


- Custom Field Types: Number, Decimal Number, Percent, Text, Large Text, and URL have
minimum and maximum allowed characters options. These options can be set under
Advanced Settings on Custom Fields Advanced tab (Minimum and Maximum).
(For fields of Text, Large Text and URL Custom Field Type, maximum option is called
Length.)
- Text Custom Field Type has default maximum of 256 characters.
- Rich Text Editor Custom Field Type has maximum number of characters (Length option)
and does not have minimum option.

For example, we have a Custom Field Business Phone with type Text and we set Length to 15 and
Minimum to 5. Lets set this custom fields value for case Task-sp-2. Two request with less than 5
characters and more than 15 characters will look like this:

- Less than 5 characters:


POST /cases/Task-sp-2/custom_fields

Request body:

{
"system_id": "business_phone",
"value": "555"
}

Response body:

{
"error_code": "LENGTH_LESS_THAN_MINUMUM",
"error_messages": [
"Invalid custom Field Business Phone value '555'. Must be greater than or equal to 5."
]
}

- More than 15 characters:


POST /cases/Task-sp-2/custom_fields

24 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


Request body:

{
"system_id": "business_phone",
"value": "Phone/fax: 555-123-1234"
}

Response body:

{
"error_code": "LENGTH_GREATER_THAN_MAXIMUM",
"error_messages": [
"Invalid custom Field Business Phone value 'Phone/fax: 555-123-1234'. Must be less than or equal to
15."
]
}

b) Minimum and Maximum number of selected Predefined Values


Custom Fields Types: Checkbox and Multiple Choice Pick Up List have Minimum and
Maximum options for setting minimum and maximum number of items which can be selected. These
options can be set under Advanced Settings on Custom Fields Advanced tab.

For example, we have a Custom Field Participate In Event with type Checkbox with three predefined
values.

Label SystemID
Event 1 event_1
Event 2 event_2
Event 3 event_3

Under Advanced tab, Maximum option has value of 2 and Minimum option has value of 1. This
means that the user has to pick at least 1 event he wants to participate in but can pick no more than 2
events.

a) Choosing more than 2 events


POST /cases/Task-sp-2/custom_fields

Request body:

{
"system_id": "participate_in_event",
"value": "event_1, event_2, event_3"
}

25 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


Response body:

{
"error_code": "LENGTH_GREATER_THAN_MAXIMUM",
"error_messages": [
"Invalid custom Field Participate In Event value '[event_1, event_2, event_3]'. Must be less than or
equal to 2."
]
}

b) Not choosing any event:


POST /cases/Task-sp-2/custom_fields

Request body:

{
"system_id": "participate_in_event",
"value": ""
}

Response body:

{
"error_code": "LENGTH_LESS_THAN_MINUMUM",
"error_messages": [
"Invalid custom Field Participate In Event value ''. Must be greater than or equal to 1."
]
}

c) Choosing 2 events
POST /cases/Task-sp-2/custom_fields

Request body:

{
"system_id": "participate_in_event",
"value": "event_2, event_3"
}

Response body (CaseBean):

{
...
"case_key": "Task-sp-2",
...
"custom_fields": [
{
"name": "Participate In Event",
"system_id": "participate_in_event",
"type_name": "Checkbox",

26 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"type_system_id": 8,
"value": "Event 2; Event 3",
"value_formatted": "Event 2; Event 3"
},
...
],
...
"system_id": "Task-sp-2",
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-2"
}

10.Entity Beans listing


This is the list of all available Entity Beans. Required column marks the fields which must be set
when the entity is being created. Present in Simple Bean column marks fields which are returned in
simple bean representation.

AccountBean:

Fields Field Type Required Present in Simple


Bean
name String + +
system_id String + +
uri URI +
description String
location String
phone String
web_site String
fax String
annual_revenue BigDecimal
annual_revenue_formatted String
employees Number
employees_formatted String
billing_address AddressBean
shipping_address AddressBean
custom_fields List<CustomFieldBean>

AddressBean:

Fields Field Type Required Present in Simple


Bean
street String +
city String +
country CountryBean +
country_system_id String +
state StateBean +
state_system_id String +
zip String +

27 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


address2 String +
address3 String +

CountryBean:

Fields Field Type Required Present in Simple


Bean
name String +
system_id String +

StateBean:

Fields Field Type Required Present in Simple


Bean
name String +
system_id String +

CustomFieldBean:

Fields Field Type Required Present in Simple


Bean
name String + +
type_name String + +
type_system_id Number +
system_id String + +
label String +
value String
value_formatted String
autocomplete_value * String
predefined_values List<PredefinedValueBean>
uri URI +
* Used for User Autocomplete, Project Autocomplete and Department Autocomplete fields

PredefinedValueBean:

Fields Field Type Required Present in Simple


Bean
label String + +
system_id String + +
position Number + +
preselected Boolean +
disabled Boolean +

28 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


ContactBean:

Fields Field Type Required Present in Simple


Bean
first_name String + +
middle_name String +
last_name String +
name String
system_id String + +
account AccountBean
account_system_id String
phone String
email String + +
job_title String
address AddressBean
address_system_id String
department String
fax String
cell_phone String
home_phone String
active Boolean
custom_fields List<CustomFieldBean>
uri URI +

ProjectBean:

Fields Field Type Required Present in Simple


Bean
name String + +
system_id * String + +
description String +
is_default Boolean +
custom_fields List<CustomFieldBean>
project_roles List<ProjectRoleBean>
permissions List<PermissionBean>
uri URI +
* Attribute system_id is the same as projects unique key (shortcut).

29 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


ProjectRoleBean:

Fields Field Type Required Present in Simple


Bean
name String +
system_id String + +
user_system_id String + +

PermissionBean:

Fields Field Type Required Present in Simple


Bean
name String +
system_id String + +
description String +

UserBean

Fields Field Type Required Present in Simple


Bean
login_name String + +
system_id (the same as String +
login_name)
password String +
first_name String +
middle_name String
last_name String +
email String +
department DepartmentBean
department_system_id String +
user_type UserTypeBean +
user_type_system_id String +
administrator Boolean
active Boolean
business_callendar String
federation_id String
custom_fields List<CustomFieldBean>
uri URI +

30 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


DepartmentBean:

Fields Field Type Required Present in Simple


Bean
name String + +
system_id String +
gate_keeper UserBean +
gate_keeper_system_id String +
company CompanyBean
company_system_id String
uri URI +

UserTypeBean

Fields Field Type Required Present in Simple


Bean
name String + +
system_id String +
uri URI +

CompanyBean

Fields Field Type Required Present in Simple


Bean
name String + +
system_id String + +
company_code String
address_1 String
address_2 String
city String
state String
country String
zip String
project ProjectBean
project_system_id String
business_calendar_system_id String
uri URI +

31 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


CaseTypeBean

Fields Field Type Required Present in Simple


Bean
name String +
system_id String +
unique_key String +

StatusBean

Fields Field Type Required Present in Simple


Bean
name String +
system_id String +

ActionBean

Fields Field Type Required Present in Simple


Bean
name String +
type String +
start_status StatusBean +
end_status StatusBean +

MessageBean

Fields Field Type Required Present in Simple


Bean
subject String +
from_address String +
body String
date String +
system_id String +
uri URI +

32 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


CustomTableBean

Fields Field Type Required Present in Simple


Bean
name String +
system_id String +
columns List<String>
rows List<CustomTableRowBean>
import_report String
uri URI +

CustomTableRowBean

Fields Field Type Required Present in Simple


Bean
oid String +
cells List<CustomTableCellBean> +

CustomTableCellBean

Fields Field Type Required Present in Simple


Bean
name String +
value String +

TotalBean

Fields Field Type Required Present in Simple


Bean
total Number +

QueryBean

Fields Field Type Required Present in Simple


Bean
query String + +
file_name String

33 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


QueryResultBean

Fields Field Type Required Present in Simple


Bean
page Number +
page_size Number +
total Number +
completed_in long +
custom_table CustomTableBean +
affected_rows_count Number +
oid Number +

CaseBean

Fields Field Type Required Present in Simple


Bean
name String +
case_key String +
system_id String +
description String
closed Boolean
created_on String
updated_on String
status_changed_on String
closed_on String
case_type CaseTypeBean
case_type_system_id String
status StatusBean
status_system_id String
priority PriorityBean
priority_system_id String
project ProjectBean
project_system_id String
account AccountBean
account_system_id String
contact ContactBean
contact_system_id String
creator UserBean
creator_system_id String
updater UserBean
updater_system_id String
owner UserBean
owner_system_id String
referral UserBean

34 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


referral_system_id String
team_member UserBean
team_member_system_id String
assignees List<UserBean>
custom_fields List<CustomFieldBean>
related_to_cases List<CaseBean>
related_from_cases List<CaseBean>
uri URI +

AttachmentBean

Fields Field Type Required Present in Simple


Bean
name String +
download_link String +
system_id String +
internal Boolean +
company CompanyBean +
uploader UserBean +

CommentBean

Fields Field Type Required Present in Simple


Bean
comment String +
system_id String +
parent_system_id String +
author UserBean +
author_system_id String +
updater UserBean +
updater_system_id String +
internal Boolean +
company CompanyBean +
created_on String +
updated_on String +

ActionParamsBean

Fields Field Type Required Present in Simple


Bean
name String +
description String +
priority_system_id String +
status_system_id String +

35 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


case_type_system_id String +
project_system_id String +
account_system_id String +
contact_system_id String +
owner_system_id String +
referral_system_id String +
assignees List<UserBean> +
custom_fields List<CustomFieldBean> +
comment String +
comment_is_internal Boolean +

ResultBean

Fields Field Type


page Number
page_size Number
total Number
completed_in long
users List<UserBean>
cases List<CaseBean>
contacts List<ContactBean>
accounts List<AccountBean>
departments List<DepartmentBean>
user_types List<UserTypeBean>
case_types List<CaseTypeBean>
permissions List<PermissionBean>
custom_fields List<CustomFieldBean>
projects List<ProjectBean>
companies List<CompanyBean>
priorities List<PriorityBean>
messages List<MessageBean>
custom_tables List<CustomTableBean>
custom_table CustomTableBean

ErrorBean

Fields Field Type


error_code String
error_messages List<String>

36 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


4. HTTP response codes

The table below shows the listing of some of the most common HTTP status codes returned by
WorkFlow APIs. Each API method will be described in details in Chapter 6 with information about each
response code.

For the complete list of HTTP status codes visit http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html.

HTTP status code Description


200 OK WorkFlow API call successfully completed.
201 Created Entity is successfully created.
204 No content WorkFlow API call successfully completed.
No content is returned inside response body.
304 Not Modified Operation is not completed.
Entity is not modified.
400 Bad Request Operation is not completed.
Parameters sent to WorkFlow API are invalid or
missing which caused API call to fail.
403 Forbidden Operation is not completed.
User performing API call is not authorized. User
is trying to perform an action for which he
has no permission.
404 Not Found Requested URI does not match any existing
WorkFlow API path.
Entity is not found.
405 Method Not Allowed The HTTP method is not supported by WorkFlow
API for the requester URI.
406 Not Acceptable Accept header sent to WorkFlow API is not
supported (Requester wants the data to be
returned in the form which is not supported by
WorkFlow API).
415 Unsupported Media Type Request body and Content-Type header contains
content type which is not supported (Requester
is sending the content that WorkFlow API is not
able to receive).
500 Internal Server Error Unpredicted system error occured during
WorkFlow API call.

37 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


5. APIs Listing

Workflow RESTful API exposes 12 different entities to third party applications. Besides basic CRUD
operations API contains various useful operations for entity manipulation. Tables below show the listing
of all available methods. Chapter 6 will go into the details of all methods and show the examples.

Prefix /api/ is added before each path. For example:

GET http://social.webcomserver.com/api/accounts .

The following tables contain all available API paths and short description. Each HTTP Method is a
Hyperlink to the detailed description in Chapter 6.

Note: Each entity has its own system_id field. This field represents a unique human readable id for each
entity. System_id is visible inside WorkFlow web application. System_id is unique on entity level. For
example, two departments cannot have two the same system_id values. However, department and
permission group can have the same vales as system_id.

38 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


1. Account
Resource: Account Main path: /accounts

HTTP PATH DESCRIPTION


METHOD
1. GET /accounts/{system_id} Returns the account with specified system id.
2. POST /accounts Creates an account based on received AccountBean.
3. PUT /accounts Updates the account based on received
AccountBean.
4. DELETE /accounts/{system_id} Deletes the account with specified system id.
5. GET /accounts Search accounts based on set query parameters.
Returns a list of accounts which satisfy search
criteria.
Custom Fields
6. GET /accounts/{system_id}/custom_fields/{custom_field_system_id} Returns specified custom field with its value which is
set for specified account.
7. POST /accounts/{system_id}/custom_fields Sets custom field value to specified account based on
received CustomFieldBean.
8. PUT /accounts/{system_id}/custom_fields Updates custom field value in specified account
based on received CustomFieldBean.
9. DELETE /accounts/{system_id}/custom_fields/{custom_field_system_id} Deletes the value of specified custom field for
specified account.

39 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


2. Case
Resource: Case Main path: /cases

HTTP PATH DESCRIPTION


METHOD
1. GET /cases/{system_id} Returns the case with specified system id.
2. POST /cases Creates a case based on received CaseBean.
3. POST /cases/user/{user_system_id} Creates a case based on received CaseBean. Cases
creator is user with system id user_system_id.
4. PUT /cases Updates the case based on received CaseBean.
5. PUT /cases/user/{user_system_id} Updates the case based on received CaseBean.
Cases updater is user with system id
user_system_id.
6. DELETE /cases/{system_id} Deletes the case with specified system id.
7. DELETE /cases/{system_id}/delete_with_related Deletes the case with specified system id and deletes
its related cases (cases for which case with system id
system_id is their parent).
8. GET /cases Search cases based on set query parameters. Returns
a list of cases which satisfy search criteria.
9. PUT /cases/{system_id}/close Closes the case with specified system id.
10. PUT /cases/{system_id}/close_with_related Closes the case with specified system id and closes
its related cases (cases for which case with system id
system_id is their parent).
Balk Cases
11. POST /cases/create_bulk Creates a list of cases based on received list of
CaseBean objects.
12. PUT /cases/update_bulk Update a list of cases based on received list of
CaseBean objects.
Case Lists
13. GET /cases/list/{system_id} Returns cases which belong to the list with specified
system id.

49 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


14. GET /cases/smart_list/{system_id} Returns cases which belong to the smart list with
specified system id.

System Case Lists


15. GET /cases/system_list/creator Returns a list of cases in which user performing the
REST call is the creator.
16. GET /cases/system_list/creator/{user_system_id} Returns a list of cases in which user with specified
system id is the creator.
17. GET /cases/system_list/assignee Returns a list of cases in which user performing the
REST call is the assignee.
18. GET /cases/system_list/assignee/{user_system_id} Returns a list of cases in which user with specified
system id is the assignee.
19. GET /cases/system_list/owner Returns a list of cases in which user performing the
REST call is the owner.
20. GET /cases/system_list/owner/{user_system_id} Returns a list of cases in which user with specified
system id is the owner.
21. GET /cases/system_list/referral Returns a list of cases in which user performing the
REST call is the referral.
22. GET /cases/system_list/referral/{user_system_id} Returns a list of cases in which user with specified
system id is the referral.
23. GET /cases/system_list/team_member Returns a list of cases in which user performing the
REST call is the team member.
24. GET /cases/system_list/team_member/{user_system_id} Returns a list of cases in which user with specified
system id is the team member.
25. GET /cases/system_list/follower Returns a list of cases in which user performing the
REST call is the follower.
26. GET /cases/system_list/follower/{user_system_id} Returns a list of cases in which user with specified
system id is the follower.
Related Cases
27. GET /cases/{system_id}/related_cases Returns a list of related cases for case with specified
system id.
28. GET /cases/{system_id}/related_cases/inverse Returns a list of all cases from which case with
specified system id is related.

59 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


29. PUT /cases/{system_id}/related_cases/{related_system_id} Creates a relation between two existing cases. To
case with system id "system_id" it sets related case
with system id "related_system_id".

30. DELETE /cases/{system_id}/related_cases/{related_system_id} Deletes the relation between case with system id
"system_id" and its related case with system id
"related_system_id".

Custom Fields
31. GET /cases/{system_id}/custom_fields/{custom_field_system_id} Returns specified custom field with its value which is
set for specified case.
32. POST /cases/{system_id}/custom_fields Sets custom field value in specified case based on
received CustomFieldBean.
33. PUT /cases/{system_id}/custom_fields Updates custom field value in specified case based
on received CustomFieldBean.
34. DELETE /cases/{system_id}/custom_fields/{custom_field_system_id} Deletes the value of specified custom field in
specified case.
Attachments
35. GET /cases/{system_id}/attachments Returns a list of attachments from specified case
which user who is performing a REST call has
permission to see.
36. GET /cases/{system_id}/attachments/{attachment_system_id} Returns (downloads) attached file with specified
attachment system id from case with specified
system id.
37. POST /cases/{system_id}/attachments Uploads attachment to specified case.
38. DELETE /cases/{system_id}/attachments/{attachment_system_id} Deletes the attachment with specified attachment
system id from specified case.
Comments
39. GET /cases/{system_id}/comments Returns a list of comments from specified case which
user who is performing a REST call has permission to
see.
40. GET /cases/{system_id}/comments/{comment_system_id} Returns a comment with specified comment system
id from specified case.

69 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


41. POST /cases/{system_id}/comments 1. Creates a comment based on received
CommentBean in case with specified system
id.
2. Creates a reply to comment with system id

parent_system_id if parent_system_id is
sent via CommentBean.
42. PUT /cases/{system_id}/comments/{comment_system_id} Updates a comment based on received
CommentBean in case with specified system id.
43. DELETE /cases/{system_id}/comments/{comment_system_id} Deletes a comment with specified comment system
id in case with specified system id.
Actions
44. GET /cases/{system_id}/actions Returns all actions which user who is performing a
REST call can execute in specified case.
45. GET /cases/{system_id}/actions/{user_system_id} Returns all actions which specified user can execute
in specified case.
46. PUT /cases/{system_id}/actions/{action_system_id} Executes specified action in specified case. (Attach
file action has its own method.)
47. PUT /cases/{system_id}/actions/{action_system_id}/{user_system_id} Executes specified action in specified case as
specified user. (Attach file action has its own
method.)
48. POST /cases/{system_id}/actions/{action_system_id} Executes specified Attach File action in specified
case.
49. POST /cases/{system_id}/actions/{action_system_id}/{user_system_id} Executes specified Attach File action in specified case
as specified user.

79 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


3. Case Type
Resource: Case Type Main path: /case_types

Methods:

HTTP PATH DESCRIPTION


METHOD
1. GET /case_types/{system_id} Returns the case type with specified system id.
2. GET /case_types Search case types based on set query parameters.
Returns a list of case types which satisfy search
criteria.
3. GET /case_types/{system_id}/statuses Returns statuses associated with specified case type.
4. GET /case_types/{system_id}/statuses/{status_system_id}/actions Returns actions in specified status for specified case
type.

89 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


4. Company
Resource: Company Main path: /companies

HTTP PATH DESCRIPTION


METHOD
1. GET /companies/{system_id} Returns the company with specified system id.
2. POST /companies Creates a company based on received CompanyBean.
3. PUT /companies Updates the company based on received
CompanyBean.
4. DELETE /companies/{system_id} Deletes the company with specified system id.
5. GET /companies Search companies based on set query parameters.
Returns a list of companies which satisfy search
criteria.

99 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


5. Contact
Resource: Contact Main path: /contact

HTTP PATH DESCRIPTION


METHOD
1. GET /contacts/{system_id} Returns the contact with specified system id.
2. POST /contacts Creates a contact based on received ContactBean.
3. PUT /contacts Updates the contact based on received ContactBean.
4. DELETE /contacts/{system_id} Deletes the contact with specified system id.
5. GET /contacts Search contacts based on set query parameters.
Returns a list of contacts which satisfy search
criteria.
Custom Fields
6. GET /contacts/{system_id}/custom_fields/{custom_field_system_id} Returns specified custom field with its value which is
set for specified contact.
7. POST /contacts/{system_id}/custom_fields Sets custom field value to specified contact based on
received CustomFieldBean.
8. PUT /contacts/{system_id}/custom_fields Updates custom field value in specified contact
based on received CustomFieldBean.
9. DELETE /contacts/{system_id}/custom_fields/{custom_field_system_id} Deletes the value of specified custom field for
specified contact.

109 CallidusCloud 2013 Callidus Software Inc. All Rights Reserved.


WorkFlow
6. Custom Field
Resource: Custom Field Main path: /custom_fields

HTTP PATH DESCRIPTION


METHOD
1. GET /custom_fields/{system_id} Returns the custom field with specified system id.
2. POST /custom_fields Creates a custom field based on received
CustomFieldBean.
3. PUT /custom_fields Updates the custom field based on received
CustomFieldBean.
4. DELETE /custom_fields/{system_id} Deletes the custom field with specified system id.
5. GET /custom_fields Search custom fields based on set query parameters.
Returns a list of custom fields which satisfy search
criteria.

119 CallidusCloud 2013 Callidus Software Inc. All Rights Reserved.


WorkFlow
7. Custom Table
Resource: Custom Table Main path: /custom_tables

HTTP PATH DESCRIPTION


METHOD
1. GET /custom_tables/{system_id} Returns the custom table with specified system id.
2. POST /custom_tables Creates a custom table based on received
CustomTableBean.
3. DELETE /custom_tables/{system_id} Deletes the custom table with specified system id.
4. GET /custom_tables Search custom tables based on set query parameters.
Returns a list of custom tables which satisfy search
criteria.
5. POST /custom_tables/{system_id}/column/{column_name} Adds a column with specified name into specified
custom table.
6. GET /custom_tables/{system_id}/rows Returns rows from specified custom table.
7. GET /custom_tables/{system_id}/rows/{oid} Returns row with specified oid (object id) from
specified custom table.
8. POST /custom_tables/{system_id}/rows Adds one row in specified custom table based on
received row in CustomTableBean.
9. PUT /custom_tables/{system_id}/rows Updates the row in specified custom table based on
received row in CustomTableBean.
10. DELETE /custom_tables/{system_id}/rows/{oid} Deletes the row with specified oid in specified
custom table.
Executing queries
11. PUT /custom_tables/query/select Executes select query sent via QueryBean and
returns rows from custom table.
12. POST /custom_tables/query/insert Inserts data into custom table based on sent query in
QueryBean.
13. PUT /custom_tables/query/update Updates data in custom table based on sent query in
QueryBean.

129 CallidusCloud 2013 Callidus Software Inc. All Rights Reserved.


WorkFlow
14. PUT /custom_tables/query/delete Deletes data in custom table based on sent query in
QueryBean.
Import
15. POST /custom_tables/import/new_table Creates a new custom table with rows from uploaded
csv file.
16. POST /custom_tables/{system_id}/import/new_rows Updates rows in specified custom table from
uploaded csv file.
Export
17. PUT /custom_tables/export/query_to_csv Exports rows from custom table to CSV file based on
received SELECT query in QueryBean.

8. Department
Resource: Department Main path: /departments

HTTP PATH DESCRIPTION


METHOD
1. GET /departments/{system_id} Returns the department with specified system id.
2. POST /departments Creates a department based on received
DepartmentBean.
3. PUT /departments Updates the department based on received
DepartmentBean.
4. DELETE /departments/{system_id} Deletes the department with specified system id.
5. GET /departments Search departments based on set query parameters.
Returns a list of departments which satisfy search
criteria.

139 CallidusCloud 2013 Callidus Software Inc. All Rights Reserved.


WorkFlow
9. Message
Resource: Message Main path: /messages

HTTP PATH DESCRIPTION


METHOD
1. GET /messages/{system_id} Returns message with specified system id.
2. DELETE /messages/{system_id} Deletes the message with specified system id.
3. GET /messages/user/{system_id}/unread Search unread messages for specified user based on
set query parameters. Returns a list of unread
messages which satisfy search criteria.
4. GET /messages/user/{system_id}/unread_and_mark_as_read Search unread messages for specified user based on
set query parameters. Returns a list of unread
messages which satisfy search criteria and marks
returned messages as read.
5. GET /messages/user/{system_id}/total_unread Returns the number of unread messages for
specified user.

50 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


10.Project
Resource: Project Main path: /projects

HTTP PATH DESCRIPTION


METHOD
1. GET /projects/{system_id} Returns the project with specified system id.
2. POST /projects Creates a project based on received ProjectBean.
3. PUT /projects Updates the project based on received ProjectBean.
4. DELETE /projects/{system_id} Deletes the project with specified system id.
5. GET /projects Search projects based on set query parameters.
Returns a list of projects which satisfy search criteria.
Custom Fields
6. GET /projects/{system_id}/custom_fields/{custom_field_system_id} Returns specified custom field with its value which is
set for specified project.
7. POST /projects/{system_id}/custom_fields Sets custom field value to specified project based on
received CustomFieldBean.
8. PUT /projects/{system_id}/custom_fields Updates custom field value in specified project based
on received CustomFieldBean.
9. DELETE /projects/{system_id}/custom_fields/{custom_field_system_id} Deletes the value of specified custom field for
specified project.

51 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


11.User
Resource: User Main path: /users

HTTP PATH DESCRIPTION


METHOD
1. GET /users/{system_id} Returns the user with specified system id.
2. POST /users Creates a user based on received UserBean.
3. PUT /users Updates the user based on received UserBean.
4. DELETE /users/{system_id} Deletes the user with specified system id.
5. GET /users Search users based on set query parameters. Returns
a list of users which satisfy search criteria.
Bulk Users
6. POST /users/create_bulk Creates a list of users based on received list of
CaseBean objects.
7. PUT /users/update_bulk Updates a list of users based on received list of
CaseBean objects.

Custom Fields
8. GET /users/{system_id}/custom_fields/{custom_field_system_id} Returns specified custom field with its value which is
set for specified user.
9. POST /users/{system_id}/custom_fields Sets custom field value to specified user based on
received CustomFieldBean.
10. PUT /users/{system_id}/custom_fields Updates custom field value for specified user based
on received CustomFieldBean.
11. DELETE /users/{system_id}/custom_fields/{custom_field_system_id} Deletes the value of specified custom field for
specified user.

52 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


12.User Type
Resource: User Type Main path: /user_types

HTTP PATH DESCRIPTION


METHOD
1. GET /user_types/{system_id} Returns the user type with specified system id.
2. POST /user_types Creates a user type based on received UserTypeBean.
3. PUT /user_types Updates the user type based on received
UserTypeBean.
4. DELETE /user_types/{system_id} Deletes the user type with specified system id.
5. GET /user_types Search user types based on set query parameters.
Returns a list of user types which satisfy search
criteria.

53 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


6. Detailed WorkFlow API

This section shows the detailed listing of WokFlow APIs with examples for each API call.

For each request, return MIME type is determined based on Accept request header which is sent
by user calling WorkFlow API. WorkFlow API returns the result inside request body in specified format
and sets MIME type value into Content-Type response header. JSON format is currently supported and
fully tested.

For list of countries with their System IDs, go to Appendix A, for list of states with their System IDs, go to
Appendix B and for list of Custom Field Types with their System IDs, go to Appendix C.

1. Account
Resource: Account Main path: /accounts

1. GET /accounts/{system_id}

HTTP Method GET


Path /accounts/{system_id}
Description Returns the account with specified system id.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Account found.
404 Not Found Account not found.
Body AccountBean - success.
ErrorBean - failure.

JSON example:

a) GET /accounts/some_company_account

54 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


Response body:

{
"annual_revenue": 123456789.21,
"annual_revenue_formatted": "123,456,789.21",
"billing_address": {
"address2": "Second Street 456",
"address3": "Third Street 789",
"city": "Phoenix",
"country": {
"name": "USA",
"system_id": "usa"
},
"state": {
"name": "Arizona",
"system_id": "AZ"
},
"street": "First Street 123",
"zip": "11123"
},
"custom_fields": [
{
"name": "Number of Employees",
"system_id": "number_of_employees",
"type_name": "Number",
"type_system_id": 2,
"value": "1000",
"value_formatted": "1000"
},
{
"name": "Number of Users",
"system_id": "number_of_users",
"type_name": "Number",
"type_system_id": 2,
"value": "500",
"value_formatted": "500"
}
],
"description": "Company Some Company from USA - specializes in marketing.",
"employees": 10523,
"employees_formatted": "10,523",
"fax": "555-555-456",
"location": "Phoenix, Arizona, USA",
"name": "Some Company Account",
"phone": "555-555-789",
"shipping_address": {
"address2": "Second Street 456",
"address3": "Third Street 789",
"city": "Phoenix",
"country": {
"name": "USA",
"system_id": "usa"
},
"state": {
"name": "Arizona",
"system_id": "AZ"
},
"street": "First Street 123",
"zip": "11123"
},
"system_id": "some_company_account",
"uri": "http://localhost:8080/wpm/api/accounts/some_company_account",
"web_site": "www.somecompany.com"
}

55 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


b) GET /accounts/some_non_existing_account

{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Account does not exist."
]
}

2. POST /accounts

HTTP Method POST


Path /accounts
Description Creates an account based on received AccountBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body AccountBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created Account successfully created.
400 Bad Request Required fields are missing or other constraint
error.
Body AccountBean - success.
ErrorBean - failure.

JSON example:

a) POST /accounts

Request body:

{
"annual_revenue": 123456789.21,
"billing_address": {
"city": "Phoenix",
"country_system_id": "usa",
"state_system_id": "AZ",
"street": "First Street 123",
"zip": "11123"
},
"custom_fields": [
{
"name": "Number of Employees",
"system_id": "number_of_employees",
"type_name": "Number",
"type_system_id": 2,
"value": "1000",
"value_formatted": "1000"
},
{

56 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"name": "Number of Users",
"system_id": "number_of_users",
"type_name": "Number",
"type_system_id": 2,
"value": "500",
"value_formatted": "500"
}
],
"description": "Company Some Company from USA - specializes in marketing.",
"employees": 10523,
"fax": "555-555-456",
"location": "Phoenix, Arizona, USA",
"name": "Some Company Account",
"phone": "555-555-789",
"shipping_address": {
"city": "Phoenix",
"country_system_id": "usa",
"state_system_id": "AZ",
"street": "a21",
"zip": "11123",
"address2": "Second Street 456"
},
"system_id": "some_company_account",
"web_site": "www.webcominc.com"
}

b) If account name which is required is not sent:

{
"error_code": "CONSTRAINT_VIOLATIONS",
"error_messages": [
"Account name is required."
]
}

3. PUT /accounts

HTTP Method PUT


Path /accounts
Description Updates the account based on received AccountBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body AccountBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Account successfully updated.
400 Bad Request Required fields are missing or other constraint
error.
404 Not Found Account not found.
Body AccountBean - success.
ErrorBean - failure.

57 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


Note: AccountBeans system_id field must be set.

JSON example:

PUT /accounts

Request body:

{
"annual_revenue": 555456789.65,
"billing_address": {
"city": "Phoenix",
"country_system_id": "usa",
"state_system_id": "AZ",
"street": "First Street 123",
"zip": "11123"
},
"custom_fields": [
{
"system_id": "number_of_employees",
"value": "1100"
},
{
"system_id": "number_of_users",
"value": "650"
}
],
"description": "Company Some Company from USA - specializes in marketing. - UPDATED DESCRIPTION",
"employees": 10540,
"fax": "555-555-456",
"location": "Phoenix, Arizona, USA",
"name": "Some Company Account",
"phone": "555-555-789",
"shipping_address": {
"city": "Phoenix",
"country_system_id": "usa",
"state_system_id": "AZ",
"street": "a21",
"zip": "11123",
"address2": "Second Street 457"
},
"system_id": "some_company_account",
"web_site": "www.webcominc.com"
}

58 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


4. DELETE /accounts/{system_id}

HTTP Method DELETE


Path /accounts/{system_id}
Description Deletes the account with specified system id.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Account successfully deleted.
304 Not Modified If account could not be deleted.
404 Not Found Account not found.
Body ErrorBean - failure.

Example request: DELETE /accounts/some_company_account

5. GET /accounts

HTTP Method GET


Path /accounts
Description Search accounts based on set query parameters. Returns a list of
accounts which satisfy search criteria.

Available search attributes:


page (Number)
page_size (Number)
name (String)
system_id (String)
decription (String)
fax (String)
location (String)
website (String)

These search attributes are set as query parameters:


/accounts?name=electronics&page=1&page_size=5
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A

59 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK
Body ResultBean with a list of AccountBeans.

JSON example:

There are three accounts: Account A (Location: San Francisco, Employees 100), Account B (Location: San
Francisco, Employees 500) and Account C (Location: Milwaukee, Employees 350).

If we search accounts from San Francisco with word Account in account name we should get two
accounts. Number of returned results can be limited with page_size and page attributes. We form
the following request:

GET /accounts?name=account&location=San Francisco&page=1&page_size=10

Response body:

{
"accounts": [
{
"annual_revenue": 54321.35,
"annual_revenue_formatted": "54,321.35",
"billing_address": {
"address2": "Second Street 456",
"address3": "Third Street 789",
"city": "San Francisco",
"country": {
"name": "USA",
"system_id": "usa"
},
"state": {
"name": "California",
"system_id": "CA"
},
"street": "First Street 123",
"zip": "12345"
},
"custom_fields": [
{
"name": "Day Went Live",
"system_id": "day_went_live",
"type_name": "Date",
"type_system_id": 3, "value":
"10/01/13",
"value_formatted": "01/10/13"
}
],
"description": "",
"employees": 1100,
"employees_formatted": "1,100",
"fax": "555-555-001",
"location": "San Francisco",
"name": "Account A",
"phone": "555-555-001",
"shipping_address": {
"address2": "Second Street 456",
"address3": "Third Street 789",
"city": "San Francisco",

60 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"country": { "name":
"USA",
"system_id": "usa"
},
"state": {
"name": "California",
"system_id": "CA"
},
"street": "First Street 123",
"zip": "12345"
},
"system_id": "account_a",
"uri": "http://localhost:8080/wpm/api/accounts/account_a",
"web_site": "www.accounta.com"
},
{
"annual_revenue": 987654.35,
"annual_revenue_formatted": "987,654.35",
"billing_address": {
"address2": "Fake Street 456",
"address3": "Third Street 100",
"city": "San Francisco",
"country": {
"name": "USA",
"system_id": "usa"
},
"state": {
"name": "California",
"system_id": "CA"
},
"street": "Some Street 123",
"zip": "12345"
},
"custom_fields": [

],
"description": "This is Account B.",
"employees": 1560,
"employees_formatted": "1,560",
"fax": "555-555-777",
"location": "San Francisco",
"name": "Account B",
"phone": "555-555-777",
"shipping_address": {
"address2": "Fake Street 456",
"address3": "Third Street 100",
"city": "San Francisco",
"country": {
"name": "USA",
"system_id": "usa"
},
"state": {
"name": "California",
"system_id": "CA"
},
"street": "Some Street 123",
"zip": "12345"
},
"system_id": "account_b",
"uri": "http://localhost:8080/wpm/api/accounts/account_b",
"web_site": "www.accountb.com"
}
],
"completed_in": 432,
"page": 1,
"page_size": 10,
"total": 2
}

61 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


Note: To find more about reading and setting Custom Field values, read Section 7 and Section 8 in
Chapter 3.

6. GET /accounts/{system_id}/custom_fields/{custom_field_system_id}

HTTP Method GET


Path /accounts/{system_id}/custom_fields/{custom_field_system_id}
Description Returns specified custom field with its value which is set for specified
account.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Custom Field found.
404 Not Found Account or Custom Field not found.
Body CustomFieldBean - success.
ErrorBean - failure.

JSON example:

GET /accounts/account_a/custom_fields/day_went_live

Response body:

{
"name": "Day Went Live",
"system_id": "day_went_live",
"type_name": "Date",
"type_system_id": 3,
"value": "10/01/13",
"value_formatted": "01/10/13"
}

62 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


7. POST /accounts/{system_id}/custom_fields

HTTP Method POST


Path /accounts/{system_id}/custom_fields
Description Sets custom field value to specified account based on received
CustomFieldBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body CustomFieldBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created Custom Field value set successfully.
400 Bad Request Custom Field value is not in the right format.
404 Not Found Account or Custom Field not found
Body AccountBean - success.
ErrorBean - failure.

JSON example:

POST /accounts/account_a/custom_fields

Request body:

{
"system_id": "additional_notes",
"value": "Account A is the leader in electronic industry."
}

Response body:
{
"annual_revenue": 54321.35,
"annual_revenue_formatted": 54,321.35,
"billing_address": {
"address2": "Second Street 456",
"address3": "Third Street 789",
"city": "San Francisco",
"country": {
"name": "USA",
"system_id": "usa"
},
"state": {
"name": "California",
"system_id": "CA"
},
"street": "First Street 123",
"zip": "12345"
},
"custom_fields": [

63 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


{
"name": "Day Went Live",
"system_id": "day_went_live",
"type_name": "Date",
"type_system_id": 3,
"value": "10/01/13",
"value_formatted": "01/10/13"
},
{
"name": "Additional Notes",
"system_id": "additional_notes",
"type_name": "Large Text",
"type_system_id": 5,
"value": "Account A is the leader in electronic industry.",
"value_formatted": "Account A is the leader in electronic industry."
}
],
"description": "",
"employees": 1100,
"employees_formatted": 1,100,
"fax": "555-555-001",
"location": "San Francisco",
"name": "Account A",
"phone": "555-555-001",
"shipping_address": {
"address2": "Second Street 456",
"address3": "Third Street 789",
"city": "San Francisco",
"country": {
"name": "USA",
"system_id": "usa"
},
"state": {
"name": "California",
"system_id": "CA"
},
"street": "First Street 123",
"zip": "12345"
},
"system_id": "account_a",
"uri": "http://localhost:8080/wpm/api/accounts/account_a",
"web_site": "www.accounta.com"
}

8. PUT /accounts/{system_id}/custom_fields

HTTP Method PUT


Path /accounts/{system_id}/custom_fields
Description Updates custom field value in specified account based on received
CustomFieldBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body CustomFieldBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 200 OK Custom Field value set successfully.
400 Bad Request Custom Field value is not in the right format.

64 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


404 Not Found Account or Custom Field not found
Body AccountBean - success.
ErrorBean - failure.

JSON example:

PUT /accounts/account_a/custom_fields

Request body:

{
"system_id": "day_went_live",
"value": "11/20/13"
}

Response body:

{
"annual_revenue": 54321.35,
"annual_revenue_formatted": 54,321.35,
"billing_address": {
"address2": "Second Street 456",
"address3": "Third Street 789",
"city": "San Francisco",
"country": {
"name": "USA",
"system_id": "usa"
},
"state": {
"name": "California",
"system_id": "CA"
},
"street": "First Street 123",
"zip": "12345"
},
"custom_fields": [
{
"name": "Day Went Live",
"system_id": "day_went_live",
"type_name": "Date",
"type_system_id": 3,
"value": "10/01/13",
"value_formatted": "01/10/13"
},
{
"name": "Additional Notes",
"system_id": "additional_notes",
"type_name": "Large Text",
"type_system_id": 5,
"value": "Account A is the leader in electronic industry.",
"value_formatted": "Account A is the leader in electronic industry."
}
],
"description": "",
"employees": 1100,
"employees_formatted": 1,100,
"fax": "555-555-001",
"location": "San Francisco",
"name": "Account A",
"phone": "555-555-001",

65 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"shipping_address": {
"address2": "Second Street 456",
"address3": "Third Street 789",
"city": "San Francisco",
"country": {
"name": "USA",
"system_id": "usa"
},
"state": {
"name": "California",
"system_id": "CA"
},
"street": "First Street 123",
"zip": "12345"
},
"system_id": "account_a",
"uri": "http://localhost:8080/wpm/api/accounts/account_a",
"web_site": "www.accounta.com"
}

9. DELETE /accounts/{system_id}/custom_fields/{custom_field_system_id}

HTTP Method DELETE


Path /accounts/{system_id}/custom_fields/{custom_field_system_id}
Description Deletes the value of specified custom field for specified account.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Custom field value successfully deleted.
404 Not Found Account or Custom Field not found.
Body ErrorBean - failure.

Example request: DELETE /accounts/account_a/custom_fields/day_went_live

66 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


2. Case
Resource: Case Main path: /cases

1. GET /cases/{system_id}

HTTP Method GET


Path /cases/{system_id}
Description Returns the case with specified system id.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case found.
404 Not Found Case not found.
Body CaseBean - success.
ErrorBean - failure.

JSON example:

a) GET /cases/Task-sp-3

Response body:

{
"assignees": [
{
"first_name":
"Tom",
"last_name":
"Smith",
"login_name":
"tsmith",
"system_id":
"tsmith",
"uri":
"http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and
Marketing", "system_id":
"sales_and_marketing"
}
},
{
"first_name":
"John",
"last_name":
"Smith",
"login_name":
"jsmith",
"system_id":
"jsmith",

67 "uri":
CallidusCloud WorkFlow
"http://localhost:8080/wpm/api/users/jsmith", 2013 Callidus Software Inc. All Rights Reserved.
"user_type": {
"name": "Sales and
Marketing", "system_id":
"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,
"created_on": "09/10/13 14:50:49",
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"custom_fields": [
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "20",
"value_formatted": "20"
},
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "15",
"value_formatted": "15"
}
],
"description": "This case is created via REST API.",
"name": "REST API - Case 3",
"owner": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"priority": {
"name": "Medium",
"system_id": "Non-Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Task-sp-3",
"updated_on": "09/10/13 14:50:49",
"updater": {
"first_name": "John",
"last_name": "Smith",

68 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-3"
}

b) GET /cases/some_non_existing_case
{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Case does not exist."
]
}

2. POST /cases

HTTP Method POST


Path /cases
Description Creates a case based on received CaseBean.

Case creator - user who is performing REST API call.


Case updater - user who is performing REST API call.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body CaseBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created Case successfully created.
404 Not Found Any child entity (account, contact, creator rtc.) with
sent system_id not found.
Body CaseBean - success.
ErrorBean - failure.

JSON example:

a) POST /cases

User performing REST call is jsmith.

69 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


Request body:

{
"case_type_system_id": "Task",
"description": "This case is created via REST API.",
"name": "REST API - Case 3",
"project_system_id": "sp",
"owner_system_id": "jsmith",
"assignees": [
{
"system_id": "jsmith"
},
{
"system_id": "tsmith"
}
],
"custom_fields": [
{
"system_id": "duration",
"value": "20"
},
{
"system_id": "effort_left",
"value": "15"
}
],
"related_to_cases": [
{
"system_id": "Task-sp-1"
},
{
"system_id": "Task-sp-2"
}
]
}

Response body:

{
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
{
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
}
],
"case_key": "Task-sp-3",

70 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,
"created_on": "09/10/13 14:50:49",
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"custom_fields": [
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "20",
"value_formatted": "20"
},
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "15",
"value_formatted": "15"
}
],
"description": "This case is created via REST API.",
"name": "REST API - Case 3",
"owner": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"priority": {
"name": "Medium",
"system_id": "Non-Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Task-sp-3",
"updated_on": "09/10/13 14:50:49",
"updater": {
"first_name": "John",
"last_name": "Smith",

71 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-3"
}

b) If owner with sent system_id does not exist:

{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Owner does not exist."
]
}

3. POST /cases/user/{user_system_id}

HTTP Method POST


Path /cases/user/{user_system_id}
Description Creates a case based on received CaseBean. Cases creator is user with
system id user_system_id.

Case creator - user with system id user_system_id.


Case updater - user with system id user_system_id.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body CaseBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created Case successfully created.
404 Not Found User or any child entity with sent system_id not
found.
Body CaseBean - success.
ErrorBean - failure.

JSON example:

POST /cases/user/tsmith

User performing REST call is jsmith.

72 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


Request body:

{
"case_type_system_id": "Task",
"description": "This case is created via REST API.",
"name": "REST API - Case 3",
"project_system_id": "sp",
"owner_system_id": "jsmith",
"assignees": [
{
"system_id": "jsmith"
},
{
"system_id": "tsmith"
}
],
"custom_fields": [
{
"system_id": "duration",
"value": "20"
},
{
"system_id": "effort_left",
"value": "15"
}
],
"related_to_cases": [
{
"system_id": "Task-sp-1"
},
{
"system_id": "Task-sp-2"
}
]
}

Response body:

{
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
{
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
}

73 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


],
"case_key": "Task-sp-5",
"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,
"created_on": "09/10/13 15:55:32",
"creator": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"custom_fields": [
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "20",
"value_formatted": "20"
},
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "15",
"value_formatted": "15"
}
],
"description": "This case is created via REST API.",
"name": "REST API - Case 4",
"owner": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"priority": {
"name": "Medium",
"system_id": "Non-Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Task-sp-5",
"updated_on": "09/10/13 15:55:32",
"updater": {

74 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-5"
}

4. PUT /cases

HTTP Method PUT


Path /cases
Description Updates the case based on received CaseBean.

Case updater - user who is performing REST API call.

Important note: Case Type and Project cannot be changed using this
method. Corresponding case actions should be invoked using this
method: PUT /cases/{system_id}/actions/{action_system_id}
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body CaseBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case successfully updated.
404 Not Found Case or any child entity with sent system_id not
found.
Body CaseBean - success.
ErrorBean - failure.

JSON example:

If we want to update the case created in POST /cases request we would have the following request:

PUT /cases

User performing REST call is jsmith. This user created a case.

Request body:

{
"system_id": "Task-sp-3",
"case_type_system_id":
"Bug",
"description": "This case is created via REST API.",

75 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"name": "REST API - Case 3 - UPDATED",
"project_system_id": "sp",
"owner_system_id": "tsmith",
"assignees": [
{
"system_id": "jsmith"
}
],
"custom_fields": [
{
"system_id": "duration",
"value": "20"
},
{
"system_id": "effort_left",
"value": "5"
}
],
"related_to_cases": [
{
"system_id": "Task-sp-1"
},
{
"system_id": "Task-sp-2"
}
]
}

Response body:

{
"assignees": [
{
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
}
],
"case_key": "Task-sp-3",
"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,
"created_on": "09/10/13 14:50:49",
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"custom_fields": [
{
"name": "Duration",

76 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "20",
"value_formatted": "20"
},
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "5",
"value_formatted": "5"
}
],
"description": "This case is created via REST API.",
"name": "REST API - Case 3 - UPDATED",
"owner": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"priority": {
"name": "Medium",
"system_id": "Non-Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Task-sp-3",
"updated_on": "09/10/13 16:54:34",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-3"
}

77 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


5. PUT /cases/user/{user_system_id}

HTTP Method PUT


Path /cases/user/{user_system_id}
Description Updates the case based on received CaseBean. Cases updater is user
with system id user_system_id.

Case updater - user with system id user_system_id.

Important note: Case Type and Project cannot be changed using this
method. Corresponding case actions should be invoked using this
method:
PUT /cases/{system_id}/actions/{action_system_id}/{user_system_id}
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body CaseBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case successfully updated.
404 Not Found User, Case or any child entity with sent system_id
not found.
Body CaseBean - success.
ErrorBean - failure.

JSON example:

If we want to update the case created in POST /cases/user/tsmith request we would have the following
request:

PUT /cases/user/jsmith

User performing REST call is tsmith. User tsmith created a case.

Request body:

{
"system_id": "Task-sp-5",
"case_type_system_id": "Bug",
"description": "This case is created via REST API.",
"name": "REST API - Case 3 - UPDATED",
"project_system_id": "sp",
"owner_system_id": "tsmith",
"assignees": [
{
"system_id": "tsmith"
}

78 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


],
"custom_fields": [
{
"system_id": "duration",
"value": "20"
},
{
"system_id": "effort_left",
"value": "1"
}
],
"related_to_cases": [
{
"system_id": "Task-sp-2"
}
]
}

Response body:

{
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
}
],
"case_key": "Task-sp-5",
"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,
"created_on": "09/10/13 15:55:32",
"creator": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"custom_fields": [
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "1",
"value_formatted": "1"
},
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,

79 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"value": "20",
"value_formatted": "20"
}
],
"description": "This case is created via REST API.",
"name": "REST API - Case 3 - UPDATED",
"owner": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"priority": {
"name": "Medium",
"system_id": "Non-Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Task-sp-5",
"updated_on": "09/10/13 17:07:04",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-5"
}

80 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


6. DELETE /cases/{system_id}

HTTP Method DELETE


Path /cases/{system_id}
Description Deletes the case with specified system id.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case successfully deleted.
304 Not Modified If case could not be deleted.
404 Not Found Case not found.
Body ErrorBean - failure.

Example request: DELETE /cases/Task-sp-1

7. DELETE /cases/{system_id}/delete_with_related

HTTP Method DELETE


Path /cases/{system_id}/delete_with_related
Description Deletes the case with specified system id and deletes its related cases
(cases for which case with system id system_id is their parent).
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case successfully deleted.
304 Not Modified If case could not be deleted.
404 Not Found Case not found.
Body ErrorBean - failure.

Example request: DELETE /cases/Task-sp-1

81 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


8. GET /cases

HTTP Method GET


Path /cases
Description Search cases based on set query parameters. Returns a list of cases
which satisfy search criteria.

Available search attributes:


page (Number)
page_size (Number)
name (String)
decription (String)
case_key (String)
created_by (String) 1
updated_by (String) 2
assignee (String) 3
owner (String) 4
referral (String) 5
team_member (String) 6
status (String) 7
project (String) 8
priority (String) 9
case_type (String) 10
system_id (String)
mask (String) 11

1, 2, 3, 4, 5 and 6 user system ids sepatated with space:


/cases?updated_by=jsmith tsmith&assignee=jsmith
tsmith&owner=jsmith&team_member=jsmith

7, 8, 9 and 10 entity system ids separated by space:


/cases?project=sp impl dev&case_type=Task Bug

11 list of fields separated by space which are going to be returned in case


object:
/cases?project=sp&mask=name case_key status

These search attributes are set as query parameters:


/cases?name=implement&updated_by=john&page=1&page_size=5
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK

82 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


Body ResultBean with a list of CaseBeans.

JSON example:

There are three cases:

1. 2. 3.
name: Case 1 name: Case 2 name: Case 3
case_key: Task-sp-1 case_key: Task-sp-2 case_key: Bug-dev-1
project: sp project: sp project: dev
assignees: jsmith, tsmith assignees: jsmith, tsmith assignees: tsmith
owner: jsmith owner: tsmith owner: jsmith

a) Complete CaseBean

If we want to find cases which are assigned to jsmith and tsmith and which has tsmith as case owner we
will get only Case 2 in the result. We would form the following request:

GET /cases?assignee=jsmith tsmith&owner=tsmith&page=1&page_size=5

Response body:

{
"cases": [
{
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
{
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
}
],
"case_key": "Task-sp-2",
"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,
"created_on": "10/10/13 11:11:31",
"creator": {
"first_name": "John",

83 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"custom_fields": [
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "1",
"value_formatted": "1"
},
],
"description": "",
"name": "Case 2",
"owner": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"priority": {
"name": "High",
"system_id": "Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Task-sp-2",
"updated_on": "10/10/13 11:11:55",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-2"
}
],
"completed_in": 580,
"page": 1,
"page_size": 5,
"total": 1
}

84 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


b) Using mask to return only specified fields

GET /cases?assignee=jsmith tsmith&owner=tsmith&mask=name case_key project&page=1&page_size=5

Reponse body:

{
"cases": [
{
"case_key": "Task-sp-3",
"name": "REST API - Case 3 - UPDATED",
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
}
},
{
"case_key": "Task-sp-5",
"name": "REST API - Case 3 - UPDATED",
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
}
},
{
"case_key": "Task-sp-7",
"name": "Case 2",
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
}
}
],
"completed_in": 395,
"page": 1,
"page_size": 5,
"total": 3
}

85 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


9. PUT /cases/{system_id}/close

HTTP Method PUT


Path /cases/{system_id}/close
Description Closes the case with specified system id.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body CaseBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case successfully closed.
304 Not Modified Case not closed.
404 Not Found Case not found.
Body CaseBean - success.
ErrorBean - failure.

Request example:

PUT /cases/Task-sp-3/close

10. PUT /cases/{system_id}/close_with_related

HTTP Method PUT


Path /cases/{system_id}/close_with_related
Description Closes the case with specified system id and closes its related cases
(cases for which case with system id system_id is their parent).
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body CaseBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case successfully closed.
304 Not Modified Case not closed.
404 Not Found Case not found.
Body CaseBean - success.
ErrorBean - failure.

86 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


11. POST /cases/create_bulk

HTTP Method POST


Path /cases/create_bulk
Description Creates a list of cases based on received list of caseBean objects.

Case creator - user who is performing REST API call.


Case updater - user who is performing REST API call.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body List of CaseBean objects
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created Cases successfully created.
404 Not Found Any child entity (account, contact, creator etc.)
with sent system_id not found.
Body processed_entities - success.
errors failure.

JSON example:
a) POST /cases/create_bulk
User performing REST call is jsmith.

Request body:
[{
"case_type_system_id": "Task",
"description": "This case is created via REST API.",
"name": "REST API - Case 1",
"project_system_id": "sp",
"owner_system_id": "jsmith",
"assignees": [{
"system_id": "jsmith"
},
{
"system_id": "tsmith"
}],
"custom_fields": [{
"system_id": "duration",
"value": "20"
},
{
"system_id": "effort_left",
"value": "15"
}],
"related_to_cases": [{
"system_id": "Task-sp-1"
},
{
"system_id": "Task-sp-2"
}]
},

87 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


{
"case_type_system_id": "nonexistent",
"description": "This case is created via REST API.",
"name": "REST API - Case 2",
"project_system_id": "nonexistent",
"status_system_id": "nonexistent",
"contact_system_id": "nonexistent",
"account_system_id": "nonexistent",
"priority_system_id": "nonexistent",
"owner_system_id": "nonexistent",
"assignees": [{
"system_id": "jsmith"
},
{
"system_id": "tsmith"
}],
"custom_fields": [{
"system_id": "duration",
"value": "20"
},
{
"system_id": "effort_left",
"value": "15"
}],
"related_to_cases": [{
"system_id": "Task-sp-1"
},
{
"system_id": "Task-sp-2"
}]
}]

Response body:
{
"errors": [
{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Case type does not exist.",
"Status does not exist.",
"Priority does not exist.",
"Project does not exist.",
"Account does not exist.",
"Contact does not exist.",
"Owner does not exist."
],
"failed_index": 2
}
],
"processed_entities": [
{
"name": "REST API - Case 1",
"case_key": "Task-sp-24",
"system_id": "task-sp-24",
"description": "This case is created via REST API.",
"closed": false,
"created_on": "09/01/2016 10:24:57",
"updated_on": "09/01/2016 10:24:57",
"case_type": {
"name": "Task",
"unique_key": "task",
"system_id": "task"
},

88 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"status": {
"name": "Closed",
"system_id": "closed"
},
"priority": {
"name": "Critical",
"system_id": "Critical"
},
"project": {
"name": "sp",
"system_id": "sp",
"is_default": false,
"uri": "http://localhost:8080/wpm/api/projects/sp"
},

},
"creator": {
"login_name": "rest",
"first_name": "rest",
"last_name": "",
"user_type": {
"name": "Internal User",
"system_id": "internal_user"
},
"system_id": "rest",
"uri": "http://localhost:8080/wpm/api/users/rest"
},
"updater": {
"login_name": "rest",
"first_name": "rest",
"last_name": "",
"user_type": {
"name": "Internal User",
"system_id": "internal_user"
},
"system_id": "rest",
"uri": "http://localhost:8080/wpm/api/users/rest"
},
"owner": {
"login_name": "jsmith",
"first_name": "John",
"last_name": "Smith",
"user_type": {
"name": "Internal User",
"system_id": "internal_user"
},
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith"
},

89 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"assignees": [
{
"login_name": "jsmith",
"first_name": "John",
"last_name": "Smith",
"user_type": {
"name": "Internal User",
"system_id": "internal_user"
},
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith"
}
],

"related_to_cases": [
{
"name": "REST API - Case 2",
"case_key": "Task-sp-2",
"system_id": "task-sp-2",
"uri": "http://localhost:8080/wpm/api/cases/task-sp-2"
},
{
"name": "REST API - Case 1",
"case_key": "Task-sp-1",
"system_id": "task-sp-1",
"uri": "http://localhost:8080/wpm/api/cases/task-sp-1"
}
],
"related_from_cases": [],
"uri": "http://localhost:8080/wpm/api/cases/task-sp-24",
"case_url": "http://localhost:8080/wpm/mt/junit/projects/sp/task-24"
}
]
}

90 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


b) If case type, owner, project, status, priority, account, contact with sent system_id does not exist:

"errors": [
{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Case type does not exist.",
"Owner does not exist.",
"Project does not exist.",
"Status does not exist.",
"Priority does not exist.",
"Account does not exist.",
"Contact does not exist.",

],
"failed_index": 1
}
]

Errors - List of messages with error details


Failed_index - Index of case with bad request.

91 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


12. PUT /cases/update_bulk

HTTP Method PUT


Path /cases/update_bulk
Description Updates a list of cases based on received list of caseBean objects.

Case updater - user who is performing REST API call.

Important note: Case Type and Project cannot be changed using this
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body List of CaseBean objects
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case successfully updated.
404 Not Found Case or any child entity with sent system_id not
found.
Body processed_entities - success.
errors failure.

JSON example:

PUT/cases/update_bulk

User performing REST call is jsmith.

Request body:

[{
"system_id": "Task-sp-1",
"case_type_system_id": "Task",
"description": "This case is updated via REST API.",
"name": "REST API - Case 1 UPDATED",
"project_system_id": "sp",
"owner_system_id": "jsmith",
"assignees": [{
"system_id": "jsmith"
},
{
"system_id": "tsmith"
}],

92 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"custom_fields": [{
"system_id": "duration",
"value": "20"
},
{
"system_id": "effort_left",
"value": "15"
}],
"related_to_cases": [{
"system_id": "Task-sp-1"
},
{
"system_id": "Task-sp-2"
}]
},
{
"system_id": "Task-sp-2",
"case_type_system_id": "Task",
"description": "This case is updated via REST API.",
"name": "REST API - Case 2 UPDATED",
"project_system_id": "nonexistent",
"status_system_id": "nonexistent",
"contact_system_id": "nonexistent",
"account_system_id": "nonexistent",
"priority_system_id": "nonexistent",
"owner_system_id": "nonexistent",
"assignees": [{
"system_id": "jsmith"
},
{
"system_id": "tsmith"
}],
"custom_fields": [{
"system_id": "duration",
"value": "20"
},
{
"system_id": "effort_left",
"value": "15"
}],
"related_to_cases": [{
"system_id": "Task-sp-1"
},
{
"system_id": "Task-sp-2"
}]
}]

93 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


Response body:

{
"errors": [
{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Status does not exist.",
"Priority does not exist.",
"Account does not exist.",
"Contact does not exist.",
"Owner does not exist."
],
"failed_index": 2
}
],
"processed_entities": [
{
"name": "REST API - Case 1 UPDATED",
"case_key": "Task-sp-1",
"system_id": "task-sp-1",
"description": "This case is updated via REST API.",
"closed": false,
"created_on": "08/31/2016 16:48:51",
"updated_on": "09/01/2016 11:04:26",
"case_type": {
"name": "Task",
"unique_key": "task",
"system_id": "task"
},
"status": {
"name": "Closed",
"system_id": "closed"
},
"priority": {
"name": "Critical",
"system_id": "Critical"
},
"project": {
"name": "sp",
"system_id": "sp",
"is_default": false,
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"creator": {
"login_name": "rest",
"first_name": "rest",
"last_name": "",
"user_type": {
"name": "Internal User",
"system_id": "internal_user"
},
"system_id": "rest",
"uri": "http://localhost:8080/wpm/api/users/rest"
},
"updater": {
"login_name": "rest",
"first_name": "rest",
"last_name": "",
"user_type": {
"name": "Internal User",
"system_id": "internal_user"
},
"system_id": "rest",
"uri": "http://localhost:8080/wpm/api/users/rest"
},

94 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"owner": {
"login_name": "jsmith",
"first_name": "John",
"last_name": "Smith",
"user_type": {
"name": "Internal User",
"system_id": "internal_user"
},
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith"
},
"assignees": [
{
"login_name": "jsmith",
"first_name": "John",
"last_name": "Smith",
"user_type": {
"name": "Internal User",
"system_id": "internal_user"
},
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith"
}
],
"related_to_cases": [
{
"name": "REST API - Case 2 UPDATED",
"case_key": "Task-sp-2",
"system_id": "task-sp-2",
"uri": "http://localhost:8080/wpm/api/cases/task-sp-2"
},
{
"name": "REST API - Case 1 UPDATED",
"case_key": "Task-sp-1",
"system_id": "task-sp-1",
"uri": "http://localhost:8080/wpm/api/cases/task-sp-1"
}
],
"related_from_cases": [
{
"name": "REST API - Case 2 UPDATED",
"case_key": "Task-sp-2",
"system_id": "task-sp-2",
"uri": "http://localhost:8080/wpm/api/cases/task-sp-2"
},
{
"name": "REST API - Case 1",
"case_key": "Task-sp-21",
"system_id": "task-sp-21",
"uri": "http://localhost:8080/wpm/api/cases/task-sp-21"
},
{
"name": "REST API - Case 1",
"case_key": "Task-sp-24",
"system_id": "task-sp-24",
"uri": "http://localhost:8080/wpm/api/cases/task-sp-24"
},
{
"name": "REST API - Case 2",
"case_key": "Task-sp-3",
"system_id": "task-sp-3",
"uri": "http://localhost:8080/wpm/api/cases/task-sp-3"
},
{
"name": "REST API - Case 1 UPDATED",
"case_key": "Task-sp-1",
"system_id": "task-sp-1",
"uri": "http://localhost:8080/wpm/api/cases/task-sp-1"
},

95 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


{
"name": "REST API - Case 1",
"case_key": "Task-sp-22",
"system_id": "task-sp-22",
"uri": "http://localhost:8080/wpm/api/cases/task-sp-22"
},
{
"name": "REST API - Case 1",
"case_key": "Task-sp-23",
"system_id": "task-sp-23",
"uri": "http://localhost:8080/wpm/api/cases/task-sp-23"
}
],
"uri": "http://localhost:8080/wpm/api/cases/task-sp-1",
"case_url": "http://localhost:8080/wpm/mt/junit/projects/sp/task-1"
}
]
}

96 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


13. GET /cases/list/{system_id}

HTTP Method GET


Path /cases/list/{system_id}
Description Returns cases which belong to the list with specified system id.

Available search attributes:


page (Number)
page_size (Number)

These search attributes are set as query parameters:


/cases/list/list_of_tasks?page=1&page_size=10
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case list found.
404 Not Found Case not found.
Body ResultBean with a list of CaseBeans - success.
ErrorBean - failure.

JSON example:

a) List with system_id list_of_tasks contains 2 cases:

GET /cases/list/list_of_tasks?page=1&page_size=10

Response body:
{
"cases": [
{
"assignees": [
{
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {

97 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


name": "Sales and Marketing", "system_id":
"sales_and_marketing"
}
}
],
"case_key": "Task-sp-3",
"case_type": {
"name": "Bug",
"system_id": "bug",
"unique_key": "bug"
},
"closed": false,
"created_on": "09/10/13 14:50:49",
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"custom_fields": [
{
"name": "Duration", "system_id":
"durationw "type_name":
"Number", "type_system_id": 2,
"value": "20",
"value_formatted": "20"
},
{
"name": "Effort Left", "system_id":
"effort_left", "type_name":
"Number", "type_system_id": 2,
"value": "5",
"value_formatted": "5"
}
],
"description": "This case is created via REST API.", "name":
"REST API - Case 3 - UPDATED",
"owner": { "first_name":
"Tom", "last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"priority": { "name":
"Medium",
"system_id": "Non-Critical"
},
"project": { "description": "",
"is_default": false, "name":
"Sales Project", "system_id":
"sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"status": {
"name": "Described",
"system_id": "described"

98 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


},
"system_id": "Task-sp-3",
"updated_on": "09/10/13 16:54:34",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-3"
},
{
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
}
],
"case_key": "Task-sp-5",
"case_type": {
"name": "Bug",
"system_id": "bug",
"unique_key": "bug"
},
"closed": false,
"created_on": "09/10/13 15:55:32",
"creator": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"custom_fields": [
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "1",
"value_formatted": "1"
},
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "20",
"value_formatted": "20"
}
],
"description": "This case is created via REST API.",
"name": "REST API - Case 3 - UPDATED",

90 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"owner": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"priority": {
"name": "Medium",
"system_id": "Non-Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Task-sp-5",
"updated_on": "09/10/13 17:07:04",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-5"
}
],
"completed_in": 0,
"page": 1,
"page_size": 10,
"total": 2
}

b) GET /cases/list/some_non_existing_list
{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Case list does not exist."
]
}

91 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


14. GET /cases/smart_list/{system_id}

HTTP Method GET


Path /cases/smart_list/{system_id}
Description Returns cases which belong to the smart list with specified system id.
In other words, returns cases which satisfy search criteria saved by
smart list.

Available search attributes:


page (Number)
page_size (Number)

These search attributes are set as query parameters:


/cases/smart_list/toms_smart_list?page=1&page_size=10
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Smart list found.
404 Not Found Smart list not found.
Body ResultBean with a list of CaseBeans - success.
ErrorBean - failure.

JSON example:

a) Smart list with system id toms_smart_list returns cases where John Smith and Tom Smith are
assignees, Tom Smith is case owner and cases belong to Sales Project. List returns two cases.

GET /cases/smart_list/toms_smart_list?page=1&page_size=10

Response body:
{
"cases": [
{
"assignees": [
{
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}

92 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


}
],
"case_key": "Task-sp-3",
"case_type": {
"name": "Bug",
"system_id": "bug",
"unique_key": "bug"
},
"closed": false,
"created_on": "09/10/13 14:50:49",
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"custom_fields": [
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "20",
"value_formatted": "20"
},
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "5",
"value_formatted": "5"
}
],
"description": "This case is created via REST API.",
"name": "REST API - Case 3 - UPDATED",
"owner": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"priority": {
"name": "Medium",
"system_id": "Non-Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Task-sp-3",
"updated_on": "09/10/13 16:54:34",

93 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"updater": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-3"
},
{
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
}
],
"case_key": "Task-sp-5",
"case_type": {
"name": "Bug",
"system_id": "bug",
"unique_key": "bug"
},
"closed": false,
"created_on": "09/10/13 15:55:32",
"creator": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"custom_fields": [
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "1",
"value_formatted": "1"
},
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "20",
"value_formatted": "20"
}
],
"description": "This case is created via REST API.",
"name": "REST API - Case 3 - UPDATED",
"owner": {
"first_name": "Tom",
"last_name": "Smith",

94 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"priority": {
"name": "Medium",
"system_id": "Non-Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Task-sp-5",
"updated_on": "09/10/13 17:07:04",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-5"
}
],
"completed_in": 0,
"page": 1,
"page_size": 10,
"total": 2
}

b) GET /cases/smart_list/some_non_existing_smart_list

{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Smart list does not exist."
]
}

95 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


15. GET /cases/system_list/creator

HTTP Method GET


Path /cases/system_list/creator
Description Returns a list of cases in which user performing the REST call is the
creator.

Available search attributes:


page (Number)
page_size (Number)

These search attributes are set as query parameters:


/cases/system_list/creator?page=1&page_size=10
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK
Body ResultBean with a list of CaseBeans - success.

JSON example:

John Smith created one case.

GET /cases/system_list/creator?page=1&page_size=10

Response body:

{
"cases": [
{
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
}
],
"case_key": "Task-sp-8",
"case_type": {
"name": "Task",
"system_id": "task",

96 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"unique_key": "task"
},
"closed": false,
"created_on": "10/10/13 14:41:18",
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"custom_fields": [
{
"name": "Refresh List",
"system_id": "refresh_list",
"type_name": "Checkbox",
"type_system_id": 8
}
],
"description": "",
"name": "Test Case 1",
"priority": {
"name": "Low",
"system_id": "Trivial"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Task-sp-8",
"updated_on": "10/10/13 14:42:07",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-8"
}
],
"completed_in": 0,
"page": 1,
"page_size": 10,
"total": 1
}

97 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


16. GET /cases/system_list/creator/{user_system_id}

HTTP Method GET


Path /cases/smart_list/creator/{user_system_id}
Description Returns a list of cases in which user with specified system id is the
creator.

Available search attributes:


page (Number)
page_size (Number)

These search attributes are set as query parameters:


/cases/smart_list/creator/tsmith?page=1&page_size=10
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK User found.
404 Not Found User not found.
Body ResultBean with a list of CaseBeans - success.
ErrorBean - failure.

JSON example:

Tom Smith created one case. REST call is performed by John Smith and he needs a list of cases created
by Tom Smith.

GET /cases/system_list/creator/tsmith?page=1&page_size=10

Response body:

{
"cases": [
{
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
}
],

98 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"case_key": "Task-sp-5",
"case_type": {
"name": "Bug",
"system_id": "bug",
"unique_key": "bug"
},
"closed": false,
"created_on": "09/10/13 15:55:32",
"creator": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"custom_fields": [
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "1",
"value_formatted": "1"
},
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "20",
"value_formatted": "20"
}
],
"description": "This case is created via REST API.",
"name": "REST API - Case 3 - UPDATED",
"owner": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"priority": {
"name": "Medium",
"system_id": "Non-Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Task-sp-5",
"updated_on": "09/10/13 17:07:04",
"updater": {
"first_name": "John",

99 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.


"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-5"
}
],
"completed_in": 0,
"page": 1,
"page_size": 10,
"total": 1
}

17. GET /cases/system_list/assignee

HTTP Method GET


Path /cases/system_list/assignee
Description Returns a list of cases in which user performing the REST call is the
assignee.

Available search attributes:


page (Number)
page_size (Number)

These search attributes are set as query parameters:


/cases/system_list/assignee?page=1&page_size=10
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK
Body ResultBean with a list of CaseBeans - success.

Request example:

GET /cases/system_list/assignee?page=1&page_size=10

Response body has the same format as in GET /cases/system_list/creator.

100 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
18. GET /cases/system_list/assignee/{user_system_id}

HTTP Method GET


Path /cases/smart_list/assignee/{user_system_id}
Description Returns a list of cases in which user with specified system id is the
assignee.

Available search attributes:


page (Number)
page_size (Number)

These search attributes are set as query parameters:


/cases/smart_list/assignee/tsmith?page=1&page_size=10
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK User found.
404 Not Found User not found.
Body ResultBean with a list of CaseBeans - success.
ErrorBean - failure.

Request example:

GET /cases/system_list/assignee/tsmith?page=1&page_size=10

Response body has the same format as in GET /cases/system_list/creator/{user_system_id}.

101 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
19. GET /cases/system_list/owner

HTTP Method GET


Path /cases/system_list/owner
Description Returns a list of cases in which user performing the REST call is the
owner.

Available search attributes:


page (Number)
page_size (Number)

These search attributes are set as query parameters:


/cases/system_list/owner?page=1&page_size=10
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK
Body ResultBean with a list of CaseBeans - success.

Request example:

GET /cases/system_list/owner?page=1&page_size=10

Response body has the same format as in GET /cases/system_list/creator.

20. GET /cases/system_list/owner/{user_system_id}

HTTP Method GET


Path /cases/smart_list/owner/{user_system_id}
Description Returns a list of cases in which user with specified system id is the
owner.

Available search attributes:


page (Number)
page_size (Number)

These search attributes are set as query parameters:


/cases/smart_list/owner/tsmith?page=1&page_size=10
Required headers Authorization, domain, Accept
102 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK User found.
404 Not Found User not found.
Body ResultBean with a list of CaseBeans - success.
ErrorBean - failure.

Request example:

GET /cases/system_list/owner/tsmith?page=1&page_size=10

Response body has the same format as in GET /cases/system_list/creator/{user_system_id}.

21. GET /cases/system_list/team_member

HTTP Method GET


Path /cases/system_list/team_member
Description Returns a list of cases in which user performing the REST call is the
team member.

Available search attributes:


page (Number)
page_size (Number)

These search attributes are set as query parameters:


/cases/system_list/team_member?page=1&page_size=10
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK
Body ResultBean with a list of CaseBeans - success.

Request example:

GET /cases/system_list/team_member?page=1&page_size=10

103 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Response body has the same format as in GET /cases/system_list/creator.

22. GET /cases/system_list/team_member/{user_system_id}

HTTP Method GET


Path /cases/smart_list/team_member/{user_system_id}
Description Returns a list of cases in which user with specified system id is the
team member.

Available search attributes:


page (Number)
page_size (Number)

These search attributes are set as query parameters:


/cases/smart_list/team_member/tsmith?page=1&page_size=10
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK User found.
404 Not Found User not found.
Body ResultBean with a list of CaseBeans - success.
ErrorBean - failure.

Request example:

GET /cases/system_list/team_member/tsmith?page=1&page_size=10

Response body has the same format as in GET /cases/system_list/creator/{user_system_id}.

23. GET /cases/system_list/referral

HTTP Method GET


Path /cases/system_list/referral
Description Returns a list of cases in which user performing the REST call is the
referral.

Available search attributes:

104 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
page (Number)
page_size (Number)

These search attributes are set as query parameters:


/cases/system_list/referral?page=1&page_size=10
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK
Body ResultBean with a list of CaseBeans - success.

105 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Request example:

GET /cases/system_list/referral?page=1&page_size=10

Response body has the same format as in GET /cases/system_list/creator.

24. GET /cases/system_list/referral/{user_system_id}

HTTP Method GET


Path /cases/smart_list/referral/{user_system_id}
Description Returns a list of cases in which user with specified system id is the
referral.

Available search attributes:


page (Number)
page_size (Number)

These search attributes are set as query parameters:


/cases/smart_list/referral/tsmith?page=1&page_size=10
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK User found.
404 Not Found User not found.
Body ResultBean with a list of CaseBeans - success.
ErrorBean - failure.

Request example:

GET /cases/system_list/referral/tsmith?page=1&page_size=10

Response body has the same format as in GET /cases/system_list/creator/{user_system_id}.

106 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
25. GET /cases/system_list/follower

HTTP Method GET


Path /cases/system_list/follower
Description Returns a list of cases in which user performing the REST call is the
follower.

Available search attributes:


page (Number)
page_size (Number)

These search attributes are set as query parameters:


/cases/system_list/follower?page=1&page_size=10
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK
Body ResultBean with a list of CaseBeans - success.

Request example:

GET /cases/system_list/follower?page=1&page_size=10

Response body has the same format as in GET /cases/system_list/creator.

107 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
26. GET /cases/system_list/follower/{user_system_id}

HTTP Method GET


Path /cases/smart_list/follower/{user_system_id}
Description Returns a list of cases in which user with specified system id is the
follower.

Available search attributes:


page (Number)
page_size (Number)

These search attributes are set as query parameters:


/cases/smart_list/follower/tsmith?page=1&page_size=10
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK User found.
404 Not Found User not found.
Body ResultBean with a list of CaseBeans - success.
ErrorBean - failure.

Request example:

GET /cases/system_list/follower/tsmith?page=1&page_size=10

Response body has the same format as in GET /cases/system_list/creator/{user_system_id}.

108 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
27. GET /cases/{system_id}/related_cases

HTTP Method GET


Path /cases/{system_id}/related_cases
Description Returns a list of related cases for case with specified system id.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request Input
Accepts application/json
Expected request body N/A
Response Output
Return MIME Type application/json
HTTP Status Code 200 OK Case found.
404 Not Found Case not found.
Body A list of CaseBeans - success.
ErrorBean - failure.

JSON example:

Case Task-sp-3 has two related cases.

GET /cases/Task-sp-3/related_cases

Response body:

[
{
"case_key": "Task-sp-1",
"name": "REST API - Case 1",
"system_id": "Task-sp-1",
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-1"
},
{
"case_key": "Task-sp-2",
"name": "REST API - Case 2",
"system_id": "Task-sp-2",
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-2"
}
]

109 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
28. GET /cases/{system_id}/related_cases/inverse

HTTP Method GET


Path /cases/{system_id}/related_cases/inverse
Description Returns a list of all cases from which case with specified system id is
related.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request Input
Accepts application/json
Expected request body N/A
Response Output
Return MIME Type application/json
HTTP Status Code 200 OK Case found.
404 Not Found Case not found.
Body A list of CaseBeans - success.
ErrorBean - failure.

JSON example:

Case Task-sp-3 is related from two cases: Task-sp-4 and Task-sp-5. In other words, cases Task-sp-4 and
case Task-sp-5 have realted case Task-sp-3.

GET /cases/Task-sp-3/related_cases/inverse

Response body:
[
{
"case_key": "Task-sp-4",
"name": "Task 4",
"system_id": "Task-sp-4",
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-4"
},
{
"case_key": "Task-sp-5",
"name": "Task 5",
"system_id": "Task-sp-5",
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-5"
}
]

110 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
29. PUT /cases/{system_id}/related_cases/{related_system_id}

HTTP Method PUT


Path /cases/{system_id}/related_cases/{related_system_id}
Description Creates a relation between two existing cases. To case with system id
"system_id" it sets related case with system id "related_system_id".
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Cases successfully related.
400 Bad Request Relation already exists.
404 Not Found Cases not found.
Body ErrorBean - failure.

Request example:

PUT /cases/Task-sp-3/related_cases/Task-sp-7

30. DELETE /cases/{system_id}/related_cases/{related_system_id}

HTTP Method DELETE


Path /cases/{system_id}/related_cases/{related_system_id}
Description Deletes the relation between case with system id "system_id" and its
related case with system id "related_system_id".
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Relation between cases successfully deleted.
400 Bad Request Cases are not related.
404 Not Found Cases not found.
Body ErrorBean - failure.

Request example: DELETE /cases/Task-sp-3/related_cases/Task-sp-7

111 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Note: To find more about reading and setting Custom Field values, read Section 7 and Section 8 in
Chapter 3.

31. GET /cases/{system_id}/custom_fields/{custom_field_system_id}

HTTP Method GET


Path /cases/{system_id}/custom_fields/{custom_field_system_id}
Description Returns specified custom field with its value which is set for specified
case.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Custom Field found.
404 Not Found Case or Custom Field not found.
Body CustomFieldBean - success.
ErrorBean - failure.

JSON example:

GET /cases/Task-sp-1/custom_fields/duration

Response body:

{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "10",
"value_formatted": "10"
}

112 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
32. POST /cases/{system_id}/custom_fields

HTTP Method POST


Path /cases/{system_id}/custom_fields
Description Sets custom field value in specified case based on received
CustomFieldBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body CustomFieldBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created Custom Field value set successfully.
400 Bad Request Custom Field value is not in the right format.
404 Not Found Case or Custom Field not found
Body CaseBean - success.
ErrorBean - failure.

JSON example:

POST /cases/Task-sp-1/custom_fields

Request body:

{
"system_id": "due_date",
"value": "12/26/15"
}

Response body:

{
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
{
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",

113 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
}
],
"case_key": "Task-sp-1",
"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,
"created_on": "09/10/13 14:35:09",
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"custom_fields": [
{
"name": "Due Date",
"system_id": "due_date",
"type_name": "Date",
"type_system_id": 3,
"value": "12/26/15",
"value_formatted": "26/12/15"
},
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "3",
"value_formatted": "3"
},
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "10",
"value_formatted": "10"
}
],
"description": "This case is created via REST API.",
"name": "REST API - Case 1",
"owner": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"priority": {
"name": "Medium",
"system_id": "Non-Critical"
},
"project": {

114 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Task-sp-1",
"updated_on": "10/10/13 16:17:09",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-1"
}

33. PUT /cases/{system_id}/custom_fields

HTTP Method PUT


Path /cases/{system_id}/custom_fields
Description Updates custom field value in specified case based on received
CustomFieldBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body CustomFieldBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 200 OK Custom Field value set successfully.
400 Bad Request Custom Field value is not in the right format.
404 Not Found Case or Custom Field not found
Body CaseBean - success.
ErrorBean - failure.

JSON example:

PUT /cases/Task-sp-1/custom_fields

115 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Request body:

{
"system_id": "due_date",
"value": "01/15/16"
}

Response body:

{
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
{
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
}
],
"case_key": "Task-sp-1",
"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,
"created_on": "09/10/13 14:35:09",
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"custom_fields": [
{
"name": "Due Date",
"system_id": "due_date",
"type_name": "Date",
"type_system_id": 3,
"value": "01/15/16",
"value_formatted": "15/01/16"
},

116 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "3",
"value_formatted": "3"
},
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "10",
"value_formatted": "10"
}
],
"description": "This case is created via REST API.",
"name": "REST API - Case 1",
"owner": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"priority": {
"name": "Medium",
"system_id": "Non-Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Task-sp-1",
"updated_on": "10/10/13 16:21:10",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-1"
}

117 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
34. DELETE /cases/{system_id}/custom_fields/{custom_field_system_id}

HTTP Method DELETE


Path /cases/{system_id}/custom_fields/{custom_field_system_id}
Description Deletes the value of specified custom field in specified case.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Custom field value successfully deleted.
404 Not Found Case or Custom Field not found.
Body ErrorBean - failure.

Request example: DELETE /cases/Task-sp-1/custom_fields/due_date

35. GET /cases/{system_id}/attachments

HTTP Method GET


Path /cases/{system_id}/attachments
Description Returns a list of attachments from specified case which user who is
performing a REST call has permission to see.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case found.
404 Not Found Case not found.
Body List of AttachmentBean objects - success.
ErrorBean - failure.

118 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
JSON example:

There are four attachments in case Task-sp-1:

1. 2. 3. 4.
name: a1-public-jsmith.txt name: a2-public-jane.txt name: a3-internal-jsmith.txt name: a4-internal-jane.txt
visibility: public visibility: public visibility: internal visibility: internal
uploaded by: Jonh Smith uploaded by: Jane Smith uploaded by: Jonh Smith uploaded by: Jane Smith
uploaders company: My uploaders company: Other uploaders company: My uploaders company: Other
Company Inc. Company Inc. Company Inc. Company Inc.

John Smith can see attachments: 1 (public), 2 (public) and 3 (internal from his company).

Jane Smith can see attachments: 1 (public), 2 (public) and 4 (internal from her company).

a) John is performing REST call:

GET /cases/Task-sp-1/attachments

Response body:
[
{
"download_link": "http://localhost:8080/wpm/downloadDocument.do?attachId=29156&tenantName=default",
"internal": false,
"name": "a1-public-jsmith.txt",
"system_id": "29156",
"uploader": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
},
{
"download_link": "http://localhost:8080/wpm/downloadDocument.do?attachId=29158&tenantName=default",
"internal": false,
"name": "a2-public-jane.txt",
"system_id": "29158",
"uploader": {
"first_name": "Jane",
"last_name": "Smith",
"login_name": "jane",
"system_id": "jane",
"uri": "http://localhost:8080/wpm/api/users/jane",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
},
{
"company": {
"name": "My Company Inc.",

119 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"system_id": "my_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/my_company_inc"
},
"download_link": "http://localhost:8080/wpm/downloadDocument.do?attachId=29157&tenantName=default",
"internal": true,
"name": "a3-internal-jsmith.txt",
"system_id": "29157",
"uploader": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
}
]

b) Jane is performing REST call:

GET /cases/Task-sp-1/attachments

Response body:
[
{
"download_link": "http://localhost:8080/wpm/downloadDocument.do?attachId=29158&tenantName=default",
"internal": false,
"name": "a2-public-jane.txt",
"system_id": "29158",
"uploader": {
"first_name": "Jane",
"last_name": "Smith",
"login_name": "jane",
"system_id": "jane",
"uri": "http://localhost:8080/wpm/api/users/jane",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
},
{
"download_link": "http://localhost:8080/wpm/downloadDocument.do?attachId=29156&tenantName=default",
"internal": false,
"name": "a1-public-jsmith.txt",
"system_id": "29156",
"uploader": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
},
{
"company": {
"name": "Other Company Inc.",

120 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"system_id": "other_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/other_company_inc"
},
"download_link": "http://localhost:8080/wpm/downloadDocument.do?attachId=29151&tenantName=default",
"internal": true,
"name": "a4-internal-jane.txt",
"system_id": "29151",
"uploader": {
"first_name": "Jane",
"last_name": "Smith",
"login_name": "jane",
"system_id": "jane",
"uri": "http://localhost:8080/wpm/api/users/jane",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
}
]

36. GET /cases/{system_id}/attachments/{attachment_system_id}

HTTP Method GET


Path /cases/{system_id}/attachments/{attachment_system_id}
Description Returns (downloads) attached file with specified attachment system id
from case with specified system id.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/octet-stream
Expected request body N/A
Response - Output
Return MIME Type application/octet-stream
HTTP Status Code 200 OK Case found.
400 Bad Request Case does not contain specified attachment.
403 Forbidden Attachment is not visible for requester.
404 Not Found Case or Attachment not found.
Body List of AttachmentBean objects - success.
ErrorBean - failure.

JSON example:

a) Jonh is performing REST call and he want to download attachment a1-public-jsmith.txt with
system_id 29151.

GET cases/Task-sp-1/attachments/29151

121 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Response body:

This is a public attachment uploaded by Jonh Smith from My Company Inc.

Response headers:

Content-Disposition: attachment; filename="a1-public-jsmith.txt"


Content-Type: application/octet-stream

b) Jonh is performing REST call and he want to download attachment a4-internal-jane.txt with
system_id 29155.

GET /cases/Task-sp-1/attachments/29155

Response body:
{
"error_code": "PERMISSION_DENIED",
"error_messages": [
"You do not have permission to download this attachment."
]
}

c) Jane is performing REST call and she wants to download attachment a1-public-jane.txt with
system_id 29158.

GET cases/Task-sp-1/attachments/29158

Response body:

This is a public attachment uploaded by Jane Smith from Other Company Inc.

Response headers:
Content-Disposition: attachment; filename="a2-public-jane.txt"
Content-Type: application/octet-stream

d) Jane is performing REST call and she wants to download attachment a3-internal-jsmith.txt
with system_id 29157.

GET /cases/Task-sp-1/attachments/29157

122 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Response body:
{
"error_code": "PERMISSION_DENIED",
"error_messages": [
"You do not have permission to download this attachment."
]
}

37. POST /cases/{system_id}/attachments

HTTP Method POST


Path /cases/{system_id}/attachments
Description Uploads attachment to specified case.

Request must have the following header:


Content-Type: multipart/form-data; boundary=
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body 1. Attachment visibility (true/false) sent as form field with name
internal.
2. File with size lesoctets than 20MB uploaded as form field with
name uploaded_file.
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 OK File successfully uploaded.
400 Bad Request File not sent; file larger than 20MB
404 Not Found Case not found.
Body AttachmentBean - success.
ErrorBean - failure.

Example HTML form:


<html>
<head>
</head>
<body>
<form action="http://localhost:8080/wpm/api/cases/Task-sp-1/attachments"
enctype="multipart/form-data" method="post">
File: <input type="file" name="uploaded_file">
Visibility:
<input type="radio" value="false" name="internal">Public
<input type="radio" value="true" name="internal">Internal
<input type="submit" value="Attach File" />
</form>
</body>
</html>

123 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
a) Jonh Smith is uploading public attachment:

POST /cases/Task-sp-1/attachments

Response body:

{
"download_link": "http://localhost:8080/wpm/downloadDocument.do?attachId=29170&tenantName=default",
"internal": false,
"name": "public_attachment_123_jsmith.txt",
"system_id": "29170",
"uploader": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
}

b) John Smith is uploading internal attachment

POST /cases/Task-sp-1/attachments

Response body:

{
"company": {
"name": "My Company Inc.",
"system_id": "my_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/my_company_inc"
},
"download_link": "http://localhost:8080/wpm/downloadDocument.do?attachId=29171&tenantName=default",
"internal": true,
"name": "internal_attachment_123_jsmith.txt",
"system_id": "29171",
"uploader": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",

124 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
}

38. DELETE /cases/{system_id}/attachments/{attachment_system_id}

HTTP Method DELETE


Path /cases/{system_id}/attachments/{attachment_system_id}
Description Deletes the attachment with specified attachment system id from
specified case.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Attachment successfully deleted.
400 Bad Request Case does not contain specified attachment.
403 Forbidden Requester does not have permission to delete the
attachment.
404 Not Found Case or attachment not found.
Body ErrorBean - failure.

JSON example:

a) John wants to delete public attachment a2-public-jane.txt with system_id 29158.

DELETE /cases/Task-sp-1/attachments/29158

b) John wants to delete internal attachment a4-internal-jane.txt with system_id 29151.

DELETE /cases/Task-sp-1/attachments/29151

{
"error_code": "PERMISSION_DENIED",
"error_messages": [
"You do not have permission to delete this attachment."
]
}

125 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
39. GET /cases/{system_id}/comments

HTTP Method GET


Path /cases/{system_id}/comments
Description Returns a list of comments from specified case which user who is
performing a REST call has permission to see.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case found.
404 Not Found Case not found.
Body List of CommentBean objects - success.
ErrorBean - failure.

JSON example:

There are five comments in case Task-sp-2:

1. Public comment by John Smith comment: Public - John


visibility: public
author: John Smith
authors company: My Company Inc.
system_id: 158868
2. Internal comment by Jonh Smith. comment: Internal - John
visibility: internal
author: John Smith
authors company: My Company Inc.
system_id: 158869
3. Public comment by Jane Smith comment: Public - Jane
visibility: public
author: Jane Smith
authors company: Other Company Inc.
system_id: 158871
4. Internal comment by Jane Smith comment: Internal - Jane
visibility: internal
author: Jane Smith
authors company: Other Company Inc.
system_id: 158872
5. Public comment by John - Reply to Jane's comment: Public - John - Reply to Jane's public
public comment. comment.
visibility: public

126 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
author: John Smith
authors company: My Company Inc.
system_id: 158875
parent_system_id: 158871

John Smith can see comments: 1 (public), 2 (internal from his company) and 3 (public) and 5 (public).

Jane Smith can see comments: 1 (public), 3 (public) and 4 (internal from her company) and 5 (public).

a) John is performing REST call:

GET /cases/Task-sp-2/comments

Response body:

[
{
"author": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"comment": "Public - John - Reply to Jane's public comment.",
"created_on": "11/02/14 11:48:12",
"internal": false,
"parent_system_id": "158871",
"system_id": "158875",
"updated_on": "13/02/14 16:19:37",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
},
{
"author": {
"first_name": "Jane",
"last_name": "Smith",
"login_name": "jane",
"system_id": "jane",
"uri": "http://localhost:8080/wpm/api/users/jane",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"comment": "Public - Jane",
"created_on": "12/02/14 09:16:51",
"internal": false,

127 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"system_id": "158871"
},
{
"author": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"comment": "Internal - John",
"created_on": "11/02/14 12:26:03",
"company": {
"name": "My Company Inc.",
"system_id": "my_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/my_company_inc"
},
"internal": true,
"system_id": "158869"
},
{
"author": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"comment": "Public - John",
"created_on": "11/02/14 11:48:12",
"internal": false,
"system_id": "158868"
}
]

b) Jane is performing REST call:

GET /cases/Task-sp-1/comments

Response body:

[
{
"author": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"comment": "Public - John - Reply to Jane's public comment.",
"created_on": "11/02/14 11:48:12",
"internal": false,

128 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"parent_system_id": "158871",
"system_id": "158875",
"updated_on": "13/02/14 16:19:37",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
},
{
"author": {
"first_name": "Jane",
"last_name": "Smith",
"login_name": "jane",
"system_id": "jane",
"uri": "http://localhost:8080/wpm/api/users/jane",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"comment": "Internal - Jane",
"created_on": "11/02/14 12:31:14",
"company": {
"name": "Other Company Inc.",
"system_id": "other_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/other_company_inc"
},
"internal": true,
"system_id": "158872"
},
{
"author": {
"first_name": "Jane",
"last_name": "Smith",
"login_name": "jane",
"system_id": "jane",
"uri": "http://localhost:8080/wpm/api/users/jane",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"comment": "Public - Jane",
"created_on": "12/02/14 09:16:51",
"internal": false,
"system_id": "158871"
},
{
"author": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"comment": "Public - John",
"created_on": "11/02/14 11:48:12",
"internal": false,

129 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"system_id": "158868"
}
]

40. GET /cases/{system_id}/comments/{comment_system_id}

HTTP Method GET


Path /cases/{system_id}/comments/{comment_system_id}
Description Returns a comment with specified comment system id from specified
case.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case and comment found.
400 Bad Request Case does not contain requested comment.
403 Forbidden - User does not have permission to read specified
comment.
404 Not Found Case or comment not found.
Body CommentBean - success.
ErrorBean - failure.

JSON example:

a) Jonh is requesting his public comment.

GET /cases/Task-sp-1/comments/158868

Response body:

{
"author": { "first_name":
"John", "last_name":
"Smith", "login_name":
"jsmith", "system_id":
"jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"comment": "Public - John",
"created_on": "11/02/14 11:48:12",
"internal": false,
"system_id": "158868"
}

b) John is requesting Janes internal comment.

130 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
GET /cases/Task-sp-1/comments/158872

Reponse body:

{
"error_code": "PERMISSION_DENIED",
"error_messages": [
"You do not have permission to read this comment."
]
}

41. POST /cases/{system_id}/comments

HTTP Method POST


Path /cases/{system_id}/comments
Description 1. Creates a comment based on received CommentBean in case
with specified system id.
2. Creates a reply to comment with system id
parent_system_id if parent_system_id is sent via
CommentBean.

In both cases, if author_system_id is left out, user performing REST


API call will be set as comment author.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body CommentBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 OK Comment successfully added.
403 Forbidden User does not have permission to reply to specified
comment with system id parent_system_id.
404 Not Found Case not found.
Body CommentBean - success.
ErrorBean - failure.

JSON example:

a) Public comment by John Smith

POST /cases/Task-sp-2/comments

131 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Request body:

{
"comment": "Public - John",
"internal": "false",
"author_system_id": "jsmith"
}

Response body:

{
"author": { "first_name":
"John", "last_name":
"Smith", "login_name":
"jsmith", "system_id":
"jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"comment": "Public - John",
"created_on": "11/02/14 11:48:12",
"internal": false,
"system_id": "158868"
}

b) Internal comment by Jonh Smith. (John is performing REST API call and author_system_id is not
sent.)

POST /cases/Task-sp-2/comments

Request body:

{
"comment": "Internal - John",
"internal": "true"
}

Response body:

{
"author": { "first_name":
"John", "last_name":
"Smith", "login_name":
"jsmith", "system_id":
"jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"comment": "Internal - John",

132 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"created_on": "11/02/14 12:26:03",
"company": {
"name": "My Company Inc.",
"system_id": "my_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/my_company_inc"
},
"internal": true,
"system_id": "158869"
}

c) Public comment by Jane Smith

POST /cases/Task-sp-2/comments

Request body:
{
"comment": "Public - Jane",
"internal": "false"
}

Reponse body:

{
"author": {
"first_name": "Jane",
"last_name": "Smith",
"login_name": "jane",
"system_id": "jane",
"uri": "http://localhost:8080/wpm/api/users/jane",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"comment": "Public - Jane",
"created_on": "12/02/14 09:16:51",
"internal": false,
"system_id": "158871"
}

d) Internal comment by Jane Smith.

POST /cases/Task-sp-2/comments

Request body:
{
"comment": "Internal - Jane",
"internal": "true"
}

Reponse body:

133 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"author": {
"first_name": "Jane",
"last_name": "Smith",
"login_name": "jane",
"system_id": "jane",
"uri": "http://localhost:8080/wpm/api/users/jane",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"comment": "Internal - Jane",
"created_on": "11/02/14 12:31:14",
"company": {
"name": "Other Company Inc.",
"system_id": "other_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/other_company_inc"
},
"internal": true,
"system_id": "158872"
}

e) Jonh is replying to public comment by Jane with system_id 158871.

POST /cases/Task-sp-2/comments

Request body:

{
"comment": "Public - John - Reply to Jane's public comment.",
"internal": "false",
"parent_system_id": "158871"
}

Reponse body:
{
"author": { "first_name":
"John", "last_name":
"Smith", "login_name":
"jsmith", "system_id":
"jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"comment": "Public - John - Reply to Jane's public comment.",
"created_on": "11/02/14 11:48:12",
"internal": false,
"parent_system_id": "158871",
"system_id": "158875"
}

f) John is replying to internal comment by Jane with system_id 158872.

POST /cases/Task-sp-2/comments

134 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Request body:
{
"comment": "Internal - John - Reply to Jane's internal comment.",
"internal": "false",
"parent_system_id": "158872"
}

Response body:

{
"error_code": "PERMISSION_DENIED",
"error_messages": [
"You do not have permission to reply to this comment."
]
}

42. PUT /cases/{system_id}/comments/{comment_system_id}

HTTP Method PUT


Path /cases/{system_id}/comments/{comment_system_id}
Description Updates a comment based on received CommentBean in case with
specified system id.

Note: Comment visibility cannot be changed.


Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body CommentBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Comment successfully updated.
403 Forbidden User does not have permission to edit specified
comment.
400 Bad Request Case does not contain specified comment.
404 Not Found Case or Comment not found.
Body CommentBean - success.
ErrorBean - failure.

JSON example:

a) John wants to update his public comment with system id 158868.

PUT /cases/Task-sp-2/comments/158868

135 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Request body:
{
"comment": "Public - John - UPDATED"
}

Response body:

{
"author": { "first_name":
"John", "last_name":
"Smith", "login_name":
"jsmith", "system_id":
"jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"comment": "Public - John - UPDATED",
"created_on": "11/02/14 11:48:12",
"internal": false,
"system_id": "158868",
"updated_on": "13/02/14 16:19:37",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
}

b) John wants to update Janes internal comment with system id 158872.

PUT /cases/Task-sp-2/comments/158872

Request body:

{
"comment": "Internal - Jane - UPDATED"
}

Response body:

{
"error_code": "PERMISSION_DENIED",
"error_messages": [
"You do not have permission to update this comment."
]
}

136 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
43. DELETE /cases/{system_id}/comments/{comment_system_id}

HTTP Method DELETE


Path /cases/{system_id}/comments/{comment_system_id}
Description Deletes a comment with specified comment system id in case with
specified system id.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Comment successfully deleted.
400 Bad Request Case does not contain specified comment.
403 Forbidden Requester does not have permission to delete the
comment.
404 Not Found Case or comment not found.
Body ErrorBean - failure.

JSON example:

a) John wants to delete public his public comment with system_id 158868.

DELETE /cases/Task-sp-1/comments/158868

b) John wants to delete Janes internal comment with system_id 158872.

DELETE /cases/Task-sp-1/comments/158872

{
"error_code": "PERMISSION_DENIED",
"error_messages": [
"You do not have permission to delete this comment."
]
}

137 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
44. GET /cases/{system_id}/actions

HTTP Method GET


Path /cases/{system_id}/actions
Description Returns all actions which user who is performing REST call can execute
in specified case.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case found.
404 Not Found Case not found.
Body List of ActionBean objects - success.
ErrorBean - failure.

JSON example:

Jonh is performing a REST call requesting a list of actions he can execute.

GET /cases/Task-sp-2/actions

Response body:

[
{
"name": "Add Comment",
"system_id": "3680",
"type": "Add Comment"
},
{
"name": "Assign",
"system_id": "1886",
"type": "Assign"
},
{
"name": "Change Status to Awaiting Clarification",
"system_id": "922",
"type": "Assign"
},
{
"name": "Task Complete",
"system_id": "1299",
"type": "Assign"
},
{
"name": "Attach File",
"system_id": "388",
"type": "Attach File"
},
{

138 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"name": "Change Workflow",
"system_id": "1513",
"type": "Change Workflow"
},
{
"name": "Change Project",
"system_id": "1629",
"type": "Change Project"
},
{
"name": "Close",
"system_id": "390",
"type": "Close"
},
{
"name": "Delete Attachment",
"system_id": "4840", "type":
"Delete Attachment"
},
{
"name": "Delete Case",
"system_id": "1648",
"type": "Delete Case"
},
{
"name": "Delete Comment",
"system_id": "5089",
"type": "Delete Comment"
},
{
"name": "Edit Case",
"system_id": "1142",
"type": "Edit Case"
},
{
"name": "Print Document",
"system_id": "3827",
"type": "Print Document"
},
{
"name": "Send Message",
"system_id": "1414",
"type": "Send Message"
},
{
"name": "Share Case",
"system_id": "3621",
"type": "Share Case"
},
{
"name": "View Case",
"system_id": "1916",
"type": "View Case"
}
]

139 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
45. GET /cases/{system_id}/actions/{user_system_id}

HTTP Method GET


Path /cases/{system_id}/actions/{user_system_id}
Description Returns all actions which specified user can execute in specified case.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case found.
404 Not Found Case or user not found.
Body List of ActionBean objects - success.
ErrorBean - failure.

JSON example:

Jonh is performing a REST call requesting a list of actions Tom Smith can execute.

GET /cases/Task-sp-2/actions/tsmith

Response body:

[
{
"name": "Add Comment",
"system_id": "3680",
"type": "Add Comment"
},
{
"name": "Assign",
"system_id": "1886",
"type": "Assign"
},
{
"name": "Change Status to Awaiting Clarification",
"system_id": "922",
"type": "Assign"
},
{
"name": "Task Complete",
"system_id": "1299",
"type": "Assign"
},
{
"name": "Attach File",
"system_id": "388",
"type": "Attach File"
},
{
"name": "Delete Attachment",
"system_id": "4840",

140 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"type": "Delete Attachment"
},
{
"name": "Delete Comment",
"system_id": "5089",
"type": "Delete Comment"
},
{
"name": "Edit Case",
"system_id": "1142",
"type": "Edit Case"
},
{
"name": "Print Document",
"system_id": "3827",
"type": "Print Document"
},
{
"name": "Send Message",
"system_id": "1414",
"type": "Send Message"
},
{
"name": "Share Case",
"system_id": "3621",
"type": "Share Case"
},
{
"name": "View Case",
"system_id": "1916",
"type": "View Case"
}
]

141 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
46. PUT /cases/{system_id}/actions/{action_system_id}

HTTP Method PUT


Path /cases/{system_id}/actions/{action_system_id}
Description Executes specified action in specified case.
Case is updated based on received ActionParamsBean.

Supported actions:
1. Assign
2. Add Comment
3. Change Status
4. Close Case
5. Edit Case
6. Delete Case
7. Reopen Case
8. Copy Case
9. Change Case Type
10. Change Project
11. Approve
12. Reject
13. Scripting Action

(Attach file action has its own method.)


Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body ActionParamsBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Action successfully executed (except delete case action).
204 No Content Delete case action executed successfully.
400 Bad Request Required custom fields are not sent.
403 Forbidden User does not have permission to to execute action.
404 Not Found Case or Action not found; child entity with system_id
sent via ActionParamsBean does not exist.
Body CaseBean success (except delete).
empty When delete case action is exeuted successfully.
ErrorBean - failure.

142 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
JSON example:

Note: All REST API calls for executing actions will be made by John Smith (jsmith). Case updater after
executing actions will be Jonh Smith. Examples show what ActionParamsBean fields are used for each
action.

1) Assign

PUT /cases/Task-sp-2/actions/my_assign_action

Request body:

{
"comment": "Execute assign action via REST API",
"comment_is_internal": true,
"assignees": [
{
"system_id": "jsmith"
},
{
"system_id": "tsmith"
}
],
"custom_fields": [
{
"system_id": "effort_left",
"value": "2"
},
{
"system_id": "duration",
"value": "15"
}
]
}

Response body:

{
"account": {
"name": "Some Company Account",
"system_id": "some_company_account",
"uri": "http://localhost:8080/wpm/api/accounts/some_company_account"
},
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
{
"first_name": "John",
"last_name": "Smith",

143 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
],
"case_key": "Task-sp-2",
"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,
"contact": {
"email": "jsmith@someaddress.com",
"first_name": "John", "last_name":
"Smith", "middle_name":
"",
"system_id": "account77-jsmith@someaddress.com",
"uri": "http://localhost:8080/wpm/api/contacts/account77-jsmith@someaddress.com"
},
"created_on": "10/09/2013 14:36:44",
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"custom_fields": [
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "2",
"value_formatted": "2"
},
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "15",
"value_formatted": "15"
}
],
"description": "This case is created via RESTful web services.",
"name": "Task 2 - Created via REST",
"owner": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"priority": {
"name": "High",

144 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"system_id": "Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"referral": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"status": {
"name": "Described",
"system_id": "described"
},
"status_changed_on": "10/15/2013 15:35:19",
"system_id": "Task-sp-2",
"updated_on": "10/15/2013 15:59:53",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-2"
}

2) Add Comment

a) Public comment

PUT /cases/Task-sp-2/actions/my_add_comment

Request body:

{
"comment": "Execute add comment action via REST - public comment",
"comment_is_internal": false,
"custom_fields": [
{
"system_id": "effort_left",
"value": "1"
},
{
"system_id": "duration",
"value": "15"
}
]
}

145 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
b) Internal comment

PUT /cases/Task-sp-2/actions/my_add_comment

Request body:

{
"comment": "Execute add comment action via REST - internal comment",
"comment_is_internal": true,
"custom_fields": [
{
"system_id": "effort_left",
"value": "1"
},
{
"system_id": "duration",
"value": "15"
}
]
}

3) Change Status

Note: Case goes into actions end status.

PUT /cases/Task-sp-2/actions/change_status_to_awaiting_clarification

Request body:

{
"custom_fields": [
{
"system_id": "effort_left",
"value": "14"
},
{
"system_id": "duration",
"value": "15"
}
]
}

4) Close Case

Note: Case assignee it the first assignee from assignees list in receiverd ActionParamsBean.

PUT /cases/Task-sp-2/actions/my_close_case_action

146 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Request body:
{
"comment": "Execute close case action via REST - public comment",
"comment_is_internal": false,
"assignees": [
{
"system_id": "tsmith"
}
],
"custom_fields": [
{
"system_id": "effort_left",
"value": "0"
},
{
"system_id": "duration",
"value": "15"
}
]
}

5) Edit Case

PUT /cases/Task-sp-2/actions/my_edit_case

Request body:

{
"name": "Task 2 updated via Edit action",
"description": "Updating description via Edit action",
"priority_system_id": "Critical",
"account_system_id": "some_company_account",
"contact_system_id": "jsmith_someaddress_com",
"owner_system_id": "jsmith",
"referral_system_id": "tsmith",
"custom_fields": [
{
"system_id": "effort_left",
"value": "2"
},
{
"system_id": "duration",
"value": "15"
}
]
}

Response body:

{
"account": {
"name": "Some Company Account",
"system_id": "some_company_account",
"uri": "http://localhost:8080/wpm/api/accounts/some_company_account"
},
"assignees": [
{

147 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
{
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
],
"case_key": "Task-sp-2",
"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,
"contact": {
"email": "jsmith@someaddress.com",
"first_name": "John", "last_name":
"Smith", "middle_name":
"",
"system_id": "jsmith_someaddress_com",
"uri": "http://localhost:8080/wpm/api/contacts/jsmith_someaddress_com"
},
"created_on": "09/10/13 14:36:44",
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"custom_fields": [
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "2",
"value_formatted": "2"
},
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "15",
"value_formatted": "15"
}
],
"description": "Updating description via Edit action",
"name": "Task 2 updated via Edit action",

148 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"owner": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"priority": {
"name": "High",
"system_id": "Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"referral": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Task-sp-2",
"updated_on": "14/10/13 14:07:15",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-2"
}

149 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
6) Delete Case

Note: Request body must contain empty JSON.

PUT /cases/Task-sp-2/actions/my_delete_action

Request body:

{}

Response:

Response body: empty


Status: 204 No Content

7) Reopen Case

Note: Case assignee it the first assignee from assignees list in receiverd ActionParamsBean.

PUT /cases/Task-sp-2/actions/my_close_case_action

Request body:

{
"comment": "Execute reopen case action via REST - internal comment",
"comment_is_internal": true,
"assignees": [
{
"system_id": "tsmith"
}
],
"custom_fields": [
{
"system_id": "effort_left",
"value": "2"
},
{
"system_id": "duration",
"value": "15"
}
]
}

150 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
8) Copy Case

Note: Reponse contains new case (new copy). Custom Fields are updated in both cases (original and
copy).

PUT /cases/Task-sp-2/actions/my_copy_case

Request body:

{
"custom_fields": [
{
"system_id": "effort_left",
"value": "5"
},
{
"system_id": "duration",
"value": "15"
}
]
}

Response body:

{
"account": {
"name": "Some Company Account",
"system_id": "some_company_account",
"uri": "http://localhost:8080/wpm/api/accounts/some_company_account"
},
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
}
],
"case_key": "Task-sp-10",
"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,
"contact": {
"email": "jsmith@someaddress.com",
"first_name": "John", "last_name":
"Smith", "middle_name":
"",
"system_id": "account77-jsmith@someaddress.com",
"uri": "http://localhost:8080/wpm/api/contacts/account77-jsmith@someaddress.com"
},
"created_on": "15/10/13 14:27:54",
"creator": {

151 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"custom_fields": [
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "5",
"value_formatted": "5"
},
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "15",
"value_formatted": "15"
}
],
"description": "Updating description via Edit action",
"name": "Task 2 updated via Edit action",
"priority": {
"name": "High",
"system_id": "Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Task-sp-10",
"updated_on": "15/10/13 14:27:54",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-10"
}

152 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
9) Change Case Type

PUT /cases/Task-sp-10/actions/my_change_case_type_action

Request body:

{
"case_type_system_id": "Bug",
"custom_fields": [
{
"system_id": "effort_left",
"value": "10"
},
{
"system_id": "duration",
"value": "15"
}
]
}

Response body:

{
"account": {
"name": "Some Company Account",
"system_id": "some_company_account",
"uri": "http://localhost:8080/wpm/api/accounts/some_company_account"
},
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
}
],
"case_key": "Bug-sp-1",
"case_type": {
"name": "Bug",
"system_id": "bug",
"unique_key": "bug"
},
"closed": false,
"contact": {
"email": "jsmith@someaddress.com",
"first_name": "John", "last_name":
"Smith", "middle_name":
"",
"system_id": "account77-jsmith@someaddress.com",
"uri": "http://localhost:8080/wpm/api/contacts/account77-jsmith@someaddress.com"
},
"created_on": "15/10/13 14:27:54",
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",

153 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"custom_fields": [
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "10",
"value_formatted": "10"
},
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "15",
"value_formatted": "15"
}
],
"description": "Updating description via Edit action",
"name": "Task 2 updated via Edit action",
"priority": {
"name": "High",
"system_id": "Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Bug-sp-1",
"updated_on": "15/10/13 14:42:29",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Bug-sp-1"
}

154 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
10) Change Project

PUT /cases/Task-sp-9/actions/my_change_project_action

Request body:

{
"project_system_id": "ap",
"custom_fields": [
{
"system_id": "effort_left",
"value": "1"
},
{
"system_id": "duration",
"value": "15"
}
]
}

Response body:

{
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
{
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
],
"case_key": "Task-ap-1",
"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,
"created_on": "10/10/13 16:02:37",
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",

155 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"custom_fields": [
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "15",
"value_formatted": "15"
},
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "1",
"value_formatted": "1"
}
],
"description": "This case is created via REST API.",
"name": "REST API - Case 4",
"owner": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"priority": {
"name": "Medium",
"system_id": "Non-Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Another Project",
"system_id": "ap",
"uri": "http://localhost:8080/wpm/api/projects/ap"
},
"status": {
"name": "Described",
"system_id": "described"
},
"system_id": "Task-ap-1",
"updated_on": "15/10/13 15:06:14",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-ap-1"
}

156 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
11) Approve

Case Task-sp-2 is in status Awaiting Clarification. Approve action sends case to Task Complete
status.

PUT /cases/Task-sp-2/actions/my_approve_action

Request body:

{
"custom_fields": [
{
"system_id": "effort_left",
"value": "0"
},
{
"system_id": "duration",
"value": "15"
}
]
}

Response body:

{
"account": {
"name": "Some Company Account",
"system_id": "some_company_account",
"uri": "http://localhost:8080/wpm/api/accounts/some_company_account"
},
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
}
],
"case_key": "Task-sp-2",
"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,
"contact": {
"email": "jsmith@someaddress.com",
"first_name": "John", "last_name":
"Smith", "middle_name":
"",
"system_id": "account77-jsmith@someaddress.com",
"uri": "http://localhost:8080/wpm/api/contacts/account77-jsmith@someaddress.com"
},
"created_on": "09/10/13 14:36:44",
"creator": {

157 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"custom_fields": [
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "0",
"value_formatted": "0"
},
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "15",
"value_formatted": "15"
}
],
"description": "Updating description via Edit action",
"name": "Task 2 updated via Edit action",
"owner": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"priority": {
"name": "High",
"system_id": "Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"referral": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"status": {
"name": "Task Complete",
"system_id": "task_complete"
},
"status_changed_on": "15/10/13 15:33:15",
"system_id": "Task-sp-2",

158 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"updated_on": "15/10/13 15:33:15",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-2"
}

12) Reject

Case Task-sp-2 is in status Awaiting Clarification. Reject action sends case to Described status.

PUT /cases/Task-sp-2/actions/my_reject_action

Request body:

{
"custom_fields": [
{
"system_id": "effort_left",
"value": "5"
},
{
"system_id": "duration",
"value": "15"
}
]
}

Response body:

{
"account": {
"name": "Some Company Account",
"system_id": "some_company_account",
"uri": "http://localhost:8080/wpm/api/accounts/some_company_account"
},
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
}
],
"case_key": "Task-sp-2",
"case_type": {
"name": "Task",
"system_id": "task",

159 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"unique_key": "task"
},
"closed": false,
"contact": {
"email": "jsmith@someaddress.com",
"first_name": "John", "last_name":
"Smith", "middle_name":
"",
"system_id": "account77-jsmith@someaddress.com",
"uri": "http://localhost:8080/wpm/api/contacts/account77-jsmith@someaddress.com"
},
"created_on": "09/10/13 14:36:44",
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"custom_fields": [
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "5",
"value_formatted": "5"
},
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "15",
"value_formatted": "15"
}
],
"description": "Updating description via Edit action",
"name": "Task 2 updated via Edit action",
"owner": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"priority": {
"name": "High",
"system_id": "Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"referral": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",

160 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"status": {
"name": "Described",
"system_id": "described"
},
"status_changed_on": "15/10/13 15:35:19",
"system_id": "Task-sp-2",
"updated_on": "15/10/13 15:35:19",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-2"
}

13) Scripting Action

Scripting action with system id my_scripting_action has workflow script attached to itself. The sctipt is
written in Groovy and changes case name to specific text.

Script code:

currentCase.setName("new name set by executing scripting action via REST");

PUT /cases/Task-sp-2/actions/my_scripting_action

Request body

{
"custom_fields": [
{
"system_id": "effort_left",
"value": "4"
},
{
"system_id": "duration",
"value": "15"
}
]
}

161 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Response body:

{
"account": {
"name": "Some Company Account",
"system_id": "some_company_account",
"uri": "http://localhost:8080/wpm/api/accounts/some_company_account"
},
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
}
],
"case_key": "Task-sp-2",
"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,
"contact": {
"email": "jsmith@someaddress.com",
"first_name": "John", "last_name":
"Smith", "middle_name":
"",
"system_id": "account77-jsmith@someaddress.com",
"uri": "http://localhost:8080/wpm/api/contacts/account77-jsmith@someaddress.com"
},
"created_on": "09/10/13 14:36:44",
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"custom_fields": [
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "4",
"value_formatted": "4"
},
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "15",
"value_formatted": "15"
}

162 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
],
"description": "Updating description via Edit action",
"name": "new name set by executing scripting action via REST",
"owner": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"priority": {
"name": "High",
"system_id": "Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"referral": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"status": {
"name": "Described",
"system_id": "described"
},
"status_changed_on": "15/10/13 15:35:19",
"system_id": "Task-sp-2",
"updated_on": "15/10/13 15:42:06",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-2"
}

163 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
47. PUT /cases/{system_id}/actions/{action_system_id}/{user_system_id}

HTTP Method PUT


Path /cases/{system_id}/actions/{action_system_id}/{user_system_id}
Description Executes specified action in specified case as specified user. (Attach
file action has its own method.)
Case is updated based on received ActionParamsBean.

Supported actions:
1. Assign
2. Add Comment
3. Change Status
4. Close Case
5. Edit Case
6. Delete Case
7. Reopen Case
8. Copy Case
9. Change Case Type
10. Change Project
11. Approve
12. Reject
13. Scripting Action

(Attach file action has its own method.)


Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body ActionParamsBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Action successfully executed (except delete case action).
204 No Content Delete case action executed successfully.
400 Bad Request Required custom fields are not sent.
403 Forbidden User does not have permission to to execute action.
404 Not Found Case, Action or User not found; child entity with
system_id sent via ActionParamsBean does not exist.
Body CaseBean success (except delete).
empty When delete case action is exeuted successfully.
ErrorBean - failure.

164 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
JSON example:

Note: All REST API calls for executing actions will be made by John Smith (jsmith). Case updater after
executing actions will be user with system_id user_system_id.

Assign Action example:

PUT /cases/Task-sp-2/actions/my_assign_action/tsmith

Request body:

{
"comment": "Execute assign action via REST API",
"comment_is_internal": true,
"assignees": [
{
"system_id": "jsmith"
},
{
"system_id": "tsmith"
}
],
"custom_fields": [
{
"system_id": "effort_left",
"value": "6"
},
{
"system_id": "duration",
"value": "15"
}
]
}

Response body:

{
"account": {
"name": "Some Company Account",
"system_id": "some_company_account",
"uri": "http://localhost:8080/wpm/api/accounts/some_company_account"
},
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
{
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",

165 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
],
"case_key": "Task-sp-2",
"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,
"contact": {
"email": "jsmith@someaddress.com",
"first_name": "John", "last_name":
"Smith", "middle_name":
"",
"system_id": "account77-jsmith@someaddress.com",
"uri": "http://localhost:8080/wpm/api/contacts/account77-jsmith@someaddress.com"
},
"created_on": "10/09/2013 14:36:44",
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"custom_fields": [
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "6",
"value_formatted": "6"
},
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "15",
"value_formatted": "15"
}
],
"description": "This case is created via REST API.",
"name": "Task 2 created via REST API",
"owner": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"priority": {
"name": "High",
"system_id": "Critical"
},

166 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"referral": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"status": {
"name": "Described",
"system_id": "described"
},
"status_changed_on": "10/15/2013 15:35:19",
"system_id": "Task-sp-2",
"updated_on": "10/15/2013 16:32:34",
"updater": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-2"
}

167 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
48. POST /cases/{system_id}/actions/{action_system_id}

HTTP Method POST


Path /cases/{system_id}/actions/{action_system_id}
Description Executes specified Attach File action in specified case.

Request must have the following header:


Content-Type: multipart/form-data; boundary=
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body 1. File with size less than 20MB uploaded as form field with
name uploaded_file.
2. Attachment visibility sent as form field with name internal.
Values true/false.
3. Comment sent as form field with name comment.
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Action successfully executed.
403 Forbidden User does not have permission to to execute action.
400 Bad Request File not sent; file larger than 20MB;
404 Not Found Case or Action not found.
Body CaseBean success.
ErrorBean - failure.

Example HTML form:

<html>
<head>
</head>
<body>
<form action="http://localhost:8080/wpm/api/cases/Task-sp-2/actions/my_attach_file_action"
enctype="multipart/form-data" method="post">
Visibility:
<input type="radio" value="false" name="internal">Public
<input type="radio" value="true" name="internal">Internal
<br />
Comment: <input type="text" name="comment">
<br />
<INPUT type="submit" value="Upload"> <INPUT type="reset">
</form>
</body>
</html>

168 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Request example:

John Smith is uploading attachment using Attach File Action.

PUT /cases/Task-sp-2/actions/my_assign_action

Response body:

{
"account": {
"name": "Some Company Account",
"system_id": "some_company_account",
"uri": "http://localhost:8080/wpm/api/accounts/some_company_account"
},
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
{
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
],
"case_key": "Task-sp-2",
"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,
"contact": {
"email": "jsmith@someaddress.com",
"first_name": "John", "last_name":
"Smith", "middle_name":
"",
"system_id": "account77-jsmith@someaddress.com",
"uri": "http://localhost:8080/wpm/api/contacts/account77-jsmith@someaddress.com"
},
"created_on": "10/09/2013 14:36:44",

169 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"custom_fields": [
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "6",
"value_formatted": "6"
},
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "15",
"value_formatted": "15"
}
],
"description": "Updating description via Edit action",
"name": "new name set by executing scripting action via REST",
"owner": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"priority": {
"name": "High",
"system_id": "Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"referral": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"status": {
"name": "Described",
"system_id": "described"
},
"status_changed_on": "10/15/2013 15:35:19",

170 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"system_id": "Task-sp-2",
"updated_on": "10/16/2013 11:40:46",
"updater": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-2"
}

49. POST /cases/{system_id}/actions/{action_system_id}/{user_system_id}

HTTP Method POST


Path /cases/{system_id}/actions/{action_system_id}/{user_system_id}
Description Executes specified Attach File action in specified case as specified
user.

Request must have the following header:


Content-Type: multipart/form-data; boundary=
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body 1. File with size less than 20MB uploaded as form field with
name uploaded_file.
2. Attachment visibility sent as form field with name internal.
Values true/false.
3. Comment sent as form field with name comment.
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Action successfully executed.
403 Forbidden User does not have permission to to execute action.
400 Bad Request File not sent; file larger than 20MB;
404 Not Found Case, Action or user not found.
Body CaseBean success.
ErrorBean - failure.

Example HTML form:

<html>
<head>
</head>
<body>
<form action="http://localhost:8080/wpm/api/cases/Task-sp-2/actions/my_attach_file_action/tsmith"
enctype="multipart/form-data" method="post">
Visibility:
<input type="radio" value="false" name="internal">Public
<input type="radio" value="true" name="internal">Internal

171 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
<br />
Comment: <input type="text" name="comment">
<br />
<INPUT type="submit" value="Upload"> <INPUT type="reset">
</form>
</body>
</html>

Request example:

John Smith is executing REST API call and uploading attachment using Attach File Action. Tom Smith is
supposed to be set as action executor.

PUT /cases/Task-sp-2/actions/my_assign_action/tsmith

Response body:

{
"account": {
"name": "Some Company Account",
"system_id": "some_company_account",
"uri": "http://localhost:8080/wpm/api/accounts/some_company_account"
},
"assignees": [
{
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
{
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
}
],
"case_key": "Task-sp-2",
"case_type": {
"name": "Task",
"system_id": "task",
"unique_key": "task"
},
"closed": false,

172 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"contact": {
"email": "jsmith@someaddress.com",
"first_name": "John", "last_name":
"Smith", "middle_name":
"",
"system_id": "account77-jsmith@someaddress.com",
"uri": "http://localhost:8080/wpm/api/contacts/account77-jsmith@someaddress.com"
},
"created_on": "10/09/2013 14:36:44",
"creator": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"custom_fields": [
{
"name": "Effort Left",
"system_id": "effort_left",
"type_name": "Number",
"type_system_id": 2,
"value": "6",
"value_formatted": "6"
},
{
"name": "Duration",
"system_id": "duration",
"type_name": "Number",
"type_system_id": 2,
"value": "15",
"value_formatted": "15"
}
],
"description": "Updating description via Edit action",
"name": "new name set by executing scripting action via REST",
"owner": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Partner",
"system_id": "partner"
}
},
"priority": {
"name": "High",
"system_id": "Critical"
},
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"referral": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {

173 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"status": {
"name": "Described",
"system_id": "described"
},
"status_changed_on": "10/15/2013 15:35:19",
"system_id": "Task-sp-2",
"updated_on": "10/16/2013 11:40:46",
"updater": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"uri": "http://localhost:8080/wpm/api/cases/Task-sp-2"
}

174 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
3. Case Type
Resource: Case Types Main path: /case_types

1. GET /case_types/{system_id}

HTTP Method GET


Path /case_types/{system_id}
Description Returns the case type with specified system id.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case Type found.
404 Not Found Case Type not found.
Body CaseTypeBean - success.
ErrorBean - failure.

JSON example:

a) GET /case_types/task

Response body:

{
"name": "Task",
"system_id": "task",
"unique_key": "task"
}

175 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
2. GET /case_types

HTTP Method GET


Path /case_types
Description Search case types based on set query parameters. Returns a list of
case types which satisfy search criteria.

Available search attributes:


page (Number)
page_size (Number)
name (String)
system_id (String)
mask (String)

These search attributes are set as query parameters:


/case_types?name=task&page=1&page_size=5
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK
Body ResultBean with list of CaseTypeBeans.

JSON example:

Response body:

GET /case_types?name=task&page=1&page_size=5

{
"case_types": [
{
"name": "Task",
"system_id": "task",
"unique_key": "task"
}
],
"completed_in": 35,
"page": 1,
"page_size": 10,
"total": 1
}

176 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
3. GET /case_types/{system_id}/statuses

HTTP Method GET


Path /case_types/{system_id}/statuses
Description Returns statuses associated with specified case type.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case Type found.
404 Not Found Case Type not found.
Body List of StatusBeans - success.
ErrorBean - failure.

JSON example:

GET /case_types/task/statuses

Response body:

[
{
"name": "Described",
"system_id": "described"
},
{
"name": "In Preparation",
"system_id": "in_preparation"
},
{
"name": "Awaiting Clarification",
"system_id": "awaiting_clarification"
},
{
"name": "Task Complete",
"system_id": "task_complete"
},
{
"name": "Closed",
"system_id": "closed"
}
]

177 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
4. GET /case_types/{system_id}/statuses/{status_system_id}/actions

HTTP Method GET


Path /case_types/{system_id}/statuses/{status_system_id}/actions
Description Returns actions in specified status for specified case type.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Case Type found.
404 Not Found Case Type or Status not found.
Body List of ActionBeans - success.
ErrorBean - failure.

JSON example:

GET /case_types/task/statuses/awaiting_clarification/action

Response body:

[
{
"end_status": {
"name": "Awaiting Clarification",
"system_id": "awaiting_clarification"
},
"name": "Add Comment",
"start_status": {
"name": "Awaiting Clarification",
"system_id": "awaiting_clarification"
},
"system_id": "add_comment",
"type": "Add Comment"
},
{
"end_status": {
"name": "Task Complete",
"system_id": "task_complete"
},
"name": "Task Completed",
"start_status": {
"name": "Awaiting Clarification",
"system_id": "awaiting_clarification"
},
"system_id": "task_complete",
"type": "Assign"
}
]

178 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
4. Company
Resource: Company Main path: /companies

1. GET /companies/{system_id}

HTTP Method GET


Path /companies/{system_id}
Description Returns the company with specified system id.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Company found.
404 Not Found Company not found.
Body CompanyBean - success.
ErrorBean - failure.

JSON example:

a) GET /companies/my_company_inc

Response body:

{
"address_1": "Some Street 123",
"address_2": "",
"city": "San Francisco",
"country": "USA",
"name": "My Company Inc.",
"project": {
"description": "This is a project for grouping cases regarding sales.",
"is_default": false,
"name": "Sales project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"state": "California",
"system_id": "my_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/my_company_inc",
"zip": "12345"
}

179 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
b) GET /companies/some_non_existing_company
{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Company does not exist."
]
}

2. POST /companies

HTTP Method POST


Path /companies
Description Creates a company based on received CompanyBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body CompanyBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created Company successfully created.
400 Bad Request Required fields are missing or other constraint
error.
Body CompanyBean - success.
ErrorBean - failure.

JSON example:

a) POST /companies

Request body:

{
"address_1": "Some Street 123",
"address_2": "",
"city": "San Francisco",
"country": "USA",
"name": "My Company Inc.",
"project_system_id": "sp",
"state": "California",
"system_id": "my_company_inc",
"zip": "12345"
}

180 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
b) If company name which is required is not sent:

{
"error_code": "CONSTRAINT_VIOLATIONS",
"error_messages": [
"Company name is required."
]
}

3. PUT /companies

HTTP Method PUT


Path /companies
Description Updates the company based on received CompanyBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body CompanyBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Company successfully updated.
400 Bad Request Required fields are missing or other constraint
error.
404 Not Found Company not found.
Body CompanyBean - success.
ErrorBean - failure.

JSON example:

Note: CompanyBeans system_id field must be set.

PUT /companies

Request body:

{
"address_1": "Some Street 456",
"address_2": "Oak Street 789",
"city": "San Francisco",
"country": "USA",
"name": "My Company Inc.",
"project_system_id": "sp",
"state": "California",
"system_id": "my_company_inc",
"zip": "12345"
}

181 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Response body:
{
"address_1": "Some Street 456",
"address_2": "Oak Street 789",
"city": "San Francisco",
"country": "USA",
"name": "My Company Inc.",
"project": {
"description": "",
"is_default": false,
"name": "Sales Project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"state": "California",
"system_id": "my_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/my_company_inc",
"zip": "12345"
}

4. DELETE /companies/{system_id}

HTTP Method DELETE


Path /companies/{system_id}
Description Deletes the company with specified system id.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Company successfully deleted.
304 Not Modified If company could not be deleted.
404 Not Found Company not found.
Body ErrorBean - failure.

Request example: DELETE /companies/my_company_inc

182 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
5. GET /companies

HTTP Method GET


Path /companies
Description Search companies based on set query parameters. Returns a list of
companies which satisfy search criteria.

Available search attributes:


page (Number)
page_size (Number)
name (String)
system_id (String)
mask (String)

These search attributes are set as query parameters:


/companies?name=inc&page=1&page_size=5
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK
Body ResultBean with list of CompanyBeans.

JSON example:

GET /companies?name=inc&page=1&page_size=5

{
"companies": [
{
"address_1": "Some Street 123",
"address_2": "",
"city": "San Francisco",
"country": "USA",
"name": "My Company Inc.",
"project": {
"description": "This is a project for grouping cases regarding sales.",
"is_default": false,
"name": "Sales project",
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
},
"state": "California",
"system_id": "my_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/my_company_inc",
"zip": "12345"
},
{

183 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"address_1": "Fake Street 567",
"address_2": "",
"city": "New York",
"country": "USA",
"name": "Other company Inc.",
"state": "New York",
"system_id": "other_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/other_company_inc",
"zip": "45678"
},

],
"completed_in": 68,
"page": 1,
"page_size": 5,
"total": 1
}

184 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
5. Contact
Resource: Contact Main path: /contacts

1. GET /contacts/{system_id}

HTTP Method GET


Path /contacts/{system_id}
Description Returns the contact with specified system id.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Contact found.
404 Not Found Contact not found.
Body ContactBean - success.
ErrorBean - failure.

JSON example:

a) GET /contacts/jsmith_someaddress_com

Response body:

{
"account": {
"name": "Account B",
"system_id": "account_b",
"uri": "http://localhost:8080/wpm/api/accounts/account_b"
},
"active": true,
"address": {
"address2": "Second Street 456",
"address3": "Third Street 789",
"city": "San Francisco",
"country": {
"name": "USA",
"system_id": "usa"
},
"state": {
"name": "California",
"system_id": "CA"
},
"street": "First Street 123",
"zip": "12345"
},
"cell_phone": "555-555-456",
"custom_fields": [
{
"name": "Contact Role",

185 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"system_id": "contact_role",
"type_name": "Checkbox",
"type_system_id": 8,
"value": "Consultant",
"value_formatted": "Consultant"
}
],
"department": "",
"email": "jsmith@someaddress.com",
"fax": "555-555-741",
"first_name": "John",
"home_phone": "555-555-789",
"id": 1894,
"job_title": "Developer",
"last_name": "Smith",
"middle_name": "",
"name": "John Smith",
"phone": "555-555-123",
"system_id": "jsmith_someaddress_com",
"uri": "http://localhost:8080/wpm/api/contacts/jsmith_someaddress_com"
}

b) GET /contacts/some_non_existing_contact

{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Contact does not exist."
]
}

2. POST /contacts

HTTP Method POST


Path /contacts
Description Creates a contact based on received ContactBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body ContactBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created Contact successfully created.
400 Bad Request Required fields are missing or other constraint
error.
Body ContactBean - success.
ErrorBean - failure.

186 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
JSON example:

a) POST /contacts

Request body:

{
"account_system_id": "account_b",
"active": true,
"cell_phone": "555-555-111",
"custom_fields": [
{
"systemId": "contact_role",
"value": "consultant"
}
],
"department": "",
"email": "jsmith@someaddress.com",
"first_name": "John",
"home_phone": "555-555-987",
"job_title": "Developer",
"last_name": "Smith",
"system_id": "jsmith@someaddress.com",
"phone": "866.612.7312"
}

Reponse body:

{
"account": {
"name": "Account B",
"system_id": "account_b",
"uri": "http://localhost:8080/wpm/api/accounts/account_b"
},
"active": true,
"cell_phone": "555-555-111",
"department": "",
"email": "jsmith@someaddress.com",
"first_name": "John",
"home_phone": "555-555-987",
"job_title": "Developer",
"last_name": "Smith",
"name": "John Smith",
"phone": "866.612.7312",
"system_id": "jsmith_someaddress_com",
"uri": "http://localhost:8080/wpm/api/contacts/jsmith_someaddress_com"
}

b) If contact name which is required is not sent:


{
"error_code": "CONSTRAINT_VIOLATIONS",
"error_messages": [
"Contact name is required."
]
}

187 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
3. PUT /contacts

HTTP Method PUT


Path /contacts
Description Updates the contact based on received ContactBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body ContactBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Contact successfully updated.
400 Bad Request Required fields are missing or other constraint
error.
404 Not Found Contact not found.
Body ContactBean - success.
ErrorBean - failure.

JSON example:

Note: ContactBeans system_id field must be set.

PUT /contacts

Request body:

{
"account_system_id": "account_b",
"active": true,
"cell_phone": "555-555-222",
"custom_fields": [
{
"systemId": "contact_role",
"value": "consultant"
}
],
"department": "",
"email": "jsmith@someaddress.com",
"first_name": "John",
"home_phone": "555-555-999",
"job_title": "Developer",
"last_name": "Smith",
"system_id": "jsmith_someaddress_com",
"phone": "555-555-111"
}

188 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Response body:
{
"account": {
"name": "Account B",
"system_id": "account_b",
"uri": "http://localhost:8080/wpm/api/accounts/account_b"
},
"active": true,
"cell_phone": "555-555-222",
"department": "",
"email": "jsmith@someaddress.com",
"first_name": "John",
"home_phone": "555-555-999",
"job_title": "Developer",
"last_name": "Smith",
"name": "John Smith",
"phone": "555-555-111",
"system_id": "jsmith_someaddress_com",
"uri": "http://localhost:8080/wpm/api/contacts/jsmith_someaddress_com"
}

4. DELETE /contacts/{system_id}

HTTP Method DELETE


Path /contacts/{system_id}
Description Deletes the contact with specified system id.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Contact successfully deleted.
304 Not Modified If contact could not be deleted.
404 Not Found Contact not found.
Body ErrorBean - failure.

Request example: DELETE /contacts/jsmith_someaddress_com

189 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
5. GET /contacts

HTTP Method GET


Path /contacts
Description Search contacts based on set query parameters. Returns a list of
contacts which satisfy search criteria.

Available search attributes:


page (Number)
page_size (Number)
system_id (String)
name (String)
first_name (String)
last_name (String)
email (String)
account (String) (accounts name)
mask (String)

These search attributes are set as query parameters:


/contacts?first_name=john&page=1&page_size=5
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK
Body ResultBean with a list of ContactBeans.

JSON example:

GET /contacts?first_name=john&last_name=smith&account=account b&page=1&page_size=5

Response body:

{
"completed_in": 134,
"contacts": [
{
"account": {
"name": "Account B",
"system_id": "account_b",
"uri": "http://localhost:8080/wpm/api/accounts/account_b"
},
"active": true,
"address": {
"address2": "Second Street 456",
"address3": "Third Street 789",

190 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"city": "San Francisco",
"country": {
"name": "USA",
"system_id": "usa"
},
"state": {
"name": "California",
"system_id": "CA"
},
"street": "First Street 123",
"zip": "12345"
},
"cell_phone": "555-555-456",
"custom_fields": [
{
"name": "Cell Phone",
"system_id": "cell_phone",
"type_name": "Text",
"type_system_id": 1,
"value": "555-555-789",
"value_formatted": "555-555-789"
}
],
"department": "",
"email": "jsmith@someaddress.com",
"fax": "555-555-741",
"first_name": "John",
"home_phone": "555-555-789",
"job_title": "Developer",
"last_name": "Smith",
"middle_name": "",
"name": "John Smith",
"phone": "555-555-123",
"system_id": "jsmith_someaddress_com",
"uri": "http://localhost:8080/wpm/api/contacts/jsmith_someaddress_com"
}
],
"page": 1,
"page_size": 5,
"total": 1
}

Note: To find more about reading and setting Custom Field values, read Section 7 and Section 8 in
Chapter 3.

6. GET /contacts/{system_id}/custom_fields/{custom_field_system_id}

HTTP Method GET


Path /contacts/{system_id}/custom_fields/{custom_field_system_id}
Description Returns specified custom field with its value which is set for specified
contact.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A

191 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Custom Field found.
404 Not Found Contact or Custom Field not found.
Body CustomFieldBean - success.
ErrorBean - failure.

JSON example:

GET /contacts/jsmith_someaddress_com/custom_fields/contact_role

Response body:

{
"name": "Contact Role",
"system_id": "contact_role",
"type_name": "Checkbox",
"type_system_id": 8,
"value": "Consultant",
"value_formatted": "Consultant"
}

7. POST /contacts/{system_id}/custom_fields

HTTP Method POST


Path /contacts/{system_id}/custom_fields
Description Sets custom field value to specified contact based on received
CustomFieldBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body CustomFieldBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created CustomField value set successfully.
400 Bad Request Custom Field value is not in the right format.
404 Not Found Contact or Custom Field not found
Body ContactBean - success.
ErrorBean - failure.

JSON example:

POST /contacts/jsmith_someaddress_com/custom_fields

192 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Request body:

{
"system_id": "contact_role",
"value": "consultant"
}

8. PUT /contacts/{system_id}/custom_fields

HTTP Method PUT


Path /contacts/{system_id}/custom_fields
Description Updates custom field value in specified contact based on received
CustomFieldBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body CustomFieldBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 200 OK CustomField value set successfully.
400 Bad Request Custom Field value is not in the right format.
404 Not Found Contact or Custom Field not found
Body ContactBean - success.
ErrorBean - failure.

JSON example:

PUT /contact/jsmith_someaddress_com/custom_fields

Request body:

{
"system_id": "contact_role",
"value": "business_analyst"
}

193 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
9. DELETE /contacts/{system_id}/custom_fields/{custom_field_system_id}

HTTP Method DELETE


Path /contacts/{system_id}/custom_fields/{custom_field_system_id}
Description Deletes the value of specified custom field for specified contact.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Custom field value successfully deleted.
404 Not Found Contact or Custom Field not found.
Body ErrorBean - failure.

Request example:

DELETE /contacts/jsmith_someaddress_com/custom_fields/contact_role

194 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
6. Custom Field
Resource: Custom Field Main path: /custom_fields

1. GET /custom_fields/{system_id}

HTTP Method GET


Path /custom_fields/{system_id}
Description Returns the custom field with specified system id.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Custom Field found.
404 Not Found Custom Field not found.
Body CustomFieldBean - success.
ErrorBean - failure.

JSON example:

a) GET /custom_fields/product_category

Response body:

{
"label": "Product Category",
"name": "Product Category",
"predefined_values": [
{
"disabled": false,
"label": "First Category",
"position": 0,
"preselected": false,
"system_id": "first"
},
{
"disabled": false,
"label": "Second Category",
"position": 1,
"preselected": false,
"system_id": "second"
},
{
"disabled": false,
"label": "Third Category",
"position": 2,
"preselected": false,
"system_id": "third"
}
],

195 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"system_id": "product_category",
"type_name": "Checkbox",
"type_system_id": 8,
"uri": "http://localhost:8080/wpm/api/custom_fields/product_category"
}

b) GET /custom_fields/some_non_existing_custom_field

{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Custom field does not exist."
]
}

2. POST /custom_fields

HTTP Method POST


Path /custom_fields
Description Creates a custom field based on received CustomFieldBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body CustomFieldBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created Custom Field successfully created.
400 Bad Request Required fields are missing or other constraint
error.
Body CustomFieldBean - success.
ErrorBean - failure.

JSON example:

a) POST /custom_fields

Request body:

{
"label": "Product Category",
"name": "Product Category",
"system_id": "product_category",
"type_system_id": 8,
"predefined_values": [
{
"disabled": false,
"label": "First Category",
"position": 0,
"preselected": false,
"system_id": "first"
},

196 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
{
"disabled": false,
"label": "Second Category",
"position": 1,
"preselected": false,
"system_id": "second"
},
{
"disabled": false,
"label": "Third Category",
"position": 2,
"preselected": false,
"system_id": "third"
}
]
}

Response body:

{
"label": "Product Category",
"name": "Product Category",
"predefined_values": [
{
"disabled": false,
"label": "First Category",
"position": 0,
"preselected": false,
"system_id": "first"
},
{
"disabled": false,
"label": "Second Category",
"position": 1,
"preselected": false,
"system_id": "second"
},
{
"disabled": false,
"label": "Third Category",
"position": 2,
"preselected": false,
"system_id": "third"
}
],
"system_id": "product_category",
"type_name": "Checkbox",
"type_system_id": 8,
"uri": "http://localhost:8080/wpm/api/custom_fields/product_category"
}

b) If custom fields fields which are required are not sent:

{
"error_code": "CONSTRAINT_VIOLATIONS",
"error_messages": [
"CustomField label is required.",
"CustomField field type is required.",
"CustomField system id is required.",
"CustomField name is required."
]
}

197 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
3. PUT /custom_fields

HTTP Method PUT


Path /custom_fields
Description Updates the custom field based on received CustomFieldBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body CustomFieldBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Custom Field successfully updated.
400 Bad Request Required fields are missing or other constraint
error.
404 Not Found Custom Field not found.
Body CustomFieldBean - success.
ErrorBean - failure.

JSON example: CustomFieldBeans system_id field must be set. Predefined values system_id must be
set.

PUT /custom_fields

Request body:

{
"label": "Product Category",
"name": "Product Category",
"system_id": "product_category",
"predefined_values": [
{
"disabled": false,
"label": "First Category",
"position": 0,
"preselected": true,
"system_id": "first"
},
{
"disabled": true,
"label": "Second Category",
"position": 1,
"preselected": false,
"system_id": "second"
},
{
"disabled": false,
"label": "Third Category",
"position": 2,
"preselected": false,
"system_id": "third"
}
]

198 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
}

Response body:

{
"label": "Product Category",
"name": "Product Category",
"predefined_values": [
{
"disabled": false,
"label": "First Category",
"position": 0,
"preselected": true,
"system_id": "first"
},
{
"disabled": true,
"label": "Second Category",
"position": 1,
"preselected": false,
"system_id": "second"
},
{
"disabled": false,
"label": "Third Category",
"position": 2,
"preselected": false,
"system_id": "third"
}
],
"system_id": "product_category",
"type_name": "Checkbox",
"type_system_id": 8,
"uri": "http://localhost:8080/wpm/api/custom_fields/product_category"
}

4. DELETE /custom_fields/{system_id}

HTTP Method DELETE


Path /custom_fields/{system_id}
Description Deletes the custom field with specified system id.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Custom Field successfully deleted.
304 Not Modified If Custom Field could not be deleted.
404 Not Found Custom Field not found.
Body ErrorBean - failure.

Request example: DELETE /custom_fields/product_category

199 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
5. GET /custom_fields

HTTP Method GET


Path /custom_fields
Description Search custom fields based on set query parameters. Returns a list of
custom fields which satisfy search criteria.

Available search attributes:


page (Number)
page_size (Number)
system_id (String)
name (String)
mask (String)

These search attributes are set as query parameters:


/custom_fields?name=product&page=1&page_size=5
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK
Body ResultBean with a list of CustomFieldBeans.

JSON example:

GET /custom_fields?name=product&page=1&page_size=5

Response body:

{
"completed_in": 20,
"custom_fields": [
{
"label": "Product Category",
"name": "Product Category",
"predefined_values": [
{
"disabled": false,
"label": "First Category",
"position": 0,
"preselected": false,
"system_id": "first"
},
{
"disabled": false,
"label": "Second Category",
"position": 1,
"preselected": false,
"system_id": "second"

200 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
},
{
"disabled": false,
"label": "Third Category",
"position": 2,
"preselected": false,
"system_id": "third"
}
],
"system_id": "product_category",
"type_name": "Checkbox",
"type_system_id": 8,
"uri": "http://localhost:8080/wpm/api/custom_fields/product_category"
}
],
"page": 1,
"page_size": 5,
"total": 1
}

201 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
7. Custom Table
Resource: Custom Table Main path: /custom_tables

1. GET /custom_tables/{system_id}

HTTP Method GET


Path /custom_tables/{system_id}
Description Returns the custom table with specified system id.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Custom Table found.
404 Not Found Custom Table not found.
Body CustomTableBean- success.
ErrorBean - failure.

JSON example:

a) GET /custom_tables/territory

Response body:

{
"columns": [
"OID",
"NAME",
"NUMBER_OF_STORES"
],
"name": "Territory",
"system_id": "territory",
"uri": "http://localhost:8080/wpm/api/custom_tables/territory"
}

b) GET /custom_tables/some_non_existing_custom_table

{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Custom Table does not exist."
]
}

202 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
2. POST /custom_tables

HTTP Method POST


Path /custom_tables
Description Creates a custom table based on received CustomTableBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body CustomTableBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created Custom Table successfully created.
400 Bad Request Required fields are missing or other constraint
error.
Body CustomTableBean - success.
ErrorBean - failure.

JSON example:

a) POST /custom_tables

Request body:

{
"name": "Territory",
"system_id": "territory",
"columns": [
"name",
"number_of_stores"
]
}

Response body:
{
"columns": [
"OID",
"NAME",
"NUMBER_OF_STORES"
],
"name": "Territory",
"system_id": "territory",
"uri": "http://localhost:8080/wpm/api/custom_tables/territory"
}

203 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
b) If custom table name which is required is not sent:

{
"error_code": "CONSTRAINT_VIOLATIONS",
"error_messages": [
"CustomTable name is required."
]
}

3. DELETE /custom_tables/{system_id}

HTTP Method DELETE


Path /custom_tables/{system_id}
Description Deletes the custom table with specified system id.
Required headers Authorization, domain, Accept
Returned headers Status code
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Custom Table successfully deleted.
400 Bad Request If Custom Table could not be deleted.
404 Not Found Custom Table not found.
Body ErrorBean - failure.

Request example: DELETE /custom_tables/territory

204 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
4. GET /custom_tables

HTTP Method GET


Path /custom_tables
Description Search custom tables based on set query parameters. Returns a list of
custom tables which satisfy search criteria.

Available search attributes:


page (Number)
page_size (Number)
name (String)
system_id (String)
mask (String)

These search attributes are set as query parameters:


/custom_tables?name=territory&page=1&page_size=5
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK
Body ResultBean with list of CustomTableBeans.

JSON example:

GET /custom_tables?name=territory&page=1&page_size=5
{
"completed_in": 98,
"custom_tables": [
{
"columns": [
"OID",
"NAME",
"NUMBER_OF_STORES"
],
"name": "Territory",
"system_id": "territory",
"uri": "http://localhost:8080/wpm/api/custom_tables/territory"
}
],
"page": 1,
"page_size": 5,
"total": 1
}

205 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
5. POST /custom_tables/{system_id}/column/{column_name}

HTTP Method POST


Path /custom_tables/{system_id}/column/{column_name}
Description Adds a column with specified name into specified custom table.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Column successfully added.
400 Bad Request Column not added.
404 Not Found Custom Table not found.
Body CustomTableBean - success.
ErrorBean - failure.

JSON example:

POST /custom_tables/territory/column/location

Response body:

{
"columns": [
"OID",
"NAME",
"NUMBER_OF_STORES",
"LOCATION"
],
"name": "Territory",
"system_id": "territory",
"uri": "http://localhost:8080/wpm/api/custom_tables/territory"
}

206 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
6. GET /custom_tables/{system_id}/rows

HTTP Method GET


Path /custom_tables/{system_id}/rows
Description Returns rows from specified custom table.

Available search attributes:


page (Number)
page_size (Number)

These search attributes are set as query parameters:


/custom_tables/territory/rows? page=1&page_size=5
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Custom Table found.
400 Bad Request - Getting rows failed - Error in operations with
custom table.
404 Not Found Custom Table not found.
Body ResultBean with CustomTableBean object which contains rows -
success.
ErrorBean - failure.

JSON example:

a) GET /custom_tables/territory/rows

Response body:

{
"completed_in": 249,
"custom_table": {
"rows": [
{
"cells": [
{
"name": "OID",
"value": "1"
},
{
"name": "NAME",
"value": "USA"
},
{
"name": "NUMBER_OF_STORES",
"value": "60"

207 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
},
{
"name": "LOCATION",
"value": "USA"
}
],
"oid": "1"
},
{
"cells": [
{
"name": "OID",
"value": "2"
},
{
"name": "NAME",
"value": "Europe 1"
},
{
"name": "NUMBER_OF_STORES",
"value": "20"
},
{
"name": "LOCATION",
"value": "Western Europe"
}
],
"oid": "2"
}
]
},
"page": 1,
"page_size": 5,
"total": 2
}

7. GET /custom_tables/{system_id}/rows/{oid}

HTTP Method GET


Path /custom_tables/{system_id}/rows/{oid}
Description Returns row with specified oid (object id) from specified custom table.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Row found.
400 Bad Request Getting row failed - Error in operations with
custom table.
404 Not Found Custom Table or Row not found.
Body ResultBean with CustomTableBean object which contains rows -
success.
ErrorBean - failure.

208 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
JSON example:

a) GET /custom_tables/territory/rows/2

Response body:

{
"rows": [
{
"cells": [
{
"name": "OID",
"value": "2"
},
{
"name": "NAME",
"value": "Europe 1"
},
{
"name": "NUMBER_OF_STORES",
"value": "20"
},
{
"name": "LOCATION",
"value": "Western Europe"
}
],
"oid": "2"
}
]
}

8. POST /custom_tables/{system_id}/rows

HTTP Method POST


Path /custom_tables/{system_id}/rows
Description Adds one row in specified custom table based on received row in
CustomTableBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body CustomTableBean with one row.
Response - Output
Return MIME Type application/json
HTTP Status Code 201 OK Row successfully added.
400 Bad Request Creating row failed - Error in operations with
custom table.
404 Not Found Custom Table not found.
Body CustomFieldBean with added row. Other rows are left out.
ErrorBean - failure.

209 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
JSON example:

POST /custom_tables/territory/rows

Request body:

{
"rows": [
{
"cells": [
{
"name": "name",
"value": "Africa"
},
{
"name": "NUMBER_OF_STORES",
"value": "25"
},
{
"name": "LOCATION",
"value": "Africa"
}
]
}
]
}

Response body:

{
"rows": [
{
"cells": [
{
"name": "OID",
"value": "3"
},
{
"name": "NAME",
"value": "Africa"
},
{
"name": "NUMBER_OF_STORES",
"value": "25"
},
{
"name": "LOCATION",
"value": "South Africa"
}
],
"oid": "3"
}
]
}

210 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
9. PUT /custom_tables/{system_id}/rows

HTTP Method PUT


Path /custom_tables/{system_id}/rows
Description Updates the row in specified custom table based on received row in
CustomTableBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body CustomTableBean with one row.
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Row successfully updated.
400 Bad Request Updating row failed - Error in operations with
custom table.
404 Not Found Custom Table or row not found.
Body CustomFieldBean with updated row. Other rows are left out.
ErrorBean - failure.

JSON example:

PUT /custom_tables/territory/rows

Request body:

{
"rows": [
{
"cells": [
{
"name": "OID",
"value": "3"
},
{
"name": "NAME",
"value": "Africa"
},
{
"name": "NUMBER_OF_STORES",
"value": "25"
},
{
"name": "LOCATION",
"value": "South Africa"
}
]
}
]
}

211 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Response body:

{
"rows": [
{
"cells": [
{
"name": "OID",
"value": "3"
},
{
"name": "NAME",
"value": "Africa"
},
{
"name": "NUMBER_OF_STORES",
"value": "25"
},
{
"name": "LOCATION",
"value": "South Africa"
}
],
"oid": "3"
}
]
}

10. DELETE /custom_tables/{system_id}/rows/{oid}

HTTP Method DELETE


Path /custom_tables/{system_id}/rows/{oid}
Description Deletes the row with specified oid in specified custom table.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Row successfully deleted.
400 Bad Request Deleting row failed - Error in operations with
custom table.
404 Not Found Custom Table or row not found.
Body ErrorBean - failure.

Request example: DELETE /custom_tables/territory/rows/3

212 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
11. PUT /custom_tables/query/select

HTTP Method PUT


Path /custom_tables/query/select
Description Executes select query sent via QueryBean and returns rows from
custom table. Number of returned results can be limited using page
(Number) and page_size (Number) search attributes.

These search attributes are set as query parameters:


/custom_tables/query/select?page=1&page_size=5

Illegal query words: CREATE, ALTER, DROP, TRUNCATE, COMMENT,


RENAME, INSERT, UPDATE, DELETE, MERGE, GRANT, REVOKE, OFFSET,
LIMIT.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body QueryBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Select query successfully executed.
400 Bad Request Select query not executed.
Body QueryResultBean - success.
ErrorBean - failure.

Example table:

OID NAME NUMBER_OF_STORES LOCATION


1 Africa 25 Africa
2 Europe 42 Western Europe
3 USA 26 West coast
4 Asia 9 Asia

JSON example:

a) PUT /custom_tables/query/select?page=1&page_size=5

Request body:

{
"query": "select oid,name,number_of_stores from territory where number_of_stores > 25 and number_of_stores < 40"
}

213 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Response body:
{
"completed_in": 2144,
"custom_table": {
"rows": [
{
"cells": [
{
"name": "OID",
"value": "3"
},
{
"name": "NAME",
"value": "USA"
},
{
"name": "NUMBER_OF_STORES",
"value": "26"
}
],
"oid": "3"
}
]
},
"page": 1,
"page_size": 10,
"total": 1
}

12. POST /custom_tables/query/insert

HTTP Method POST


Path /custom_tables/query/insert
Description Inserts data into custom table based on sent query in QueryBean.

Illegal query words: CREATE, ALTER, DROP, TRUNCATE, COMMENT,


RENAME, UPDATE, DELETE, MERGE, GRANT, REVOKE, OFFSET, LIMIT.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body QueryBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Insert query successfully executed.
400 Bad Request Insert query not executed.
Body QueryResultBean with row OID - success.
ErrorBean - failure.

214 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Example table:

OID NAME NUMBER_OF_STORES LOCATION


1 Africa 25 Africa
2 Europe 42 Western Europe
3 USA 26 West coast
4 Asia 9 Asia

JSON example:

a) POST /custom_tables/query/insert

Request body:

{
"query": "insert into territory (name, number_of_stores, location) values ('Europe 2', '15', 'South Europe')"
}

Response body:

{
"completed_in": 52,
"oid": 5
}

Table after inserting row:

OID NAME NUMBER_OF_STORES LOCATION


1 Africa 25 Africa
2 Europe 42 Western Europe
3 USA 26 West coast
4 Asia 9 Asia
5 Europe 2 15 South Europe

215 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
13. PUT /custom_tables/query/update

HTTP Method PUT


Path /custom_tables/query/update
Description Updates data in custom table based on sent query in QueryBean.

Illegal query words: CREATE, ALTER, DROP, TRUNCATE, COMMENT,


RENAME, INSERT, DELETE, MERGE, GRANT, REVOKE, OFFSET, LIMIT.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body QueryBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Update query successfully executed.
400 Bad Request Update query not executed.
Body QueryResultBean - success.
ErrorBean - failure.

Example table:

OID NAME NUMBER_OF_STORES LOCATION


1 Africa 25 Africa
2 Europe 42 Western Europe
3 USA 26 West coast
4 Asia 9 Asia
5 Europe 2 15 South Europe

JSON example:

a) PUT /custom_tables/query/update

Request body:

{
"query": "update territory set name = 'Europe 1' where name = 'Europe'"
}

Response body:

{
"affected_rows_count": 1,
"completed_in": 62
}

216 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Table after updating row:

OID NAME NUMBER_OF_STORES LOCATION


1 Africa 25 Africa
2 Europe 1 42 Western Europe
3 USA 26 West coast
4 Asia 9 Asia
5 Europe 2 15 South Europe

14. PUT /custom_tables/query/delete

HTTP Method PUT


Path /custom_tables/query/delete
Description Updates data in custom table based on sent query in QueryBean.

Illegal query words: CREATE, ALTER, DROP, TRUNCATE, COMMENT,


RENAME, INSERT, UPDATE, MERGE, GRANT, REVOKE, OFFSET, LIMIT.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body QueryBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Delete query successfully executed.
400 Bad Request Delete query not executed.
Body QueryResultBean - success.
ErrorBean - failure.

Example table:

OID NAME NUMBER_OF_STORES LOCATION


1 Africa 25 Africa
2 Europe 1 42 Western Europe
3 USA 26 West coast
4 Asia 9 Asia
5 Europe 2 15 South Europe

JSON example:

a) PUT /custom_tables/query/delete

217 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Request body:

{
"query": "delete from territory where name like '%Europe%'"
}

Response body:

{
"affected_rows_count": 2,
"completed_in": 56
}

Table after deleting row:

OID NAME NUMBER_OF_STORES LOCATION


1 Africa 25 Africa
3 USA 26 West coast
4 Asia 9 Asia

15. POST /custom_tables/import/new_table

HTTP Method POST


Path /custom_tables/import/new_table
Description Creates a new custom table with rows from uploaded csv file.

Request must have the following header:


Content-Type: multipart/form-data; boundary=
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request Input
Accepts application/json
Expected request body 1. Table name sent as form field with name table_name.
2. csv file with size less than 20MB uploaded as form field with
name uploaded_file.
Response - Output
Return MIME Type application/json
HTTP Status Code 201 OK New table successfully imported.
400 Bad Request File or table name not sent; file larger than 20MB;
table already exists; file is not csv file import failed.
Body CustomTableBean with import report (without rows) - success
ErrorBean - failure.

218 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Example csv file content:

name,number_of_stores,location
Europe, 10, Southern Europe
USA, 25, West Coast
Africa, 5, West Africa

Example HTML form:

<html>
<head>
</head>
<body>
<form action="http://localhost:8080/wpm/api/custom_tables/import/new_table"
enctype="multipart/form-data" method="post">
Table Name: <input type="text" name="table_name" />
File: <input type="file" name="uploaded_file">
<input type="submit" value="Import Table" />
</form>
</body>
</html>

POST /custom_tables/import/new_table

Response body:

{
"columns": [
"OID",
"NAME",
"NUMBER_OF_STORES",
"LOCATION"
],
"import_report": "Finished importing custom table territory. Imported (3) rows.",
"name": "territory",
"system_id": "territory",
"uri": "http://localhost:8080/wpm/api/custom_tables/territory"
}

219 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Created table:

OID NAME NUMBER_OF_STORES LOCATION


1 Europe 10 Southern Europe
2 USA 25 West Coast
3 Africa 5 West Africa

16. POST /custom_tables/{system_id}/import/new_rows

HTTP Method POST


Path /custom_tables/{system_id}/import/new_rows
Description Inserts new rows in specified custom table from uploaded csv file and
updates existing rows. Rows which are left out from the file are not
updated.

Existing rows must have OID value:


1, Europe 1, 12, Southern Europe

New rows have empty OID value followed by comma separator:


,Europe 2, 15, East Europe

Request must have the following header:


Content-Type: multipart/form-data; boundary=
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request Input
Accepts application/json
Expected request body 1. Table name sent as form field with name table_name.
2. csv file with size less than 20MB uploaded as form field with
name uploaded_file.
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK New rows successfully inserted.
400 Bad Request File or table name not sent; file larger than 20MB;
table already exists; file is not csv file import failed.
404 Not Found Custom table not found.
Body CustomTableBean with import report (without rows) - success
ErrorBean - failure.

220 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Example csv file content:

oid,name,number_of_stores,location
1, Europe 1, 12, Southern Europe
3, Africa, 5, West Africa
,Europe 2, 15, East Europe
,Australia, 12, Australia and New Zealand

Example HTML form:

<html>
<head>
</head>
<body>
<form action="http://localhost:8080/wpm/api/custom_tables/territory/import/new_rows"
enctype="multipart/form-data" method="post">
File: <input type="file" name="uploaded_file">
<input type="submit" value="Import Table" />
</form>
</body>
</html>

POST /custom_tables/{system_id}/import/new_rows

Response body:

{
"columns": [
"OID",
"NAME",
"NUMBER_OF_STORES",
"LOCATION"
],
"import_report": "Finished updating custom table territory. Updated (5) rows.",
"name": "territory",
"system_id": "territory",
"uri": "http://localhost:8080/wpm/api/custom_tables/territory"
}

221 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Updated table:

OID NAME NUMBER_OF_STORES LOCATION


1 Europe 1 12 Southern Europe
2 USA 25 West Coast
3 Africa 5 West Africa
4 Europe 2 15 East Europe
5 Australia 12 Australia and New
Zealand

17. PUT /custom_tables/export/query_to_csv

HTTP Method PUT


Path /custom_tables/export/query_to_csv
Description Exports rows from custom table to CSV file based on received SELECT
query in QueryBean.

If file name is empty it will be set to exportedRows.csv.

Returned result can be limited with these parameters:


page (Number)
page_size(Number)

These parameters are set as query parameters:


/custom_tables/export/query_to_csv?page=1&page_size=2000

Maximum number of rows (maximum page_size) in exported file is


limited to 100000. If page_size parameter is not received, default
page size is 50000.

Illegal query words: CREATE, ALTER, DROP, TRUNCATE, COMMENT,


RENAME, INSERT, UPDATE, DELETE, MERGE, GRANT, REVOKE, OFFSET,
LIMIT.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/octet-stream
Expected request body QueryBean
Response - Output
Returned MIME Type application/vnd.ms-excel
HTTP Status Code 200 OK CSV file returned successfully.
400 Bad Request Query not provided; Query failed (Custom table
does not exist; Illegal query)
Body CSV file - success.
ErrorBean - failure.

222 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Example table myStores:

OID NAME NUMBER_OF_STORES LOCATION


1 Africa 25 Africa
2 Europe 42 Western Europe
3 USA 26 West Coast
4 Asia 9 Asia

JSON example:

PUT /custom_tables/export/query_to_csv

Request headers:

domain: default
Authorization: Basic bWFya29tOjkyckw2M0paRDZXUno2QTEwMDBx
Accept: application/octet-stream
Content-Type: application/json

Request body:

{
"query": "SELECT NAME,NUMBER_OF_STORES,LOCATION from myStores where CAST(NUMBER_OF_STORES AS INT) > 25",
"file_name": "big_market.csv
}

Response body csv file content:

NAME,NUMBER_OF_STORES,LOCATION
USA,26,West Coast
Europe,42,Western Europe

Response headers:

Content-Disposition: attachment; filename="big_market.csv"


Content-Type: application/vnd.ms-excel

223 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
8. Department
Resource: Department Main path: /departments

1. GET /departments/{system_id}

HTTP Method GET


Path /departments/{system_id}
Description Returns the department with specified system id.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Department found.
404 Not Found Department not found.
Body DepartmentBean - success.
ErrorBean - failure.

JSON example:

a) GET /departments/accounting

Response body:

{
"company": {
"name": "My Company Inc.",
"system_id": "my_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/accounting "
},
"gate_keeper": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Accountant",
"system_id": "accountant"
}
},
"name": "Accounting",
"system_id": "accounting",
"uri": "http://localhost:8080/wpm/api/departments/accounting"
}

224 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
b) GET /departments/some_non_existing_department
{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Department does not exist."
]
}

2. POST /departments

HTTP Method POST


Path /departments
Description Creates a department based on received DepartmentBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body DepartmentBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created Department successfully created.
400 Bad Request Required fields are missing or other constraint
error.
Body DepartmentBean - success.
ErrorBean - failure.

JSON example:

a) POST /departments

Request body:

{
"company_system_id": "my_company_inc",
"gate_keeper_system_id": "jsmith",
"name": "Accounting",
"system_id": "accounting"
}

b) If department name which is required is not sent:

{
"error_code": "CONSTRAINT_VIOLATIONS",
"error_messages": [
"Department name is required."
]
}

225 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
3. PUT /departments

HTTP Method PUT


Path /departments
Description Updates the department based on received DepartmentBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body DepartmentBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Department successfully updated.
400 Bad Request Required fields are missing or other constraint
error.
404 Not Found Department not found.
Body DepartmentBean - success.
ErrorBean - failure.

JSON example:

Note: DepartmentBeans system_id field must be set.

PUT /departments

Request body:

{
"company_system_id": "my_company_inc",
"gate_keeper_system_id": "tsmith",
"name": "Accounting Dep",
"system_id": "accounting"
}

Response body:

{
"company": {
"name": "My Company Inc.",
"system_id": "my_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/my_company_inc"
},
"gate_keeper": {
"first_name": "Tom",
"last_name": "Smith",
"login_name": "tsmith",
"system_id": "tsmith",
"uri": "http://localhost:8080/wpm/api/users/tsmith",
"user_type": {
"name": "Sales and Marketing",

226 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"system_id": "sales_and_marketing"
}
},
"name": "Accounting Dep",
"system_id": "accounting",
"uri": "http://localhost:8080/wpm/api/departments/accounting"
}

4. DELETE /departments/{system_id}

HTTP Method DELETE


Path /departments/{system_id}
Description Deletes the department with specified system id.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Department successfully deleted.
304 Not Modified If department could not be deleted.
404 Not Found Department not found.
Body ErrorBean - failure.

Request example: DELETE /departments/accounting

5. GET /departments

HTTP Method GET


Path /departments
Description Search departments based on set query parameters. Returns a list of
departments which satisfy search criteria.

Available search attributes:


page (Number)
page_size (Number)
name (String)
system_id (String)
mask (String)

These search attributes are set as query parameters:


/departments?name=accounting&page=1&page_size=5
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input

227 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK
Body ResultBean with list of DepartmentBeans.

JSON example:

GET /departments?name=accounting&page=1&page_size=5

{
"completed_in": 89,
"departments": [
{
"company": {
"name": "My Company Inc.",
"system_id": "my_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/my_company_inc"
},
"gate_keeper": {
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith2",
"system_id": "jsmith2",
"uri": "http://localhost:8080/wpm/api/users/jsmith2",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing"
}
},
"name": "Accounting",
"system_id": "accounting",
"uri": "http://localhost:8080/wpm/api/departments/accounting"
},
{
"company": {
"name": "Other Company, Inc.",
"system_id": "other_company_inc",
"uri": "http://localhost:8080/wpm/api/companies/other_company_inc"
},
"name": "Other Company Accounting",
"system_id": "other_company_accounting",
"uri": "http://localhost:8080/wpm/api/departments/other_company_accounting"
}
],
"page": 1,
"page_size": 5,
"total": 2
}

228 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
9. Message
Resource: Message Main path: /messages

1. GET /messages/{system_id}

HTTP Method GET


Path /messages/{system_id}
Description Returns the message with specified system id.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Message found.
404 Not Found Message not found.
Body MessageBean - success.
ErrorBean - failure.

JSON example:

a) GET /messages/157

Response body:

{
"body": "Hello Jonh, We can start the implementation phase on this project. Regards, Tom.",
"date": "10/07/2013 10:52:36",
"from_address": "tom@somemailaddress.com",
"subject": "Next project phase",
"system_id": "157",
"uri": "http://localhost:8080/wpm/api/messages/157"
}

b) GET /messages/123121436547848

{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Message does not exist."
]
}

229 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
2. DELETE /messages/{system_id}

HTTP Method DELETE


Path /messages/{system_id}
Description Deletes the message with specified system id.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Message successfully deleted.
304 Not Modified If message could not be deleted.
404 Not Found Message not found.
Body ErrorBean - failure.

Request example: DELETE /messages/157

3. GET /messages/user/{system_id}/unread

HTTP Method GET


Path /messages/user/{system_id}/unread
Description Search unread messages for specified user based on set query
parameters. Returns a list of unread messages which satisfy search
criteria.

Available search attributes:


page (Number)
page_size (Number)
subject (String)
body (String)
system_id (String)

These search attributes are set as query parameters:


/messages/user/jsmith/unread?subject=project&page=1&page_size=5
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json

230 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
HTTP Status Code 200 OK Success.
404 Not Found User not found.
Body ResultBean with list of MessageBeans - success.
ErrorBean - failure.

JSON example:

a) GET /messages/user/jsmith/unread

Response body:

{
"completed_in": 55,
"messages": [
{
"date": "10/07/2013 10:04:28",
"from_address": "tom@somemailaddress.com",
"subject": "Next project phase",
"system_id": "157",
"uri": "http://localhost:8080/wpm/api/messages/157"
},
{
"date": "11/07/2013 11:15:45",
"from_address": "jane@somemailaddress.com",
"subject": "Available resources for project",
"system_id": "158",
"uri": "http://localhost:8080/wpm/api/messages/158"
}
],
"page": 1,
"page_size": 5,
"total": 2
}

4. GET /messages/user/{system_id}/unread_and_mark_as_read

HTTP Method GET


Path /messages/user/{system_id}/unread_and_mark_as_read
Description Search unread messages for specified user based on set query
parameters. Returns a list of unread messages which satisfy search
criteria and marks returned messages as read.

Available search attributes:


page (Number)
page_size (Number)
subject (String)
body (String)
system_id (String)

These search attributes are set as query parameters:


/messages/user/jsmith/unread_and_mark_as_read?subject=project&page=1&page_size=5
Required headers Authorization, domain, Accept
Returned headers Content-Type

231 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Success.
404 Not Found User not found.
Body ResultBean with list of MessageBeans - success.
ErrorBean - failure.

JSON example:

a) GET /messages/user/jsmith/unread_and_mark_as_read

Response body:

{
"completed_in": 55,
"messages": [
{
"date": "10/07/2013 10:04:28",
"from_address": "tom@somemailaddress.com",
"subject": "Next project phase",
"system_id": "157",
"uri": "http://localhost:8080/wpm/api/messages/157"
},
{
"date": "11/07/2013 11:15:45",
"from_address": "jane@somemailaddress.com",
"subject": "Available resources for project",
"system_id": "158",
"uri": "http://localhost:8080/wpm/api/messages/158"
}
],
"page": 1,
"page_size": 5,
"total": 2
}

5. GET /messages/user/{system_id}/total_unread

HTTP Method GET


Path /messages/user/{system_id}/total_unread
Description Returns the number of unread messages for specified user.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Count returned.

232 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
404 Not Found User not found.
Body TotalBean - success.
ErrorBean - failure.

JSON example:

a) GET /messages/user/jsmith/total_unread

Response body:

{
"total": 2
}

233 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
10.Project
Resource: Project Main path: /projects

1. GET /projects/{system_id}

HTTP Method GET


Path /projects/{system_id}
Description Returns the project with specified system id.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Project found.
404 Not Found Project not found.
Body ProjectBean - success.
ErrorBean - failure.

JSON example:

a) GET /projects/abc

Response body:

{
"custom_fields": [
{
"name": "Due Date",
"system_id": "due_date",
"type_name": "Date",
"type_system_id": 3,
"value": "10/15/14",
"value_formatted": "15/10/14"
}
],
"description": "This is a project for grouping cases regarding sales.",
"is_default": false,
"name": "Sales project",
"permissions": [
{
"name": "Sales",
"system_id": "sales"
}
],
"project_roles": [
{
"name": "Project Leader",
"system_id": "project_leader",
"user_system_id": "jsmith"
}

234 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
],
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
}

b) GET /projects/some_non_existing_project

{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Project does not exist."
]
}

2. POST /projects

HTTP Method POST


Path /projects
Description Creates a project based on received ProjectBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body ProjectBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created Project successfully created.
400 Bad Request Required fields are missing or other constraint
error.
Body ProjectBean - success.
ErrorBean - failure.

JSON example:

a) POST /projects

Request body:

{
"description": "This is a project for grouping cases regarding sales.",
"is_default": false,
"name": "Sales project",
"custom_fields": [
{
"system_id": "due_date",
"value": "10/15/14"
}
],
"permissions": [
{
"system_id": "sales"
}

235 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
],
"project_roles": [
{
"system_id": "project_leader",
"user_system_id": "jsmith"
}
],
"system_id": "sp"
}

b) If project name which is required is not sent:

{
"error_code": "CONSTRAINT_VIOLATIONS",
"error_messages": [
"Project name is required."
]
}

3. PUT /projects

HTTP Method PUT


Path /projects
Description Updates the project based on received ProjectBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body ProjectBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Project successfully updated.
400 Bad Request Required fields are missing or other constraint
error.
404 Not Found Project not found.
Body ProjectBean - success.
ErrorBean - failure.

JSON example:

Note: ProjectBeans system_id field must be set.

PUT /projects

236 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Request body:

{
"description": "This is a project for grouping cases regarding sales. - UPDATED DESCRIPTION.",
"is_default": false,
"name": "Sales project",
"custom_fields": [
{
"system_id": "due_date",
"value": "11/17/14"
}
],
"permissions": [
{
"system_id": "sales"
}
],
"project_roles": [
{
"system_id": "project_leader",
"user_system_id": "jsmith"
}
],
"system_id": "sp"
}

Response body:
{
"custom_fields": [
{
"name": "Due Date",
"system_id": "due_date",
"type_name": "Date",
"type_system_id": 3,
"value": "11/17/14",
"value_formatted": "17/11/14"
}
],
"description": "This is a project for grouping cases regarding sales. - UPDATED DESCRIPTION.",
"is_default": false,
"name": "Sales project",
"permissions": [
{
"name": "Sales",
"system_id": "sales"
}
],
"project_roles": [
{
"name": "Project Leader",
"system_id": "project_leader",
"user_system_id": "jsmith"
}
],
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
}

237 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
4. DELETE /projects/{system_id}

HTTP Method DELETE


Path /projects/{system_id}
Description Deletes the project with specified system id.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Project successfully deleted.
304 Not Modified If project could not be deleted.
404 Not Found Project not found.
Body ErrorBean - failure.

Request example: DELETE /projects/sp

5. GET /projects

HTTP Method GET


Path /projects
Description Search projects based on set query parameters. Returns a list of
projects which satisfy search criteria.

Available search attributes:


page (Number)
page_size (Number)
name (String)
system_id (String)
mask (String)

These search attributes are set as query parameters:


/projects?name=sales project&page=1&page_size=5
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json

238 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
HTTP Status Code 200 OK
Body ResultBean with list of ProjectBeans.

JSON example:

GET /projects?name=sales project&page=1&page_size=5

Response body:

{
"completed_in": 118,
"page": 1,
"page_size": 10,
"projects": [
{
"description": "This is a project for grouping cases regarding sales.",
"is_default": false,
"name": "Sales project",
"permissions": [
{
"name": "Sales",
"system_id": "sales"
}
],
"project_roles": [
{
"name": "Project Leader",
"system_id": "project_leader",
"user_system_id": "jsmith"
}
],
"system_id": "sp",
"uri": "http://localhost:8080/wpm/api/projects/sp"
}
],
"total": 1
}

239 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Note: To find more about reading and setting Custom Field values, read Section 7 and Section 8 in
Chapter 3.

6. GET /projects/{system_id}/custom_fields/{custom_field_system_id}

HTTP Method GET


Path /projects/{system_id}/custom_fields/{custom_field_system_id}
Description Returns specified custom field with its value which is set for specified
project.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Custom Field found.
404 Not Found Project or Custom Field not found.
Body CustomFieldBean - success.
ErrorBean - failure.

JSON example:

GET /projects/sp/custom_fields/due_date

Response body:

{
"name": "Due Date",
"system_id": "due_date",
"type_name": "Date",
"type_system_id": 3,
"value": "10/15/14",
"value_formatted": "15/10/14"
}

240 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
7. POST /projects/{system_id}/custom_fields

HTTP Method POST


Path /projects/{system_id}/custom_fields
Description Sets custom field value to specified project based on received
CustomFieldBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body CustomFieldBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created CustomField value set successfully.
400 Bad Request Custom Field value is not in the right format.
404 Not Found Project or Custom Field not found
Body ContactBean - success.
ErrorBean - failure.

JSON example:

POST /projects/sp/custom_fields

Request body:

{
"system_id": "due_date",
"value": "10/25/14"
}

241 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
8. PUT /projects/{system_id}/custom_fields

HTTP Method PUT


Path /projects/{system_id}/custom_fields
Description Updates custom field value in specified project based on received
CustomFieldBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body CustomFieldBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 200 OK CustomField value set successfully.
400 Bad Request Custom Field value is not in the right format.
404 Not Found Project or Custom Field not found
Body ContactBean - success.
ErrorBean - failure.

JSON example:

PUT /projects/sp/custom_fields

Request body:

{
"system_id": "due_date",
"value": "12/26/15"
}

242 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
9. DELETE /projects/{system_id}/custom_fields/{custom_field_system_id}

HTTP Method DELETE


Path /projects/{system_id}/custom_fields/{custom_field_system_id}
Description Deletes the value of specified custom field for specified contact.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Custom field value successfully deleted.
404 Not Found Project or Custom Field not found.
Body ErrorBean - failure.

Request example: DELETE /projects/sp/custom_fields/due_date

243 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
11.User
Resource: User Main path: /users

Note: UserBeans system_id attribute has the same value as login_name. We use system_id to find the
user. If there is a need to update users login name via REST call then system_id has the value of old
login name (in order to find the user) and login_name field has the value of new login name.

1. GET /users/{system_id}

HTTP Method GET


Path /users/{system_id}
Description Returns the user with specified system id.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK User found.
404 Not Found User not found.
Body UserBean - success.
ErrorBean - failure.

JSON example:

a) GET /users/jsmith

Response body:

{
"active": true,
"administrator": true,
"custom_fields": [
{
"name": "Yahoo ID",
"system_id": "yahoo_id",
"type_name": "Text",
"type_system_id": 1,
"value": "someYahooId123",
"value_formatted": "someYahooId123"
}
],
"department": { "name":
"Sales", "system_id":
"sales",
"uri": "http://localhost:8080/wpm/api/departments/sales"
},

244 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"email": "jsmith@someemailaddress.com",
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing",
"uri": "http://localhost:8080/wpm/api/userTypes/sales_and_marketing"
}
}

b) GET /users/some_non_existing_user

{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"User does not exist."
]
}

2. POST /users

HTTP Method POST


Path /users
Description Creates a user based on received UserBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body UserBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created User successfully created.
400 Bad Request Required fields are missing or other constraint
error.
Body UserBean - success.
ErrorBean - failure.

JSON example:

a) POST /users

Request body:

{
"active": true,
"administrator": true,
"custom_fields": [
{
"system_id": "yahoo_id",
"value": "someYahooId123"

245 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
}
],
"department_system_id": "sales",
"email": "jsmith@someemailaddress.com",
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"password": "somePassword567",
"user_type_system_id": "sales_and_marketing"
}

Response body:

{
"active": true,
"administrator": true,
"custom_fields": [
{
"name": "Yahoo ID",
"system_id": "yahoo_id",
"type_name": "Text",
"type_system_id": 1,
"value": "someYahooId123",
"value_formatted": "someYahooId123"
}
],
"department": { "name":
"Sales", "system_id":
"sales",
"uri": "http://localhost:8080/wpm/api/departments/sales"
},
"email": "jsmith@someemailaddress.com",
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing",
"uri": "http://localhost:8080/wpm/api/userTypes/sales_and_marketing"
}
}

b) If fields which are required are not sent:

{
"error_code": "CONSTRAINT_VIOLATIONS",
"error_messages": [
"User login name is required.",
"User department is required.",
"User user type is required.",
"User last name is required.",
"User first name is required.",
"User email is required."
]
}

246 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
3. PUT /users

HTTP Method PUT


Path /users
Description Updates the user based on received UserBean.

Note: UserBeans system_id attribute has the same value as


login_name. We use system_id to find the user. If there is a need to
update users login name via REST call then system_id has the value of
old login name (in order to find the user) and login_name field has the
value of new login name.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body UserBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK User successfully updated.
400 Bad Request Required fields are missing or other constraint
error.
404 Not Found User not found.
Body UserBean - success.
ErrorBean - failure.

JSON example:

Note: UserBeans system_id field must be set.

PUT /users

Request body:

{
"active": true,
"administrator": false,
"custom_fields": [
{
"system_id": "yahoo_id",
"value": "someYahooId456"
}
],
"department_system_id": "sales",
"email": "jsmith@someemailaddress.com",
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"password": "somePassword123123",
"user_type_system_id": "sales_and_marketing"
}

247 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Response body:

{
"active": true,
"administrator": false,
"custom_fields": [
{
"name": "Yahoo ID",
"system_id": "yahoo_id",
"type_name": "Text",
"type_system_id": 1,
"value": "someYahooId456",
"value_formatted": "someYahooId456"
}
],
"department": { "name":
"Sales", "system_id":
"sales",
"uri": "http://localhost:8080/wpm/api/departments/sales"
},
"email": "jsmith@someemailaddress.com",
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing",
"uri": "http://localhost:8080/wpm/api/userTypes/sales_and_marketing"
}
}

4. DELETE /users/{system_id}

HTTP Method DELETE


Path /users/{system_id}
Description Deletes the user with specified system id.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK User successfully deleted.
304 Not Modified If user could not be deleted.
404 Not Found User not found.
Body ErrorBean - failure.

Request example: DELETE /users/jsmith

248 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
5. GET /users

HTTP Method GET


Path /users
Description Search users based on set query parameters. Returns a list of users
which satisfy search criteria.

Available search attributes:

page (Number)
page_size (Number)
mask (String)
name (String)
first_name (String)
last_name (String)
department (String) (department name)
user_type (String) (user type name)
email (String)
login_name (String)
system_id (String)

These search attributes are set as query parameters:


/users?first_name=john&page=1&page_size=5
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK
Body ResultBean with list of UserBeans.

JSON example:

GET /users?first_name=john&user_type=sales&department=sales&last_name=smith&page=1&page_size=5

{
"completed_in": 122,
"page": 1,
"page_size": 5,
"total": 1,
"users": [
{
"active": true,
"administrator": true,
"custom_fields": [
{

249 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
"name": "Yahoo ID",
"system_id": "yahoo_id",
"type_name": "Text",
"type_system_id": 1,
"value": "someYahooId123",
"value_formatted": "someYahooId123"
}
],
"department": { "name":
"Sales", "system_id":
"sales",
"uri": "http://localhost:8080/wpm/api/departments/sales"
},
"email": "jsmith@someemailaddress.com",
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith",
"user_type": {
"name": "Sales and Marketing",
"system_id": "sales_and_marketing",
"uri": "http://localhost:8080/wpm/api/userTypes/sales_and_marketing"
}
}
]
}

Note: To find more about reading and setting Custom Field values, read Section 7 and Section 8 in
Chapter 3.

6. POST /users/create_bulk

HTTP Method POST


Path /users/create_bulk
Description Creates a list of users based on received list of UserBean objects
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body List of UserBean objects.
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created Users successfully created.
400 Bad Request Required fields are missing or other constraint
error.
Body processed_entity - success.
errors failure.

250 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
JSON example:
a) POST /users/create_bulk

Request body:
[{
"active": true,
"administrator": true,
"custom_fields": [{
"system_id": "yahoo_id",
"value": "someYahooId123"
}],
"department_system_id": "sales",
"email": "jsmith@someemailaddress.com",
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"password": "somePassword567",
"user_type_system_id": "sales_and_marketing"
},
{
"active": true,
"administrator": true,
"custom_fields": [{
"system_id": "yahoo_id",
"value": "someYahooId123"
}],
"department_system_id": "sales",
"email": "jsmith@someemailaddress.com",
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmith",
"password": "somePassword567",
"user_type_system_id": "sales_and_marketing"
}]

Response body:

{
"errors": [
{
"error_code": "USER_EXCEPTION",
"error_messages": [
"User name already defined.",
"Email name already defined."
],
"failed_index": 2
}
],
"processed_entities": [
{
"login_name": "jsmithm",
"password": "somePassword567",
"first_name": "John",
"last_name": "Smith",
"email": "jsmithm@someemailaddress.com",
"department": {
"name": "Sales",
"system_id": "sales",
"uri": "http://localhost:8080/wpm/api/departments/sales"
},
"administrator": true,
"active": true,
"system_id": "jsmithm",
"uri": "http://localhost:8080/wpm/api/users/jsmithm"
}
]

250 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
b) If fields which are required are not sent:

"errors": [
{
"error_code": "USER_EXCEPTION",
"error_messages": [
"User name is required."
"email is required."
],
"failed_index": 1
}
]
}

Errors - List of messages with error details.


Failed_index - Index of user with bad request.

7. PUT /users/update_bulk

HTTP Method PUT


Path /users/update_bulk
Description Updates the user based on received list of UserBean objects

Note: UserBeans system_id attribute has the same value as


login_name. We use system_id to find the user. If there is a need to
update users login name via REST call then system_id has the value of
old login name (in order to find the user) and login_name field has the
value of new login name.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body List of UserBean objcets
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Users successfully updated.
400 Bad Request Required fields are missing or other constraint
error.
404 Not Found User not found.
Body processed_entity - success.
errors failure.

250 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
JSON example:
a) PUT /users/update_bulk
Request body:
[{
"active": true,
"administrator": false,
"custom_fields": [{
"system_id": "yahoo_id",
"value": "someYahooId456"
}],
"department_system_id": "sales",
"email": "jsmith@someemailaddress.com",
"first_name": Ivan",
"last_name": "Smith",
"login_name": "jsmith",
"password": "somePassword123123",
"user_type_system_id": "sales_and_marketing",
"system_id": "jsmith"
},
{
"active": true,
"administrator": false,
"custom_fields": [{
"system_id": "yahoo_id",
"value": "someYahooId456"
}],
"department_system_id": "sales",
"email": "jsmith@someemailaddress.com",
"first_name": "John",
"last_name": "Smith",
"login_name": "jsmithg",
"password": "somePassword123123",
"user_type_system_id": "sales_and_marketing",
"system_id": "jsmithg"
}]

Response body:
{
"errors": [
{
"error_code": "USER_EXCEPTION",
"error_messages": [
"User with this system_id: jsmithg doesnt exist.",
"Email name already defined."
],
"failed_index": 2
}
],
"processed_entities": [
{
"login_name": "jsmith",
"first_name": "Ivan",
"last_name": "Smith",
"email": "jsmith@someemailaddress.com",
"department": {
"name": "Sales",
"system_id": "sales",
"uri": "http://localhost:8080/wpm/api/departments/sales"
},
"administrator": false,
"active": true,
"system_id": "jsmith",
"uri": "http://localhost:8080/wpm/api/users/jsmith"
}
]
}

250 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
8. GET /users/{system_id}/custom_fields/{custom_field_system_id}

HTTP Method GET


Path /users/{system_id}/custom_fields/{custom_field_system_id}
Description Returns specified custom field with its value which is set for specified
user.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Custom Field found.
404 Not Found User or Custom Field not found.
Body CustomFieldBean - success.
ErrorBean - failure.

JSON example:

GET /users/jsmith/custom_fields/yahoo_id

Response body:

{
"name": "Yahoo ID",
"system_id": "yahoo_id",
"type_name": "Text",
"type_system_id": 1,
"value": "someYahooId123",
"value_formatted": "someYahooId123"
}

250 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
9. POST /users/{system_id}/custom_fields

HTTP Method POST


Path /projects/{system_id}/custom_fields
Description Sets custom field value to specified user based on received
CustomFieldBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body CustomFieldBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created CustomField value set successfully.
400 Bad Request Custom Field value is not in the right format.
404 Not Found User or Custom Field not found
Body ContactBean - success.
ErrorBean - failure.

JSON example:

POST /users/jsmith/custom_fields

Request body:

{
"system_id": "yahoo_id",
"value": "someYahooId123"
}

251 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
10. PUT /users/{system_id}/custom_fields

HTTP Method PUT


Path /users/{system_id}/custom_fields
Description Updates custom field value for specified user based on received
CustomFieldBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body CustomFieldBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 200 OK CustomField value set successfully.
400 Bad Request Custom Field value is not in the right format.
404 Not Found User or Custom Field not found
Body ContactBean - success.
ErrorBean - failure.

JSON example:

PUT /users/jsmith/custom_fields

Request body:

{
"system_id": "yahoo_id",
"value": "someOtherId456"
}

252 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
11. DELETE /users/{system_id}/custom_fields/{custom_field_system_id}

HTTP Method DELETE


Path /users/{system_id}/custom_fields/{custom_field_system_id}
Description Deletes the value of specified custom field for specified user.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK Custom field value successfully deleted.
404 Not Found User or Custom Field not found.
Body ErrorBean - failure.

Request example: DELETE /users/jsmith/custom_fields/yahoo_id

253 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
12.User Type
Resource: User Type Main path: /user_types

1. GET /user_types/{system_id}

HTTP Method GET


Path /user_types/{system_id}
Description Returns the user type with specified system id.
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK User Type found.
404 Not Found User Type not found.
Body UserTypeBean - success.
ErrorBean - failure.

JSON example:

a) GET /user_types/jsmith

Response body:

{
"name": "Business Analyst",
"system_id": "business_analyst",
"uri": "http://localhost:8080/wpm/api/userTypes/business_analyst"
}

b) GET /user_types/some_non_existing_user_type

{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"User type does not exist."
]
}

254 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
2. POST /user_types

HTTP Method POST


Path /user_types
Description Creates a user type based on received UserTypeBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type, Location
Request - Input
Accepts application/json
Expected request body UserTypeBean
Response - Output
Returned MIME Type application/json
HTTP Status Code 201 Created User type successfully created.
400 Bad Request Required fields are missing or other constraint
error.
Body UserTypeBean - success.
ErrorBean - failure.

JSON example:

a) POST /user_types

Request body:

{
"name": "Business Analyst",
"system_id": "business_analyst"
}

Response body:

{
"name": "Business Analyst",
"system_id": "business_analyst",
"uri": "http://localhost:8080/wpm/api/user_types/business_analyst"
}

b) If fields which are required are not sent:


{
"error_code": "CONSTRAINT_VIOLATIONS",
"error_messages": [
"UserType name is required
]
}

255 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
3. PUT /user_types

HTTP Method PUT


Path /user_types
Description Updates the user type based on received UserTypeBean.
Required headers Authorization, domain, Accept, Content-Type
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body UserTypeBean
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK User type successfully updated.
400 Bad Request Required fields are missing or other constraint
error.
404 Not Found User type not found.
Body UserTypeBean - success.
ErrorBean - failure.

JSON example:

Note: UserTypeBeans system_id field must be set.

PUT /user_types

Request body:

{
"name": "Business Analyst User Type",
"system_id": "business_analyst"
}

Response body:

{
"name": "Business Analyst User Type",
"system_id": "business_analyst",
"uri": "http://localhost:8080/wpm/api/user_types/business_analyst"
}

256 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
4. DELETE /user_types/{system_id}

HTTP Method DELETE


Path /user_types/{system_id}
Description Deletes the user type with specified system id.
Required headers Authorization, domain, Accept
Returned headers
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK User type successfully deleted.
304 Not Modified If user type could not be deleted.
404 Not Found User type not found.
Body ErrorBean - failure.

Request example: DELETE /user_types/business_analyst

257 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
5. GET /user_types

HTTP Method GET


Path /user_types
Description Search user types based on set query parameters. Returns a list of
user types which satisfy search criteria.

Available search attributes:


page
page_size
mask
name
system_id

These search attributes are set as query parameters:


/user_types?name= business&page=1&page_size=5
Required headers Authorization, domain, Accept
Returned headers Content-Type
Request - Input
Accepts application/json
Expected request body N/A
Response - Output
Return MIME Type application/json
HTTP Status Code 200 OK
Body ResultBean with list of UserTypeBeans.

JSON example:

GET /user_types?name=business&page=1&page_size=5

{
"completed_in": 87,
"page": 1,
"page_size": 10,
"total": 1,
"user_types": [
{
"name": "Business Analyst",
"system_id": "business_analyst",
"uri": "http://localhost:8080/wpm/api/user_types/business_analyst"
}
]
}

258 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
7. Appendix A Countries

This appendix show the list of countries with their system ids:

Country System ID
Albania albania
Algeria algeria
Andorra andorra
Angola angola
Anguilla anguilla
Argentina argentina
Armenia armenia
Aruba aruba
Australia australia
Austria austria
Azerbaijan azerbaijan
Bahamas bahamas
Bangladesh bangladesh
Barbados barbados
Belarus belarus
Belgium belgium
Benin benin
Bermuda bermuda
Bhutan bhutan
Bolivia bolivia
Botswana botswana
Bouvet Island bouvet_island
Brazil brazil
Brunei brunei
Bulgaria bulgaria
Burkina Faso burkina_faso
Burundi burundi
Cambodia cambodia
Cameroon cameroon
Canada canada
Cayman Islands cayman_islands
Central African Republic central_african_republic
Chad chad

259 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Chile chile
China china
Cocos (Keeling) Islands cocos_keeling_islands
Colombia colombia
Comoros comoros
Congo congo
Costa Rica costa_rica
Cote d Ivoire cote_d_ivoire
Croatia croatia
Cuba cuba
Cyprus cyprus
Denmark denmark
Djibouti djibouti
Dominica dominica
East Timor east_timor
Ecuador ecuador
Egypt egypt
El Salvador el_salvador
Equitorial Guinea equitorial_guinea
Eritrea eritrea
Estonia estonia
Falkland Islands (Islas Malvinas) falkland_islands_islas_malvinas
Faroe Islands faroe_islands
Fiji fiji
France france
French Guyana french_guyana
French Southern and Antarctic Lands french_southern_and_antarctic_lands
Gabon gabon
Gambia gambia
Gaza Strip gaza_strip
Germany germany
Ghana ghana
Gibraltar gibraltar
Greece greece
Greenland greenland
Guadeloupe guadeloupe
Guam guam
Guatemala guatemala
Guinea guinea
Guyana guyana
Haiti haiti

260 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Holy See (Vatican City) holy_see_vatican_city
Honduras honduras
Hong Kong hong_kong
Hungary hungary
Iceland iceland
India india
Indonesia indonesia
Iran iran
Iraq iraq
Ireland ireland
Italy italy
Jamaica jamaica
Japan japan
Jordan jordan
Kenya kenya
Kiribati kiribati
Kuwait kuwait
Kyrgyzstan kyrgyzstan
Laos laos
Latvia latvia
Lebanon lebanon
Liberia liberia
Libya libya
Liechtenstein liechtenstein
Lithuania lithuania
Macau macau
Macedonia - FYR macedonia_fyr
Madagascar madagascar
Malawi malawi
Maldives maldives
Mali mali
Afghanistan afghanistan
American Samoa american_samoa
Antigua and Barbuda antigua_and_barbuda
Bahrain bahrain
Belize belize
Bosnia and Herzegovina bosnia_and_herzegovina
British Virgin Islands british_virgin_islands
Cape Verde cape_verde
Christmas Island christmas_island
Cook Islands cook_islands

261 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Czech Republic czech_republic
Dominican Republic dominican_republic
Ethiopia ethiopia
Finland finland
French Polynesia french_polynesia
Marshall Islands marshall_islands
Martinique martinique
Mauritania mauritania
Mayotte mayotte
Mexico mexico
Moldova moldova
Monaco monaco
Mongolia mongolia
Montenegro montenegro
Montserrat montserrat
Morocco morocco
Mozambique mozambique
Myanmar myanmar
Namibia namibia
Naura naura
Netherlands netherlands
New Caledonia new_caledonia
New Zealand new_zealand
Nicaragua nicaragua
Niger niger
Nigeria nigeria
Niue niue
Norfolk Island norfolk_island
Northern Mariana Islands northern_mariana_islands
Norway norway
Oman oman
Palau palau
Panama panama
Papua New Guinea papua_new_guinea
Peru peru
Philippines philippines
Pitcairn Islands pitcairn_islands
Poland poland
Puerto Rico puerto_rico
Qatar qatar
Reunion reunion

262 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Romania romania
Russia russia
Rwanda rwanda
Saint Lucia saint_lucia
Samoa samoa
San Marino san_marino
Sao Tome and Principe sao_tome_and_principe
Saudi Arabia saudi_arabia
Senegal senegal
Serbia serbia
Seychelles seychelles
Sierra Leone sierra_leone
Singapore singapore
Slovenia slovenia
Solomon Islands solomon_islands
Somalia somalia
South Georgia south_georgia
South Korea south_korea
Spain spain
Sri Lanka sri_lanka
St. Helena st_helena
Sudan sudan
Suriname suriname
Svalbard svalbard
Swaziland swaziland
Switzerland switzerland
Syria syria
Taiwan taiwan
Tajikistan tajikistan
Tanzania tanzania
Togo togo
Tokelau tokelau
Tonga tonga
Tunisia tunisia
Turkey turkey
Turkmenistan turkmenistan
Turks and Caicos Islands turks_and_caicos_islands
Tuvalu tuvalu
Uganda uganda
United Arab Emirates united_arab_emirates
United Kingdom united_kingdom

263 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
USA usa
Uruguay uruguay
Uzbekistan uzbekistan
Vanuatu vanuatu
Venezuela venezuela
Vietnam vietnam
West Bank west_bank
Western Sahara western_sahara
Yemen yemen
Zambia zambia
Zimbabwe zimbabwe
Georgia georgia
Grenada grenada
Guinea-Bissau guinea_bissau
Heard Island and McDonald Islands heard_island_and_mcdonald_islands
Israel israel
Kazakhstan kazakhstan
Lesotho lesotho
Luxembourg luxembourg
Malaysia malaysia
Malta malta
Mauritius mauritius
Micronesia - Federated States of micronesia_federated_states_of
Nepal nepal
Netherlands Antilles netherlands_antilles
North Korea north_korea
Pakistan pakistan
Paraguay paraguay
Portugal portugal
Saint Kitts and Nevis saint_kitts_and_nevis
Saint Vincent and the Grenadines saint_vincent_and_the_grenadines
Slovakia slovakia
South Africa south_africa
St. Pierre and Miquelon st_pierre_and_miquelon
Sweden sweden
Thailand thailand
Trinidad and Tobago trinidad_and_tobago
Ukraine ukraine
United States Virgin Islands united_states_virgin_islands
Wallis and Futuna wallis_and_futuna

264 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
8. Appendix B States

This appendix show the list of states with their system ids:

State System ID
Alabama AL
Alaska AK
Alberta AB
Arizona AZ
Arkansas AR
Armed Forces Americas AA
Armed Forces Other AE
Armed Forces Pacific AP
British Columbia BC
California CA
Colorado CO
Connecticut CT
Delaware DE
District of Columbia DC
Florida FL
Georgia GA
Hawaii HI
Idaho ID
Illinois IL
Indiana IN
Iowa IA
Kansas KS
Kentucky KY
Louisiana LA
Maine ME
Manitoba MB
Maryland MD
Massachusetts MA
Michigan MI
Mississippi MS
Minnesota MN
Missouri MO
Montana MT

265 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Nebraska NE
Nevada NV
New Brunswick NB
New Hampshire NH
New Jersey NJ
New Mexico NM
New York NY
Newfoundland NL
North Carolina NC
North Dakota ND
Northwest Territories NT
Nova Scotia NS
Ohio OH
Oklahoma OK
Ontario ON
Oregon OR
Pennsylvania PA
Prince Edward Island PE
Puerto Rico PR
Quebec QC
Rhode Island RI
Saskatchewan SK
South Carolina SC
South Dakota SD
Tennessee TN
Texas TX
Utah UT
Vermont VT
Virgin Islands VI
Virginia VA
Washington WA
West Virginia WV
Wisconsin WI
Wyoming WY
Yukon YT
Nunavut NU
Labrador NF

266 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
9. Appendix C Custom Field Types

This appendix show the list of Custom Field Types which can be created via WorkFlow REST API:

Custom Field Type System ID


Autocomplete 35
Checkbox 8
Constant 20
Currency 33
Date 3
Date and Time 16
Decimal Number 18
Email 11
Large Text 5
Multiple Autocomplete 36
Multiple Choice Pick Up List 9
Number 2
Percent 19
Pick List 6
Radio Button 7
Rich Text Editor 28
Text 1
Url 10

267 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
10. Appendix D Error Codes

This appendix shows the list of error codes that can be returned via ErrorBean:

Error Code Description


BAD_DATE_FORMAT Submitted date value is not in the right format.
BAD_DATE_TIME_FORMAT Submitted date time value is not in the right format.
CASES_ALREADY_RELATED Two cases are already related.
CASES_NOT_RELATED Two cases are not related.
CONSTRAINT_DELETE_VIOLATIONS Resource (entity) cannot be deleted because of
delete constraint.
CONSTRAINT_NOT_UNIQUE_VIOLATION Sent resources (entitys) property must be unique.
CONSTRAINT_VIOLATIONS Specified action is trying to violate existing
constraints.
CUSTOM_FIELD_REQUIRED Custom Field which is required to be submitted on
action form is not sent.
CUSTOM_FIELD_VALUE_DOES_NOT_EXIST Non existing predefined value is submitted.
CUSTOM_FIELD_VALUE_NOT_VALID Custom Field value is not valid. (E.g. text value
thousand is sent for decimal field type.)
CUSTOM_TABLE_OPERATIONS_FAILED Custom table operation not completed. (adding a
new row, retrieving values etc.)
FILE_NOT_UPLOADED File upload was not successful.
FILE_TOO_LARGE Uploaded file is larger than it is allowed.
ILLEGAL_ACCESS User does not have a permission to perform the
specific call.
ILLEGAL_FILE_EXTENSION Uploaded file does not have required type.
ILLEGAL_QUERY Query contains illegal words.
IMPORT_FAILED Custom table import failed.
INVALID_ACTION_ARGUMENT Executing action failed.
INVALID_SYSTEM_ID Field with specified System ID does not exist.
LENGTH_GREATER_THAN_MAXIMUM Submitted Custom Field value is larger than
maximum value for that Custom Field.
LENGTH_LESS_THAN_MINUMUM Submitted Custom Field value is less than mimimun
value for that Custom Field.

268 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
PERMISSION_DENIED User does not have a permission to perform
requested action.
PROPERTY_NULL Beans property is not submitted or has null value.
QUERY_NOT_EXECUTED Query execution failed.
RESOURCE_ALREADY_EXISTS The same resource (entity) is already created.
RESOURCE_NOT_FOUND Requested resource (entity) does not exist.

269 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
11. Appendix E - WorkFlow API Overview

1. Account
Resource: Account Main path: /accounts

HTTP PATH DESCRIPTION CONSUMES INPUT PRODUCES OUTPUT


METHOD HTTP STATUS BODY
1. GET /accounts/{system_id} Returns the account with specified system id. application/json 200 OK AccountBean
404 Not Found
2. POST /accounts Creates an account based on received AccountBean. application/json AccountBean application/json 201 Created AccountBean
400 Bad Request
3. PUT /accounts Updates the account based on received AccountBean. application/json AccountBean application/json 200 OK AccountBean
404 Not Found
4. DELETE /accounts/{system_id} Deletes the account with specified system id. application/json 200 OK
304 Not Modified
404 Not Found
5. GET /accounts Search accounts based on set query parameters. application/json Query parameters. application/json 200 OK List of AccountBean objects.
Returns a list of accounts which satisfy search criteria.
Custom Fields
6. GET /accounts/{system_id}/custom_fields/{custom_field_system_id} Returns specified custom field with its value which is application/json 200 OK CustomFieldBean
set for specified account. 404 Not Found
7. POST /accounts/{system_id}/custom_fields Sets custom field value to specified account based on application/json CustomFieldBean application/json 200 OK AccountBean
received CustomFieldBean. 404 Not Found
8. PUT /accounts/{system_id}/custom_fields Updates custom field value in specified account based application/json CustomFieldBean application/json 200 OK AccountBean
on received CustomFieldBean. 404 Not Found
9. DELETE /accounts/{system_id}/custom_fields/{custom_field_system_id} Deletes the value of specified custom field for application/json 200 OK
specified account. 404 Not Found

2. Case
Resource: Case Main path: /cases

HTTP PATH DESCRIPTION CONSUMES INPUT PRODUCES OUTPUT


METHOD HTTP STATUS BODY
1. GET /cases/{system_id} Returns the case with specified system id. application/json 200 OK CaseBean
404 Not Found
2. POST /cases Creates a case based on received CaseBean. application/json CaseBean application/json 201 Created CaseBean
404 Not Found
3. POST /cases/user/{user_system_id} Creates a case based on received CaseBean. Cases application/json CaseBean application/json 201 Created CaseBean
creator is user with system id user_system_id. 404 Not Found
4. PUT /cases Updates the case based on received CaseBean. application/json CaseBean application/json 200 OK CaseBean
404 Not Found
270
5. CallidusCloud
PUT WorkFlow
/cases/user/{user_system_id} Updates
2013 Callidus Software Inc. All Rights the case based on received CaseBean. Cases
Reserved. application/json CaseBean application/json 200 OK CaseBean
updater is user with system id user_system_id. 404 Not Found
6. DELETE /cases/{system_id} Deletes the case with specified system id. application/json 200 OK
304 Not Modified
404 Not Found
7. DELETE /cases/{system_id}/delete_with_related Deletes the case with specified system id and deletes application/json 200 OK
its related to cases (cases for which case with system 304 Not Modified
id system_id is their parent). 404 Not Found
8. GET /cases Search cases based on set query parameters. Returns application/json Query parameters. application/json 200 OK List of CaseBean objects.
a list of cases which satisfy search criteria.
9. PUT /cases/{system_id}/close Closes the case with specified system id. 200 OK
304 Not Modified
404 Not Found
10. PUT /cases/{system_id}/close_with_related Closes the case with specified system id and closes its 200 OK
related to cases (cases for which case with system id 304 Not Modified
system_id is their parent). 404 Not Found
Bulk Cases
11. POST /cases/create_bulk Creates a list of cases based on received list of application/json List of CaseBean objects. application/json 201 Created ResultBean
CaseBean objects. 404 Not Found

12. PUT /cases/update_bulk Updates a list of cases based on received list of application/json List of CaseBean objects. application/json 200 OK ResultBean
CaseBean objects. 404 Not Found

Case Lists
13. GET /cases/list/{system_id} Returns cases which belong to list with specified application/json 200 OK List of CaseBean objects.
system id. 404 Not Found
14. GET /cases/smart_list/{system_id} Returns cases which belong to smart list with application/json 200 OK List of CaseBean objects.
specified system id. 404 Not Found
System Case Lists
15. GET /cases/system_list/creator Returns a list of cases in which user performing the application/json 200 OK List of CaseBean objects.
REST call is the creator.
16. GET /cases/system_list/creator/{user_system_id} Returns a list of cases in which user with specified application/json 200 OK List of CaseBean objects.
system id is the creator. 404 Not Found
17. GET /cases/system_list/assignee Returns a list of cases in which user performing the application/json 200 OK List of CaseBean objects.
REST call is the assignee.
18. GET /cases/system_list/assignee/{user_system_id} Returns a list of cases in which user with specified application/json 200 OK List of CaseBean objects.
system id is the assignee. 404 Not Found
19. GET /cases/system_list/owner Returns a list of cases in which user performing the application/json 200 OK List of CaseBean objects.
REST call is the owner.
20. GET /cases/system_list/owner/{user_system_id} Returns a list of cases in which user with specified application/json 200 OK List of CaseBean objects.
system id is the owner. 404 Not Found
21. GET /cases/system_list/referral Returns a list of cases in which user performing the application/json 200 OK List of CaseBean objects.
REST call is the referral.
22. GET /cases/system_list/referral/{user_system_id} Returns a list of cases in which user with specified application/json 200 OK List of CaseBean objects.
system id is the referral. 404 Not Found
23. GET /cases/system_list/follower Returns a list of cases in which user performing the application/json 200 OK List of CaseBean objects.
REST call is the follower.
24. GET /cases/system_list/follower/{user_system_id} Returns a list of cases in which user with specified application/json 200 OK List of CaseBean objects.
system id is the follower. 404 Not Found

25. GET /cases/system_list/team_member Returns a list of cases in which user performing the application/json 200 OK List of CaseBean objects.
REST call is the team member. 404 Not Found
26. GET /cases/system_list/team_member/{user_system_id} Returns a list of cases in which user with specified application/json 200 OK List of CaseBean objects.
system id is the team member. 404 Not Found
Related Cases
27. GET /cases/{system_id}/related_cases Returns a list of related cases for case with specified application/json 200 OK List of CaseBean objects.
system id. 404 Not Found
28. GET /cases/{system_id}/related_cases/inverse Returns a list of all cases from which case with application/json 200 OK List of CaseBean objects.
specified system id is related. 404 Not Found
29. PUT /cases/{system_id}/related_cases/{related_system_id} Creates a relation between two existing cases. To application/json 200 OK
case with system id "system_id" sets related case 400 Bad Request
with system id "related_system_id". 404 Not Found
30. DELETE /cases/{system_id}/related_cases/{related_system_id} Deletes the relation between case with system id application/json 200 OK
"system_id" and its related case with system id 400 Bad Request
"related_system_id". 404 Not Found
Custom Fields
31. GET /cases/{system_id}/custom_fields/{custom_field_system_id} Returns specified custom field with its value which is application/json 200 OK CustomFieldBean
set for specified case. 404 Not Found
32. POST /cases/{system_id}/custom_fields Sets custom field value in specified case based on application/json CustomFieldBean application/json 200 OK CaseBean
received CustomFieldBean. 404 Not Found
33. PUT /cases/{system_id}/custom_fields Updates custom field value in specified case based on application/json CustomFieldBean application/json 200 OK CaseBean
received CustomFieldBean. 404 Not Found
34. DELETE /cases/{system_id}/custom_fields/{custom_field_system_id} Deletes the value of specified custom field in application/json 200 OK
specified case. 404 Not Found
Attachments
35. GET /cases/{system_id}/attachments Returns a list of attachments from specified case application/json 200 OK List of AttachmentBean objects.
which user who is performing a REST call has 404 Not Found
permission to see.
36. GET /cases/{system_id}/attachments/{attachment_system_id} Returns attached file with specified application/octet- 200 OK Attached file.
attachment_system_id from case with system id stream 400 Bad Request
system_id. 403 Forbidden
404 Not Found
37. POST /cases/{system_id}/attachments Uploads attachment to specified case. multipart/form-data Form parameters application/json 201 OK AttachmentBean
400 Bad Request
404 Not Found
38. DELETE /cases/{system_id}/attachments/{attachment_system_id} Deletes the attachment with specified application/json 200 OK
attachment_system_id which is associated with 400 Bad Request
specified system id. 403 Forbidden
404 Not Found
Comments
39. GET /cases/{system_id}/comments Returns a list of comments from specified case which application/json 200 OK List of CommentBean objects.
user who is performing a REST call has permission to 404 Not Found
see.
40. GET /cases/{system_id}/comments/{comment_system_id} Returns comment with specified comment_system_id application/json 200 OK CommentBean
from case with specified system id. 400 Bad Request
271 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved. 403 Forbidden
404 Not Found
41. POST /cases/{system_id}/comments 3. Creates a comment based on received application/json CommentBean application/json 201 OK CommentBean
CommentBean in case with specified system 403 Forbidden
id. 404 Not Found
4. Creates a reply to comment with system id
parent_system_id if parent_system_id is
sent via CommentBean.
42. PUT /cases/{system_id}/comments/{comment_system_id} Updates a comment based on received application/json CommentBean application/json 200 OK CommentBean
CommentBean in case with specified system id. 400 Bad Request
403 Forbidden
404 Not Found
43. DELETE /cases/{system_id}/comments/{comment_system_id} Deletes a comment with specified application/json 200 OK
comment_system_id in case with specified system id. 400 Bad Request
403 Forbidden
404 Not Found
Actions
44. GET /cases/{system_id}/actions Returns all actions which user who is performing REST application/json 200 OK List of ActionBean objects.
call can execute in specified case. 404 Not Found
45. GET /cases/{system_id}/actions/{user_system_id} Returns all actions which specified user can execute in application/json 200 OK List of ActionBean objects.
specified case. 404 Not Found
46. PUT /cases/{system_id}/actions/{action_system_id} Executes specified action in specified case. (Attach file application/json ActionParamsBean application/json 200 OK CaseBean
action has its own method.) 400 Bad Request
403 Forbidden
404 Not Found
47. PUT /cases/{system_id}/actions/{action_system_id}/{user_system_id} Executes specified action in specified case as specified application/json ActionParamsBean application/json 200 OK CaseBean
user. (Attach file action has its own method.) 400 Bad Request
403 Forbidden
404 Not Found
48. POST /cases/{system_id}/actions/{action_system_id} Executes specified Attach File action in specified case. multipart/form-data Form parameters. application/json 200 OK CaseBean
400 Bad Request
403 Forbidden
404 Not Found
49. POST /cases/{system_id}/actions/{action_system_id}/{user_system_id} Executes specified Attach File action in specified case multipart/form-data Form parameters. application/json 200 OK CaseBean
as specified user. 400 Bad Request
403 Forbidden
404 Not Found
3. Case Type
Resource: Case Type Main path: /case_types

Methods:

HTTP PATH DESCRIPTION CONSUMES INPUT PRODUCES OUTPUT


METHOD HTTP STATUS BODY
1. GET /case_types/{system_id} Returns case type with specified system id. application/json 200 OK CaseTypeBean
404 Not Found
2. GET /case_types Search case types based on set query parameters. application/json Query parameters. application/json 200 OK List of CaseTypeBean objects.
Returns a list of case types which satisfy search
criteria.
3. GET /case_types/{system_id}/statuses Returns statuses associated with specified case type. application/json 200 OK List of StatusBean objects.
404 Not Found
4. GET /case_types/{system_id}/statuses/{status_system_id}/actions Returns actions in specified status for specified case application/json List of ActionBean objects.
type.

4. Company
Resource: Company Main path: /companies

HTTP PATH DESCRIPTION CONSUMES INPUT PRODUCES OUTPUT


METHOD HTTP STATUS BODY
1. GET /companies/{system_id} Returns company with specified system id. application/json 200 OK CompanyBean
404 Not Found
2. POST /companies Creates a company based on received CompanyBean. application/json CompanyBean application/json 201 Created CompanyBean
400 Bad Request
3. PUT /companies Updates the company based on received application/json CompanyBean application/json 200 OK CompanyBean
CompanyBean. 404 Not Found
4. DELETE /companies/{system_id} Deletes the company with specified system id. application/json 200 OK
304 Not Modified
404 Not Found
5. GET /companies Search companies based on set query parameters. application/json Query parameters. application/json 200 OK List of CompanyBean objects.
Returns a list of companies which satisfy search
criteria.

5. Contact
Resource: Contact Main path: /contact

HTTP PATH DESCRIPTION CONSUMES INPUT PRODUCES OUTPUT


METHOD HTTP STATUS BODY
1. GET /contacts/{system_id} Returns contact with specified system id. application/json 200 OK ContactBean
272 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved. 404 Not Found
2. POST /contacts Creates a contact based on received ContactBean. application/json ContactBean application/json 201 Created ContactBean
400 Bad Request
3. PUT /contacts Updates the contact based on received ContactBean. application/json ContactBean application/json 200 OK ContactBean
404 Not Found
4. DELETE /contacts/{system_id} Deletes the contact with specified system id. application/json 200 OK
304 Not Modified
404 Not Found
5. GET /contacts Search contacts based on set query parameters. application/json Query parameters. application/json 200 OK List of ContactBean objects.
Returns a list of contacts which satisfy search criteria.
Custom Fields
6. GET /contacts/{system_id}/custom_fields/{custom_field_system_id} Returns specified custom field with its value which is application/json 200 OK CustomFieldBean
set for specified contact. 404 Not Found
7. POST /contacts/{system_id}/custom_fields Sets custom field value to specified contact based on application/json CustomFieldBean application/json 200 OK ContactBean
received CustomFieldBean. 404 Not Found
8. PUT /contacts/{system_id}/custom_fields Updates custom field value in specified contact based application/json CustomFieldBean application/json 200 OK ContactBean
on received CustomFieldBean. 404 Not Found
9. DELETE /contacts/{system_id}/custom_fields/{custom_field_system_id} Deletes the value of specified custom field for application/json 200 OK
specified contact. 404 Not Found

6. Custom Field
Resource: Custom Field Main path: /custom_fields

HTTP PATH DESCRIPTION CONSUMES INPUT PRODUCES OUTPUT


METHOD HTTP STATUS BODY
1. GET /custom_fields/{system_id} Returns custom field with specified system id. application/json 200 OK CustomFieldBean
404 Not Found
2. POST /custom_fields Creates a custom field based on received application/json CustomFieldBean application/json 201 Created CustomFieldBean
CustomFieldBean. 400 Bad Request
3. PUT /custom_fields Updates the custom field based on received application/json CustomFieldBean application/json 200 OK CompanyBean
CustomFieldBean. 404 Not Found
4. DELETE /custom_fields/{system_id} Deletes the custom field with specified system id. application/json 200 OK
304 Not Modified
404 Not Found
5. GET /custom_fields Search custom fields based on set query parameters. application/json Query parameters. application/json 200 OK List of CustomFieldBean objects.
Returns a list of custom fields which satisfy search
criteria.
7. Custom Table
Resource: Custom Table Main path: /custom_tables

HTTP PATH DESCRIPTION CONSUMES INPUT PRODUCES OUTPUT


METHOD HTTP STATUS BODY
1. GET /custom_tables/{system_id} Returns custom table with specified system id. application/json 200 OK CustomTableBean
404 Not Found
2. POST /custom_tables Creates a custom table based on received application/json CustomTableBean application/json 201 Created CustomTableBean
CustomTableBean. 400 Bad Request
3. DELETE /custom_tables/{system_id} Deletes the custom table with specified system id. CustomTableBean application/json 200 OK
304 Not Modified
404 Not Found
4. GET /custom_tables Search custom tables based on set query parameters. application/json application/json 200 OK List of CustomTableBean objects.
Returns a list of custom tables which satisfy search
criteria.
5. POST /custom_tables/{system_id}/column/{column_name} Adds a column with specified name into specified application/json Query parameters. application/json 200 OK CustomTableBean
custom table. 400 Bad Request
404 Not Found
6. GET /custom_tables/{system_id}/rows Returns rows from specified custom table. application/json 200 OK CustomTableBean with row values.
400 Bad Request
404 Not Found
7. GET /custom_tables/{system_id}/rows/{oid} Returns row with specified oid (object id) from application/json 200 OK
specified custom table. 400 Bad Request
404 Not Found
8. POST /custom_tables/{system_id}/rows Adds one row in specified custom table based on application/json CustomTableBean application/json 201 Created CustomFieldBean with added row.
received row in CustomTableBean. with one row. 400 Bad Request
404 Not Found
9. PUT /custom_tables/{system_id}/rows Updates the row in specified custom table based on application/json CustomTableBean application/json 201 Created CustomFieldBean with updated
received row in CustomTableBean. with one row. 400 Bad Request row.
404 Not Found
10. DELETE /custom_tables/{system_id}/rows/{oid} Deletes the row with specified oid in specified custom application/json 200 OK
table. 400 Bad Request
404 Not Found
Executing queries
11. PUT /custom_tables/query/select Executes select query sent via QueryBean and returns application/json QueryBean application/json 200 OK QueryResultBean
rows from custom table. 400 Bad Request
12. POST /custom_tables/query/insert Inserts data into custom table based on sent query in application/json QueryBean application/json 200 OK QueryResultBean
QueryBean. 400 Bad Request
13. PUT /custom_tables/query/update Updates data in custom table based on sent query in application/json QueryBean application/json 200 OK QueryResultBean
QueryBean. 400 Bad Request
14. PUT /custom_tables/query/delete Deletes data in custom table based on sent query in application/json QueryBean application/json 200 OK QueryResultBean
QueryBean. 400 Bad Request
Import
15. POST /custom_tables/import/new_table Creates a new custom table with rows from uploaded multipart/form-data CSV file application/json 201 Created CustomTableBean with import
csv file. 400 Bad Request report (without rows)
16. POST /custom_tables/{system_id}/import/new_rows Updates rows in specified custom table from multipart/form-data CSV file application/json 200 OK CustomTableBean with import
273 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
uploaded csv file. 400 Bad Request report (without rows)
404 Not Found
Export
17. PUT /custom_tables/export/query_to_csv Exports rows from custom table to CSV file based on application/json QueryBean application/octet- 200 OK
received SELECT query in QueryBean. stream 400 Bad Request

8. Department
Resource: Department Main path: /departments

HTTP PATH DESCRIPTION CONSUMES INPUT PRODUCES OUTPUT


METHOD HTTP STATUS BODY
1. GET /departments/{system_id} Returns department with specified system id. application/json 200 OK DepartmentBean
404 Not Found
2. POST /departments Creates a department based on received application/json CustomFieldBean application/json 201 Created DepartmentBean
DepartmentBean. 400 Bad Request
3. PUT /departments Updates the department based on received application/json CustomFieldBean application/json 200 OK CompanyBean
DepartmentBean. 404 Not Found
4. DELETE /departments/{system_id} Deletes the department with specified system id. application/json 200 OK
304 Not Modified
404 Not Found
5. GET /departments Search departments based on set query parameters. application/json Query parameters. application/json 200 OK List of DepartmentBean objects.
Returns a list of departments which satisfy search
criteria.

9. Message
Resource: Message Main path: /messages

HTTP PATH DESCRIPTION CONSUMES INPUT PRODUCES OUTPUT


METHOD HTTP STATUS BODY
1. GET /messages/{system_id} Returns message with specified system id. application/json 200 OK MessageBean
404 Not Found
2. DELETE /messages/{system_id} Deletes the message with specified system id. application/json 200 OK
304 Not Modified
404 Not Found
3. GET /messages/user/{system_id}/unread Search unread messages for specified user based on application/json Query parameters. application/json 200 OK List of MessageBean objects.
set query parameters. Returns a list of unread 404 Not Found
messages which satisfy search criteria.
4. GET /messages/user/{system_id}/unread_and_mark_as_read Search unread messages for specified user based on application/json Query parameters. application/json 200 OK List of MessageBean objects.
set query parameters. Returns a list of unread 404 Not Found
messages which satisfy search criteria and marks
returned messages as read.
5. GET /messages/user/{system_id}/total_unread Returns the number of unread messages for specified application/json application/json 200 OK TotalBean with number of
user. 404 Not Found messages.

10.Project
Resource: Project Main path: /projects

HTTP PATH DESCRIPTION CONSUMES INPUT PRODUCES OUTPUT


METHOD HTTP STATUS BODY
1. GET /projects/{system_id} Returns project with specified system id. application/json 200 OK ProjectBean
404 Not Found
2. POST /projects Creates a project based on received ProjectBean. application/json ProjectBean application/json 201 Created ProjectBean
400 Bad Request
3. PUT /projects Updates the project based on received ProjectBean. application/json ProjectBean application/json 200 OK ProjectBean
404 Not Found
4. DELETE /projects/{system_id} Deletes the project with specified system id. application/json 200 OK
304 Not Modified
404 Not Found
5. GET /projects Search projects based on set query parameters. application/json Query parameters. application/json 200 OK List of ProjectBean objects.
Returns a list of projects which satisfy search criteria.
Custom Fields
6. GET /projects/{system_id}/custom_fields/{custom_field_system_id} Returns specified custom field with its value which is application/json 200 OK CustomFieldBean
set for specified project. 404 Not Found
7. POST /projects/{system_id}/custom_fields Sets custom field value to specified project based on application/json CustomFieldBean application/json 200 OK ProjectBean
received CustomFieldBean. 404 Not Found
8. PUT /projects/{system_id}/custom_fields Updates custom field value in specified project based application/json CustomFieldBean application/json 200 OK ProjectBean
on received CustomFieldBean. 404 Not Found
9. DELETE /projects/{system_id}/custom_fields/{custom_field_system_id} Deletes the value of specified custom field for application/json 200 OK
specified project. 404 Not Found

11.User
Resource: User Main path: /users

HTTP PATH DESCRIPTION CONSUMES INPUT PRODUCES OUTPUT


METHOD HTTP STATUS BODY
1. GET /users/{system_id} Returns user with specified system id. application/json 200 OK UserBean
404 Not Found
2. POST /users Creates a user based on received UserBean. application/json UserBean application/json 201 Created UserBean
400 Bad Request
3. PUT /users Updates the user based on received UserBean. application/json UserBean application/json 200 OK ProjectBean
404 Not Found
4. DELETE /users/{system_id} Deletes the user with specified system id. application/json 200 OK
274 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved. 304 Not Modified
404 Not Found
5. GET /users Search users based on set query parameters. Returns application/json Query parameters. application/json 200 OK List of UserBean objects.
a list of users which satisfy search criteria.
Bulk Users
6. POST /users/create_bulk Creates a list of users based on received list of application/json List of UserBean application/json 201 Created ResultBean
CaseBean objects. objects. 400 Bad Request
7. PUT /users/update_bulk Update a list of users based on received list of application/json List of UserBean application/json 200 OK ResultBean
CaseBean objects. objects. 404 Not Found
Custom Fields
8. GET /users/{system_id}/custom_fields/{custom_field_system_id} Returns specified custom field with its value which is application/json 200 OK CustomFieldBean
set for specified user. 404 Not Found
9. POST /users/{system_id}/custom_fields Sets custom field value to specified user based on application/json CustomFieldBean application/json 200 OK UserBean
received CustomFieldBean. 404 Not Found
10. PUT /users/{system_id}/custom_fields Updates custom field value for specified user based application/json CustomFieldBean application/json 200 OK UserBean
on received CustomFieldBean. 404 Not Found
11. DELETE /users/{system_id}/custom_fields/{custom_field_system_id} Deletes the value of specified custom field for application/json 200 OK
specified user. 404 Not Found

12.User Type
Resource: User Type Main path: /user_types

HTTP PATH DESCRIPTION CONSUMES INPUT PRODUCES OUTPUT


METHOD HTTP STATUS BODY
1. GET /user_types/{system_id} Returns user type with specified system id. application/json 200 OK UserTypeBean
404 Not Found
2. POST /user_types Creates a user type based on received UserTypeBean. application/json UserTypeBean application/json 201 Created UserTypeBean
400 Bad Request
3. PUT /user_types Updates the user type based on received application/json UserTypeBean application/json 200 OK CompanyBean
UserTypeBean. 404 Not Found
4. DELETE /user_types/{system_id} Deletes the user type with specified system id. application/json 200 OK
304 Not Modified
404 Not Found
5. GET /user_types Search user types based on set query parameters. application/json Query parameters. application/json 200 OK List of UserTypeBean objects.
Returns a list of user types which satisfy search
criteria.

You might also like