Item API: Item Controller
The Item Controller APIs are used to view, add, update, or delete records and their attributes. The term "item" is another term for a record. Using the Item API, you can enter a specific item ID and retrieve or modify that particular record.
In addition, you can use the Item APIs to:
-
Retrieve attribute values
-
Import and export records
-
Promote records
-
Search for values
-
Manage workflow
-
Manage record validation
-
Generate variants
-
Event management
For more detailed information, see the Item API Endpoints section below or the EnterWorks Swagger pages.
Item API Endpoints
DELETE /api/items:
-
Deletes a list of items from the repository using a string of Item IDs (itemIdList).
POST /api/items:
-
Creates a new item in the specified repository (repositoryID).
-
Includes a parameter to scan the new value schema for invalid XML characters (true or false).
Note: Any values in the itemMap that the user does not have edit access to will be filtered out of the new items being created without notice.
POST /api/items/attrValueOptions:
-
Retrieves a list of available values for a specific attribute (attributeId) within a specified repository (repositoryId).
POST /api/items/attrValues:
-
Gets a list of available values for a dynamic attribute.
Deprecated. Use GET /api/items/attrValueOptions instead.
GET /api/items/auditHistories:
-
Retrieves a job listing from a specified repository (repositoryId).
-
Can use additional parameters to filter the listing, set the sort order of the results, apply a time frame, or choose a specific page of the results.
POST /api/items/clone:
-
Clones an existing item in a specified repository (repositoryId).
POST /api/items/commonData:
-
Returns any values that are shared by all items in the list submitted.
Note: Invalid IDs are not flagged and will be excluded from the comparison.
POST /api/items/count:
-
Retrieves the number of items in a repository that meet the search conditions.
Note: The getTotalInd parameter in the search conditions will be ignored.
DELETE /api/items/deleteAll:
-
Creates a job to delete items from the saved set and search configuration list.
Note: If both the savedSetId and searchConfigList parameters are specified, items have to be included in both the saved set and the configuration list to be deleted.
POST /api/items/excelWorkflowExport:
-
Send work item to an Excel workflow.
POST /api/items/export:
-
Creates a job to export items from a specified repository.
GET /api/items/export/fileFormats:
-
Retrieves a list of file formats available in a repository, such as .xls, .csv, or JSON.
GET /api/items/export/imageOptions:
-
Returns a hashmap of image options for export items.
POST /api/items/filters:
-
Retrieves item filters for the list under "Filter" on listing page.
-
Use this after the /api/repositories/{repositoryId}/filterAttrs call to retrieve a list of the filter attributes. Then pass only ONE attribute at a time in attributeIdList to get the count for that attribute value.
For example:
{ "repositoryId": 10016, "attributeIdList": {1009936} "filterHash": {"1019434": ["Black", "Blue"], "1009938": ["COLEMAN"]} }
POST /api/items/import:
-
Creates a job to import items into a repository.
POST /api/items/import/files:
-
Loads a file to import items into a repository.
Note: This call also returns a DSN ID (dsnId) that can be used to map columns using the /api/items/import/mappings call.
POST /api/items/import/mappings:
-
Retrieves column mappings for imported items using the DSN ID returned by the /api/items/import/files call.
Note: If the dsnId parameter is null or 0, then the sourceFileName value is used to locate the file. -
Use this call to create the initial set of mappings between source columns in the uploaded file and the repository attributes. Automatic mappings are created for exact name matches and "empty" mappings are applied for all other columns.
PATCH /api/items/moveItemToNode:
-
Manages assignment of a list of items to the specified hierarchy node (targetNode).
Note: To add, move, copy, delete nodes or items from nodes, use the targetNode parameter. The sourceNode parameter is used for copy and move operations.
POST /api/items/namedEvents:
-
Retrieves the item's named events based on the search conditions in the body parameter.
POST /api/items/promote:
-
Creates a job to promote items from the staging repository to the production repository.
POST /api/items/search:
-
Returns a list of items for the repository according to the specifications in the SearchParamDTO parameter.
-
If the includeCategoryAttributesInd parameter is set to "true", then the category attributes will be returned for all valid values in the nodeValue parameter.
Warning: If a user preference is specified, values for some attributes not included in the user preference are returned. This is temporary and will change in the future. Do NOT rely on the extra values. -
Invalid data may or may not be returned, depending on the user preference. If the user preference only contains snapshot attributes, then only valid data will be returned. Invalid data is data with the wrong data type or has an invalid code set code. Data that failed the validation rule is not considered invalid in this case.
PATCH /api/items/searchReplace:
-
Performs a search and replace on a specified list of items.
POST /api/items/sendToWorkFlow:
-
Sends a list of work items to a specified work flow.
PATCH /api/items/setRecordState:
-
Sets the record state on a list of items.
PATCH /api/items/setValidationLevel:
-
Sets the validation level on a list of items.
-
If the itemIdList parameter is empty, then the searchConfigId and savedSetId values will be used and a job will be created.
-
If the itemIdList parameter is not empty, it will be used and the item will be validated. No job will be created and the searchConfigId and savedSetId values will be ignored.
POST /api/items/templateImportStream:
-
Performs an import using a specified exchange template.
-
This is a streaming API where all record results are sent to a queue.
POST /api/items/templateSearch:
-
Searches for items based on a predefined Exchange template.
-
This is a streaming API where all record results are sent to a queue.
-
The template can be multi-repository.
GET /api/items/templateSearch/metadata:
-
Retrieves the metadata for an Exchange template.
-
This is a streaming API where all record results are sent to a queue.
-
The template can be multi-repository.
PATCH /api/items/updateAll:
-
Creates a job to patch items in the saved set and search configuration list.
-
If both the saved set and search configuration list are provided, items have to appear in both to be updated.
POST /api/items/validate:
-
Validates a list of specified items in a repository.
POST /api/items/validateAll:
-
Creates a job to validate all items in a specified repository.
POST /api/items/variants/generate:
-
Creates a job that generates variants for a specified list of items.
POST /api/items/variants/generateFromData:
-
Generates linked item variants based on the specified parent repository ID, ItemID, and data map.
GET /api/items/workFlowProperties:
-
Retrieves work item properties from a specified repository.
DELETE /api/items/{itemId}:
-
Deletes an item with the specified ID (itemID).
GET /api/items/{itemId}:
-
Retrieves an item with the specified ID (itemID).
-
In itemDataMap, only attributes with data will be returned. Required attributes, all dynamic attributes (where it applies), and attributes with custom rules will also be returned if they are empty.
-
All data will be returned as is, regardless of whether or not it is valid.
PATCH /api/items/{itemId}:
-
Updates an item with the specified ID (itemID).
POST /api/items/{itemId}/ItemsLinked:
-
Based on the search conditions, it retrieves the list of an item's linked items and validates them.
Note: In the returned object, the displayItemList.itmeId and displayItemList.itemDataMap values will be removed. Use the data in displayItemList.item instead.
PATCH /api/items/{itemId}/addItemToLink:
-
Links items to another item.
-
This also works for many-to-many links.
-
To link items to their parent item, the join attribute values are changed to match those of the parent item.
-
To link a parent item to a child item, the attribute values of the child item are changed to match the values of the parent item.
-
The values of the parent item are not changed.
POST /api/items/{itemId}/checkAttrOwnerEdit:
-
Check if user can edit an attribute in the specified item.
GET /api/items/{itemId}/historyDiff:
-
Retrieves the differences within the history of the specified item (itemId).
GET /api/items/{itemId}/imagePath:
-
Retrieves the primary image path for an item with the specified ID (itemId).
POST /api/items/{itemId}/itemHistories:
-
Retrieves the item history listing for a specified item (itemId).
POST /api/items/{itemId}/linkItems:
-
Creates a linked item through the link relation table on the item editor.
-
The master item must have at least one join key value.
-
You do not need edit access to the join attributes in order to create a linked item. Values in itemMapto which you do not have edit access will be filtered out automatically.
POST /api/items/{itemId}/linkedItems:
-
Retrieves a linked item list based on the search conditions for the specified items and validates them.
Note: In the returned object, the displayItemList.itmeId and displayItemList.itemDataMap values will be removed. Use the data in displayItemList.item instead.
POST /api/items/{itemId}/namedEvents:
-
Retrieves the named events for an item based on the search conditions specified.
PATCH /api/items/{itemId}/removeItemFromLink:
-
Removes items from a specified link (linkId).
PATCH /api/items/{itemId}/rollback:
-
Rolls back an item to a specified date (rollbackDate).
-
Leaving the rollbackDate null will rollback to the last change.
-
When rolling back a deleted item, the CREATION_DATETIME, CREATED_BY, LAST_UPDATE_DATETIME, LAST_UPDATE_BY, ATTR_LAST_UPDATE_DATETIME, and ATTR_LAST_UPDATE_BY values are not restored.
GET /api/items/{itemId}/securityContexts:
-
Retrieves a list of security contexts in the system.
GET /api/items/{itemId}/stageProdDiff:
-
Retrieves the differences between an item in staging and the same item in production.
GET /api/items/{itemId}/stageProdItem:
-
Retrieves the differences between an item in staging and the same item in production.
PATCH /api/items/{itemId}/variants/generate:
-
Generates variants for the specified item.
GET /api/namedEvents:
-
Retrieves a list of named events for a repository.
POST /api/namedEvents:
-
Creates a new named event.
Note: The name and effectiveDate values are required.
DELETE /api/namedEvents/{namedEventId}:
-
Deletes a named event based on the specified ID (namedEventId).
GET /api/namedEvents/{namedEventId}:
-
Retrieves a named event with the specified ID (namedEventId).
PUT /api/namedEvents/{namedEventId}:
-
Updates a named event with the specified ID (namedEventId).
-
This call only updates the namedEvent object but does not update the pending value nor pending items.
DELETE /api/namedEvents/{namedEventId}/details:
-
Deletes the details for the specified named events (namedEventId).
-
If filterIDlist is empty, all details for the event will be deleted.
GET /api/namedEvents/{namedEventId}/details:
-
Retrieves the details for the named event based on the specified named event ID (namedEventId).
POST /api/namedEvents/{namedEventId}/details:
-
Creates a new named event detail for each item in the itemIdList.
-
Use this endpoint to add an pending request item to a namedEvent or to add/change pending values on new/existing pending request.
Note: There is no PUT nor PATCH on this API. -
Use this endpoint to both create and edit the pending request. The detailId will change after each call.
Note: Do NOT cache the detailId in the caller. -
An item can be added to the namedEvent with or without any attribute change. Attribute changes can be added later.
Note: To validate pending values, call POST: /namedEvents/details/{detailId}/validate.
DELETE /api/namedEvents/{namedEventId}/details/{namedEventDetailId}:
-
Deletes the named event detail for the specified ID.
GET /api/namedEvents/{namedEventId}/details/{namedEventDetailId}:
-
Retrieves the named event detail for the specified ID (namedEventId).
POST /api/namedEvents/{namedEventId}/details/{namedEventDetailId}/validate:
-
Validates the named event detail for the specified ID.