createItem (String itemTypeId, HashMap fieldValues)
createItem (String itemTypeId, String ownerCustomerId, HashMap fieldValues)
This API enters a new Configuration Item (CI). Enter the Item Type ID, a Customer ID, and a set of Item Type field values.
The fieldValues HashMap is a Map of Strings to Strings. The keys represent Service desk data fields called custom1 through to custom20. These map to the category field definitions within the CMS. Other keys include itemNumber which allow the item to be created with a given item number (provided the Edit Item Numbers admin privilege is enabled).
The following are the input parameters for this API:
itemNumber: The unique Item number.
This API returns a HashMap containing the Configuration Item ID and a success or failure message.
deleteItem (String itemNumber)
This API flags an Item as deleted so that it is no longer available for new requests.
The following are the input parameters for this API:
itemNumber: The unique Item number.
None
undeleteItem (String itemNumber)
This API re-instates a previously deleted Item so that it is available for all future requests.
The following are the input parameters for this API:
itemNumber: The unique Item number.
None
updateItem (String itemNumber, HashMap fieldValues)
This API updates the Item with new field values from the supplied hash map.
The fieldValues HashMap is a map of Strings to Strings. The keys represent Service desk data fields called custom1 through to custom20. Other keys include itemstatus and itemNumber for changes to the item status and item number fields respectively. These map to the Category field definitions within the CMDB.
The following are the input parameters for this API:
itemNumber: The unique Item number.
fieldValues: A HashMap of field values for this Item.
None
getItems ()getItems (String customerId)
getItems (String customerId, String pageNdx)
getItems (String customerId, String itemNumber, HashMap fieldValues)
This API returns a list of the item numbers that are either global or owned by the logged in Customer (or the Customer specified if using the customerId function). The response is in the form of a HashMap that uses the list of Item Numbers as field names. Each field has as its value a String containing the name of the Item Type that the Item represents.
In the event that no Items are found for the logged in Customer, only the ‘message’ field will be present and will contain a text message explaining that no Items were found.
The following are the input parameters for this API:
customerId: The unique Customer Id.
itemNumber: The unique Item Number to retrieve. If this value is set, then fieldValues will be ignored.
fieldValues: A hash map of field names and values used to search for an appropriate CI. This will be ignored if the Item Number has already been set.
The return value of this API is a HashMap containing a list of string values detailing the Item Number(s) and description(s). This returns the first 100 items. Use getItems(customerId, pageNdx) to page through larger result sets.
getAllItems (String pageNdx)
This API returns a list of Item Numbers for all the Items in the system. A page index is required to specify the page required. Each page contains 100 entries, ordered by Item Number.
The following are the input parameters for this API:
pageNdx: The page index returns 100 entries ordered by Item Number.
The return value of this API is a HashMap that uses the list of Item Numbers as field names. Each field has as its value a String containing the name of the Item Type that the Item represents.
getSpecificItem (String itemNumber)
This API returns the Item Type of the specified item number. This API provide a quick means to verify that a certain Item Number is defined in the system, without requiring heavy data exchange of Item attributes.
The following are the input parameters for this API:
itemNumber: The unique Item number.
None
customerItems (String customerId, String pagesize, String pagenumber, String sortNdx)
customerItems (String pagesize, String pagenumber, String sortNdx)
This API returns a list of the item numbers that are either owned by the customer or are global.
The response is in the form of a HashMap that uses the list of item numbers as field names. Each field has as its value a String containing the name of the Item Type that the Item represents.In the argument (customerId) enter the ID of a Customer, this is assigned to the Customer when it is created via the createCustomer function.
The following are the input parameters for this API:
customerId: A unique customer ID.
pagesize: The maximum number of items that can be returned per query.
pagenumber: In situations where there are more items than can fit on a pagesize, this number specifies the next set of items to be retrieved.
sortNdx: The index of the column to sort on. The possible values for the parameter are:
1: Item Number
2: Item Category
3: Item Type
7: Item Status
8: Purchase Date
9: Incident Team
In Service Manager, you can also specify:
10: Problem Team
11: Change Team
12: Service Request Team
This API returns a HashMap containing a list of string values detailing the Item Number(s) and description(s), being the corresponding Item Types.
In the event that no Items are found for the Customer, only the message field will be present and will contain a text message explaining that no Items were found.
orgUnitItems (String orgUnitId, String pagesize, String pagenumber, String sortNdx)
orgUnitItems (String pagesize, String pagenumber, String sortNdx)
This API is used to search for Items owned by the logged in User’s Org Unit or the Org Unit ID specified.
The following are the input parameters for this API:
orgUnitId: A unique Org Unit ID.
pagesize: The maximum number of items that can be returned per query. The page size must be between 10 and 100.
pagenumber: In situations where there are more items than can fit on a pagesize, this number specifies the next set of items to be retrieved. The page number must be at least 0.
sortNdx: The index of the column to sort on. The possible values for the parameter are:
1: Item Number
2: Item Category
3: Item Type
7: Item Status
8: Purchase Date
9: Incident Team
In Service Manager, you can also specify:
11: Problem Team
12: Change Team
This API returns a HashMap containing of HashMaps. The keys of the first map are the Item Numbers. Each Item Number has its own HashMap representing the values that represent Item attributes as name-value pairs.
addItemOwner (String itemNumber, String username)
This API adds a new Customer from an Item with the specified item number.
The following are the input parameters for this API:
itemNumber: The unique Item number.
username The user name of the user who wants to add the item owner.
None
removeItemOwner (String itemNumber, String username)
This API removes an existing Customer from an Item with the specified item number.
The following are the input parameters for this API:
itemNumber: The unique Item number.
username The user name of the user who wants to remove the item owner.
None
getItemOwners (String itemNumber)
This API returns a list of all the owners of an item with the specified item number.
The following are the input parameters for this API:
itemNumber: The unique Item number.
This API returns a HashMap which contains another HashMap for each entry. The key of the first map is the Customer ID of the returned user, the HashMap for that entry contains four string fields representing the Customer’s Last Name, Org Unit, Primary E-mail Address and First Name. Global items will return a success response message.
getFieldsForItem (String itemNumber)
This API returns a list of all Configuration Item fields for the specified item number.
The following are the input parameters for this API:
itemNumber: The unique Item number.
This API returns two HashMaps, the first containing a list of CI field Ids, and the second containing the field values include the field name, whether the field is required, the data type, the field’s default value (if specified), and the field options if any are available.
getFieldsForItemType (String itemTypeId)
This API returns a list of all Configuration Item fields for the specified Item Type ID.
The following are the input parameters for this API:
itemTypeId: The unique Item type id.
This API returns two HashMaps, the first containing a list of CI field Ids, and the second containing the field values include the field name, whether the field is required, the data type, the field’s default value (if specified), and the field options if any are available.
getFieldsForRelatedItem (String itemNumber)
This API returns information on all relationships for the specified item number.
The following are the input parameters for this API:
itemNumber: The unique Item number.
This API returns a HashMap containing of HashMaps, the outer keyed on the Item Numbers – the HashMap for each Item contains data such as the related Item Number, Criticality, Type and how it’s related to the Item with the given itemNumber.
createManufacturer (String name)
This API creates a Manufacturer with the given name.
The following are the input parameters for this API:
name: The unique name of the Manufacturer to be created.
None
addItemNote(String itemNumber, String note)
This API adds a new note to an item with the give itemNumber.
The following are the input parameters for this API:
itemNumber: The unique Item Number of the Item to be retrieved.
note: The note contents
None
updateItemDescription(String itemNumber, String desc)
This API updates the description of an item with the given itemNumber. If the item does not have any description then it will add description to the item.
The following are the input parameters for this API:
itemNumber: The unique Item Number of the Item to be retrieved.
desc: The description of the contents
None
updateItemCost(String itemNumber, String cost)
This API updates the cost of an item with the given itemNumber. If the item does not have any cost then it will add cost to the item.
The following are the input parameters for this API:
itemNumber: The unique Item Number of the Item to be retrieved.
cost: The cost of the item to be updated
None
getItemCategories ()
This API returns a list of all the Configuration Item (CI) Categories defined in the system.
None
This API returns a HashMap containing a list of string values including the Category ID and the corresponding string value.
getItemTypesForCategory (String categoryId)
This API returns a list of all the Item Types that exist in the system for the specified Category ID.
The following are the input parameters for this API:
categoryId: The unique category Id for which item type has to be retrieved.
This API returns a HashMap containing a list of string values including the Item Type ID and the corresponding string value.
createItemType (String itemTypeName, String incidentTeamID, String problemTeamID, String changeTeamID, String requestTeamID, String manufacturerName, String categoryID)
This API creates an ItemType (product) based on the name, the provided support teams, the manufacturer (which will be created if it doesn’t exist) and the Category ID which is returned by getItemCategories().
The following are the input parameters for this API:
itemTypeName: A name for the Item Type
incidentTeamID: The default Incident Team Id for this Item Type
problemTeamID: The default Problem Team Id for this Item Type
changeTeamID: The default Change Team Id for this Item Type
requestTeamID: The default Service Request Team Id for this Item Type
manufacturerName:The name of Manufacturer (created if not available)
categoryId: The default categoryId to associate the new Item Type
None
getItemType (String itemTypeId)
This API returns item type details of the specified item type id. This API exists as a quick means to determine what category an item type is defined as.
The following are the input parameters for this API:
itemTypeId: The unique item type Id for which details have to be retrieved.
This API returns value is a HashMap containing the item type name and the category name.
getItemType (String itemTypeId)
This API returns item type details of the specified item type id. This API exists as a quick means to determine what category an item type is defined as.
The following are the input parameters for this API:
itemTypeId: The unique item type Id for which details have to be retrieved.
This API returns value is a HashMap containing the item type name and the category name.
getItemRelationshipTypes()
This API returns all the relationships, along with their class and a marker to denote inherited ownership.
None
The return value format is *RelationName [RelationClass] (the asterix will not be present if ownership is not inherited). The Key to the HashMap is the relationTypeId, which needs to be passed into the createItemRelationship() function (below).
createItemRelationship(String fromItemId, String toItemId, String relationTypeId)
This API is used to create a new relationship if it does not exist.
The following are the input parameters for this API:
fromItemId: The unique Id of the source Item to create a relationship with parent
toItemId: The unique Id of the child Item to create the relationship
relationTypeId: The Id returned by getItemRelationshipTypes() function signifying the type of relationship to create
None
deleteItemRelationship (String fromItemId, String toItemId, String relationTypeId)
This API is used to delete the relationship.
The following are the input parameters for this API:
fromItemId: The unique Id of the source Item
toItemId: The unique Id of the child Item
relationTypeId: The Id returned by getItemRelationshipTypes() function signifying the type of relationship
None
getItemRelationships (String itemNumber)
This API returns all the related items for the given itemNumber.
The following are the input parameters for this API:
itemNumber: The unique item number to identify the relationships for.
This API returns a HashMap containing the Item Number of the related Item and a Relationship ID.
getIncidentTeams()
This API returns the Teams for the Incident process (1000).
None
None
getProblemTeams()
This API returns the Teams for the Problem process (2000).
None
None
getChangeTeams()
This API returns the Teams for the Change process (3000).
None
None
getServiceRequestTeams()
This API returns the Teams for the Service Request process (7000).
None
None