Professional Documents
Culture Documents
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
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.
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.
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.
Example: For user with login name jsmith and WSToken 0mr3ot99LYMvit77J9sf
Authorization header will look like this:
Java code example for creating Authorization header looks like this:
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.
On example, Contact Bean has account attribute and when Contact is returned it contains all
information about contact and simplified account field representation.
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",
We can see that the complete AccountBean contains more than 10 attributes.
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,
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.
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"
}
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"
},
An example case search which returns all case attributes would look like this:
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:
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": [
{
{
"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."
]
}
{
"error_code": "CONSTRAINT_VIOLATIONS",
"error_messages": [
"CustomField label is required.",
"CustomField field type is required.",
"CustomField system id is required.",
"CustomField name is required."
]
}
For example:
CaseBean has created_on attribute. User performing REST API call has the following settings:
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.
GET /accounts/some_company_account
Response body:
{
"annual_revenue": 54321.35,
"annual_revenue_formatted": 54,321.35,
...
"employees": 10523,
"employees_formatted": 10,523,
...
}
CustomFieldBean has two attributes which are used to show the value of custom field:
- value - shows the value in default system format - MM/dd/yyyy HH:mm:ss (24h
notation)
{
"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"
}
For example, user John Smith uses 1.234,56 number format settings.
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.
Label SystemID
Blue bl
Red rd
Green grn
Yellow ylw
White wht
Black blk
{
"name": "Available colors",
"system_id": "available_colors",
"type_name": "Checkbox",
"type_system_id": 8,
"value": "Blue; Green; White",
"value_formatted": "Blue; Green; White"
}
{
"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"
}
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"
}
This table shows the formats of certain Custom Fields values by Field Type expected by WorkFlow API:
Request body:
{
"system_id": "day_went_live",
"value": "02.25.13"
}
{
"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)."
]
}
Request body:
{
"system_id": "day_went_live",
"value": "02/25/13"
}
{
...
"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"
}
Label SystemID
Blue bl
Red rd
Green grn
Yellow ylw
White wht
Black blk
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."
]
}
Request body:
{
"system_id": "available_colors",
"value": "bl, wht, ylw"
}
{
...
"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"
}
Label SystemID
Group 1 group_1
Group 2 group_2
Group 3 group_3
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."
]
}
Request body:
{
"system_id": "product_group",
"value": "group_2"
}
{
...
"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"
}
On example, Project Autocomplete has all projects available for selection. Selected projects system_id is
sent along with the system_id of selected project.
Request body:
{
"system_id": "project_auto",
"value": "some_non_existing_system_id"
}
{
"error_code": "CUSTOM_FIELD_VALUE_DOES_NOT_EXIST",
"error_messages": [
"'some_non_existing_system_id' is not valid value for Custom Field project auto."
]
}
Request body:
{
"system_id": "project_auto",
"value": "sp"
}
{
...
"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"
}
Custom Field values which are set through CustomFieldBean must meet specific requirements.
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:
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."
]
}
{
"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."
]
}
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.
Request body:
{
"system_id": "participate_in_event",
"value": "event_1, event_2, event_3"
}
{
"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."
]
}
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"
}
{
...
"case_key": "Task-sp-2",
...
"custom_fields": [
{
"name": "Participate In Event",
"system_id": "participate_in_event",
"type_name": "Checkbox",
AccountBean:
AddressBean:
CountryBean:
StateBean:
CustomFieldBean:
PredefinedValueBean:
ProjectBean:
PermissionBean:
UserBean
UserTypeBean
CompanyBean
StatusBean
ActionBean
MessageBean
CustomTableRowBean
CustomTableCellBean
TotalBean
QueryBean
CaseBean
AttachmentBean
CommentBean
ActionParamsBean
ResultBean
ErrorBean
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.
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.
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.
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.
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.
Methods:
8. Department
Resource: Department Main path: /departments
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.
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}
JSON example:
a) GET /accounts/some_company_account
{
"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"
}
{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Account does not exist."
]
}
2. POST /accounts
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"
},
{
{
"error_code": "CONSTRAINT_VIOLATIONS",
"error_messages": [
"Account name is required."
]
}
3. PUT /accounts
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"
}
5. GET /accounts
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:
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",
],
"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
}
6. GET /accounts/{system_id}/custom_fields/{custom_field_system_id}
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"
}
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": [
8. PUT /accounts/{system_id}/custom_fields
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",
9. DELETE /accounts/{system_id}/custom_fields/{custom_field_system_id}
1. GET /cases/{system_id}
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",
b) GET /cases/some_non_existing_case
{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Case does not exist."
]
}
2. POST /cases
JSON example:
a) POST /cases
{
"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",
{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Owner does not exist."
]
}
3. POST /cases/user/{user_system_id}
JSON example:
POST /cases/user/tsmith
{
"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"
}
}
4. PUT /cases
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
Request body:
{
"system_id": "Task-sp-3",
"case_type_system_id":
"Bug",
"description": "This case is created via REST API.",
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",
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
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"
}
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,
7. DELETE /cases/{system_id}/delete_with_related
JSON example:
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:
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",
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
}
Request example:
PUT /cases/Task-sp-3/close
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"
}]
},
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"
},
},
"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"
},
"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"
}
]
}
"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
}
]
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
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"
}],
{
"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"
},
JSON example:
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": {
b) GET /cases/list/some_non_existing_list
{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Case list does not exist."
]
}
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"
}
b) GET /cases/smart_list/some_non_existing_smart_list
{
"error_code": "RESOURCE_NOT_FOUND",
"error_messages": [
"Smart list does not exist."
]
}
JSON example:
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",
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"
}
}
],
Request example:
GET /cases/system_list/assignee?page=1&page_size=10
100 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
18. GET /cases/system_list/assignee/{user_system_id}
Request example:
GET /cases/system_list/assignee/tsmith?page=1&page_size=10
101 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
19. GET /cases/system_list/owner
Request example:
GET /cases/system_list/owner?page=1&page_size=10
Request example:
GET /cases/system_list/owner/tsmith?page=1&page_size=10
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.
Request example:
GET /cases/system_list/team_member/tsmith?page=1&page_size=10
104 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
page (Number)
page_size (Number)
105 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Request example:
GET /cases/system_list/referral?page=1&page_size=10
Request example:
GET /cases/system_list/referral/tsmith?page=1&page_size=10
106 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
25. GET /cases/system_list/follower
Request example:
GET /cases/system_list/follower?page=1&page_size=10
107 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
26. GET /cases/system_list/follower/{user_system_id}
Request example:
GET /cases/system_list/follower/tsmith?page=1&page_size=10
108 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
27. GET /cases/{system_id}/related_cases
JSON example:
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
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}
Request example:
PUT /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.
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
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"
}
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}
118 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
JSON example:
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).
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"
}
}
}
]
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"
}
}
}
]
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:
Response headers:
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."
]
}
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"
}
}
}
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"
}
}
}
JSON example:
DELETE /cases/Task-sp-1/attachments/29158
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
JSON example:
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).
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"
}
]
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"
}
]
JSON example:
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"
}
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."
]
}
JSON example:
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"
}
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"
}
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"
}
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"
}
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."
]
}
JSON example:
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"
}
}
}
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}
JSON example:
a) John wants to delete public his public comment with system_id 158868.
DELETE /cases/Task-sp-1/comments/158868
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
JSON example:
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}
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}
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
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
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
PUT /cases/Task-sp-2/actions/my_delete_action
Request body:
{}
Response:
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"
}
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:
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}
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
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.
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}
<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:
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"
}
<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}
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
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
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
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}
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
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
JSON example:
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}
182 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
5. GET /companies
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}
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
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"
}
187 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
3. PUT /contacts
JSON example:
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}
189 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
5. GET /contacts
JSON example:
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}
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
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
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}
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}
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
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"
}
{
"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
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}
199 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
5. GET /custom_fields
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}
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
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}
204 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
4. GET /custom_tables
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}
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
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}
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
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
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"
}
]
}
212 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
11. PUT /custom_tables/query/select
Example table:
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
}
214 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Example table:
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
}
215 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
13. PUT /custom_tables/query/update
Example table:
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:
Example table:
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
}
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
<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:
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
<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:
222 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
Example table myStores:
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
}
NAME,NUMBER_OF_STORES,LOCATION
USA,26,West Coast
Europe,42,Western Europe
Response headers:
223 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
8. Department
Resource: Department Main path: /departments
1. GET /departments/{system_id}
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
JSON example:
a) POST /departments
Request body:
{
"company_system_id": "my_company_inc",
"gate_keeper_system_id": "jsmith",
"name": "Accounting",
"system_id": "accounting"
}
{
"error_code": "CONSTRAINT_VIOLATIONS",
"error_messages": [
"Department name is required."
]
}
225 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
3. PUT /departments
JSON example:
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}
5. GET /departments
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}
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}
3. GET /messages/user/{system_id}/unread
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
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
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}
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
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"
}
{
"error_code": "CONSTRAINT_VIOLATIONS",
"error_messages": [
"Project name is required."
]
}
3. PUT /projects
JSON example:
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}
5. GET /projects
238 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
HTTP Status Code 200 OK
Body ResultBean with list of ProjectBeans.
JSON example:
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}
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
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
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}
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}
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
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"
}
}
{
"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
JSON example:
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}
248 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
5. GET /users
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)
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
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
}
]
}
7. PUT /users/update_bulk
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}
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
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
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}
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}
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
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"
}
255 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
3. PUT /user_types
JSON example:
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}
257 CallidusCloud WorkFlow 2013 Callidus Software Inc. All Rights Reserved.
5. GET /user_types
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:
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:
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
2. Case
Resource: Case Main path: /cases
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:
4. Company
Resource: Company Main path: /companies
5. Contact
Resource: Contact Main path: /contact
6. Custom Field
Resource: Custom Field Main path: /custom_fields
8. Department
Resource: Department Main path: /departments
9. Message
Resource: Message Main path: /messages
10.Project
Resource: Project Main path: /projects
11.User
Resource: User Main path: /users
12.User Type
Resource: User Type Main path: /user_types