Web Services Developer's Guide → Web Services API Reference → SBM Application Web Services → Application Calls → CreatePrimaryItems
This service creates one or more primary items within the same project using the data that is supplied.
Argument | Type | Description |
---|---|---|
auth (optional) | Auth | The Auth type supplies credentials and optionally, a host name for licensing. The userId and password can be specified with HTTP BASIC or WS-SECURITY instead. |
project (required) | ProjectIdentifier | The project in which new items are created. You must at least specify the TS_ID of the project. |
parentItem | ItemIdentifier | If specified, items that are created using CreatePrimaryItems will become sub-items of this item. |
item (required) | TTItem | Holds one or more items to be created. The TTItem type holds the generic data for each item. |
submitTransition (optional) | TransitionIdentifier | Only used if you want to use an alternative submit transition. |
options (optional) | MultipleResponseItemOptions | Specifies whether the service should continue if an error is encountered or stop. Also enables you to limit the data that is returned in the response. |
TTItemHolder is returned, one for each item that is specified in the call. The new primary items are returned with updated item data, which shows the unique TS_IDs of each record and TS_IDs of the table to which they were added. For more detail, see TTItemHolder.
The CreatePrimaryItems call provides a method to add multiple new records to a given primary table. You can add new records to both custom and system primary tables, given the proper privileges.
Use the following elements in the options parameter to control how this call is processed and what data is returned:
For more information on the options elements, see MultipleResponseItemOptions.
The following XML is a snippet of the payload that is sent with CreatePrimaryItems.
<urn:CreatePrimaryItems> <urn:auth> <urn:userId>admin</urn:userId> <urn:password></urn:password> <urn:hostname></urn:hostname> <urn:loginAsUserId></urn:loginAsUserId> </urn:auth> <urn:project> <urn:displayName>Animation Pro</urn:displayName> <urn:id>2</urn:id> <urn:uuid></urn:uuid> <urn:fullyQualifiedName>Base Project||Base IDT Project|| Software Development||Animation Pro</urn:fullyQualifiedName> </urn:project> <urn:parentItem> </urn:parentItem> <urn:item> <urn:id> <urn:displayName></urn:displayName> <urn:id></urn:id> <urn:uuid></urn:uuid> <urn:tableId></urn:tableId> <urn:tableIdItemId></urn:tableIdItemId> <urn:issueId></urn:issueId> </urn:id> <urn:itemType></urn:itemType> <urn:project> <urn:displayName></urn:displayName> <urn:id></urn:id> <urn:uuid></urn:uuid> <urn:fullyQualifiedName></urn:fullyQualifiedName> </urn:project> <urn:title>Test item</urn:title> <urn:description>This is a test item.</urn:description> <urn:createdBy> <urn:displayName></urn:displayName> <urn:id></urn:id> <urn:uuid></urn:uuid> <urn:loginId></urn:loginId> </urn:createdBy> <urn:createDate></urn:createDate> <urn:modifiedBy> <urn:displayName></urn:displayName> <urn:id></urn:id> <urn:uuid></urn:uuid> <urn:loginId></urn:loginId> </urn:modifiedBy> <urn:modifiedDate></urn:modifiedDate> <urn:activeInactive></urn:activeInactive> <urn:state> <urn:displayName></urn:displayName> <urn:id></urn:id> <urn:uuid></urn:uuid> <urn:isClosed></urn:isClosed> </urn:state> <urn:owner> <urn:displayName></urn:displayName> <urn:id></urn:id> <urn:uuid></urn:uuid> <urn:loginId></urn:loginId> </urn:owner> <urn:url/> <urn:subtasks/> <urn:extendedField> <urn:id> <urn:displayName>Severity</urn:displayName> <urn:id></urn:id> <urn:uuid></urn:uuid> <urn:dbName>SEVERITY</urn:dbName> </urn:id> <urn:setValueBy>DISPLAY-VALUE</urn:setValueBy> <urn:setValueMethod>REPLACE-VALUES</urn:setValueMethod> <urn:value> <urn:displayValue>Critical</urn:displayValue> <urn:internalValue></urn:internalValue> <urn:uuid></urn:uuid> </urn:value> </urn:extendedField> <urn:extendedField> <urn:id> <urn:displayName>How Found</urn:displayName> <urn:id>74</urn:id> <urn:uuid>b999082f-ef27-47c9-890f-b4d80a3c4c23</urn:uuid> <urn:dbName>HOW_FOUND</urn:dbName> </urn:id> <urn:setValueBy>INTERNAL-VALUE</urn:setValueBy> <urn:setValueMethod>REPLACE-VALUES</urn:setValueMethod> <urn:value> <urn:displayValue>Code Review</urn:displayValue> <urn:internalValue>24</urn:internalValue> <urn:uuid>931259b4-dc0a-46c5-b567-ff04dd5c9395</urn:uuid> </urn:value> </urn:extendedField> <urn:extendedData> <urn:data> <urn:name></urn:name> <urn:value></urn:value> </urn:data> </urn:extendedData> </urn:item> <urn:item> <urn:id> <urn:displayName></urn:displayName> <urn:id></urn:id> <urn:uuid></urn:uuid> <urn:tableId></urn:tableId> <urn:tableIdItemId></urn:tableIdItemId> <urn:issueId></urn:issueId> </urn:id> <urn:itemType></urn:itemType> <urn:project> <urn:displayName></urn:displayName> <urn:id></urn:id> <urn:uuid></urn:uuid> <urn:fullyQualifiedName></urn:fullyQualifiedName> </urn:project> <urn:title>Test item</urn:title> <urn:description>This is a second test item.</urn:description> <urn:createdBy> <urn:displayName></urn:displayName> <urn:id></urn:id> <urn:uuid></urn:uuid> <urn:loginId></urn:loginId> </urn:createdBy> <urn:createDate></urn:createDate> <urn:modifiedBy> <urn:displayName></urn:displayName> <urn:id></urn:id> <urn:uuid></urn:uuid> <urn:loginId></urn:loginId> </urn:modifiedBy> <urn:modifiedDate></urn:modifiedDate> <urn:activeInactive></urn:activeInactive> <urn:state> <urn:displayName></urn:displayName> <urn:id></urn:id> <urn:uuid></urn:uuid> <urn:isClosed></urn:isClosed> </urn:state> <urn:owner> <urn:displayName></urn:displayName> <urn:id></urn:id> <urn:uuid></urn:uuid> <urn:loginId></urn:loginId> </urn:owner> <urn:url/> <urn:subtasks/> <urn:extendedField> <urn:id> <urn:displayName>Severity</urn:displayName> <urn:id></urn:id> <urn:uuid></urn:uuid> <urn:dbName>SEVERITY</urn:dbName> </urn:id> <urn:setValueBy>DISPLAY-VALUE</urn:setValueBy> <urn:setValueMethod>REPLACE-VALUES</urn:setValueMethod> <urn:value> <urn:displayValue>Critical</urn:displayValue> <urn:internalValue></urn:internalValue> <urn:uuid></urn:uuid> </urn:value> </urn:extendedField> <urn:extendedField> <urn:id> <urn:displayName>How Found</urn:displayName> <urn:id>74</urn:id> <urn:uuid>b999082f-ef27-47c9-890f-b4d80a3c4c23</urn:uuid> <urn:dbName>HOW_FOUND</urn:dbName> </urn:id> <urn:setValueBy>INTERNAL-VALUE</urn:setValueBy> <urn:setValueMethod>REPLACE-VALUES</urn:setValueMethod> <urn:value> <urn:displayValue>Code Review</urn:displayValue> <urn:internalValue>24</urn:internalValue> <urn:uuid>931259b4-dc0a-46c5-b567-ff04dd5c9395</urn:uuid> </urn:value> </urn:extendedField> <urn:extendedData> <urn:data> <urn:name></urn:name> <urn:value></urn:value> </urn:data> </urn:extendedData> </urn:item> <urn:submitTransition> <urn:displayName></urn:displayName> <urn:id></urn:id> <urn:uuid></urn:uuid> </urn:submitTransition> <urn:options> <urn:extraOption> <urn:name></urn:name> <urn:value></urn:value> </urn:extraOption> <urn:sections>SECTIONS-ALL</urn:sections> <urn:specifiedSections></urn:specifiedSections> <urn:limitedField/> <urn:multiOption>STOP-ON-FAILURE</urn:multiOption> </urn:options> </urn:CreatePrimaryItems>
Copyright © 2007–2017 Serena Software, Inc. All rights reserved.