Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
api [2012/08/07 20:28]
lisa [Function: LookupData]
api [2012/08/07 21:11]
lisa [Action: Third Party Web Service]
Line 162: Line 162:
 ^relation Attributes: ^^^ ^relation Attributes: ^^^
 |relationType | String | Id of the Relation Type.| |relationType | String | Id of the Relation Type.|
-|from | String | Defines which side of the  +|from | String | Defines which side of the Relation to start from.  Valid values are:| 
-Relation to start from.  Valid +| ::: | ::: |base – The base side of the Relation Type.| 
-values are: +| ::: | ::: |target – The target side of the Relation Type. | 
- +|reference |String |An identifier that will be returned with the response to identify each Relation Type. |
-base – The base side of the +
-Relation Type. +
- +
-target – The target side of the +
-Relation Type. | +
-|reference |String |An identifier that will be +
-returned with the response to +
-identify each Relation Type. | +
- +
  
  
Line 187: Line 177:
  
 ^callStatus Attributes: ^^^ ^callStatus Attributes: ^^^
-|status | String | The call's status. ​ Values include +|status | String | The call's status. ​ Values include success and failure.|
-success and failure.|+
    
    
Line 201: Line 190:
  
 ^dataSet Attributes: ^^^ ^dataSet Attributes: ^^^
-|reference | String | The reference that was defined ​ +|reference | String | The reference that was defined for the data set in the request document. |
-for the data set in the request +
-document. |+
    
  
Line 218: Line 205:
  
 ^field Attributes: ^^^ ^field Attributes: ^^^
-|ItemId | String | Id of the Field. +|ItemId | String | Id of the Field. ​ | 
-reference String The reference that was defined ​ +|reference ​|String ​|The reference that was defined for the field in the request document. ​  |
-for the field in the request +
-document. ​  |+
  
  
Line 231: Line 216:
  
 ^relation Attributes: ^^^ ^relation Attributes: ^^^
-|reference |String |The reference that was  +|reference |String |The reference that was defined for the Relation Type in the request document.| ​
-defined for the Relation Type +
-in the request document.| ​+
 |id |String |Id of the current Relationship.| |id |String |Id of the current Relationship.|
-|relationType |String |Relation Type id of the  +|relationType |String |Relation Type id of the current Relationship.|
-current Relationship.|+
 |baseItemTypeId |String |Item Type id of the base Item.| |baseItemTypeId |String |Item Type id of the base Item.|
 |baseItemId |String |Id of the base Item.| |baseItemId |String |Id of the base Item.|
-|targetItemTypeId |String |Item Type id of the target ​ +|targetItemTypeId |String |Item Type id of the target Item.|
-Item.|+
 |targetItemId |String |Id of the target Item.| |targetItemId |String |Id of the target Item.|
    
Line 247: Line 228:
 //An example of a basic LookupData Request might use the following XML:// //An example of a basic LookupData Request might use the following XML://
  
-<​wxRequest> ​+<​code>​<​wxRequest> ​
     <dataSet reference=”accounts”>​     <dataSet reference=”accounts”>​
         <​items>​         <​items>​
Line 279: Line 260:
         </​relations>​         </​relations>​
     </​dataSet> ​     </​dataSet> ​
-</​wxRequest>​+</​wxRequest></​code>
 </​WRAP>​ </​WRAP>​
  
-//​Corresponding response XML://+
    
-<WRAP center round box 80%>+<WRAP center round box 80%>//​Corresponding response XML://
 <​code><​wxResponse>​ <​code><​wxResponse>​
     <​callStatus status=”success” />     <​callStatus status=”success” />
Line 304: Line 285:
         </​item></​code> ​         </​item></​code> ​
 </​WRAP>​ </​WRAP>​
 +
 +===== Function: AddItem =====
 + ​AddItem is a function for creating new Items inside of WorkXpress. ​ When adding
 +Items through the WorkXpress API, any appropriate Item, Field and Relation Actions
 +will be executed.
 + 
 +**Request XML** - Below is a description of the node types, their attributes and the valid
 +child node types supported for an AddItem request. ​
 +
 +**<​wxRequest></​wxRequest>​** - The root node for the Request XML document. ​
 +
 +**<​dataSet></​dataSet>​** - Contained inside of the wxRequest node , the dataSet node 
 +contains the information required for a item add request. ​ You may have as many data
 +sets as you want, allowing you to combine many add items requests into one call. 
 +
 +^dataSet Attributes: ^^^
 +|reference |String |An identifier that will be returned with the response to identify different data sets. |
 +
 +**<​item></​item>​** - Contained inside of the dataSet node, the item node contains the Item Type id of the Item being added.
 +
 +^item Attributes: ^^^
 +|itemTypeId |String |The Item Type id of the item being created. |
 +
 +**<​fields></​fields>​** - Contained inside of the dataSet and relation nodes, the fields ​
 +node is the parent node for the Fields to set on the Item or Relation previously defined.
 +
 +**<​field></​field>​** - Contained inside of the fields node, the field node defines a 
 +single Field to store data into.
 +
 +^field Attributes: ^^^
 +|fieldId |String |Id of the Field.|
 + 
 +**<​value></​value>​** - Contained inside of the field node, the value node holds the
 +value to store into the Field. ​
 +
 +**<​relations></​relations>​** - Contained inside of the dataSet node, the relations ​
 +node is the parent node for any Relationships that should be added when the Item is
 +added. ​
 +
 +**<​relation></​relation>​** - Contained inside of the relations node, the relation node
 +defines a single Relation to create. ​
 +
 +^relation Attributes:​^^^
 +|action |String |The action to perform on the Relationship. ​ This should be set to “add” when adding a Relationship. |
 +|oppositeItemId |String |The Item Id of the Item that you wish to relate the Item you are adding to. |
 +|reference |String |An identifier that will be returned with the response to identify each Relationship that was created. |
 +|relationType |String |Id of the Relation Type you would like to create.| ​
 +|startingSide |String |Defines which side of the Relation the Item being added will be on.  Valid values are:|
 +| ::: | ::: |base – The new Item is on the base side.|
 +| ::: | ::: |target – The new Item is on the target side. |
 +
 +**Response XML** - Below is a description of the valid nodes returned in the Response XML from an AddItem request. ​
 +
 +**<​wxResponse></​wxResponse>​** - The root node for the Response XML document. ​
 +
 +**<​callStatus></​callStatus>​** - Contained inside of the wxResponse node, the 
 +callStatus node contains the status of the SOAP call.
 +
 +^callStatus Attributes: ^^^
 +|status |String |The call's status. ​ Values include success and failure. |
 +
 +**<​compatibilityLevel></​compatibilityLevel>​** - Contained inside of the 
 +wxResponse node, the compatibilityLevel node contains the version of the API that
 +was used.
 +
 +**<​dataSet></​dataSet>​** - Contained inside of the wxResponse node, One data set is 
 +returned for each data set in the request document.
 +
 +^dataSet Attributes:​^^^
 +|reference |String |The reference that was defined for the data set in the request document. |
 +
 +**<​item></​item>​** - Contained inside of the dataSet node, defines an Item that was 
 +added to the WorkXpress application.
 +
 +^item Attributes: ^^^
 +|itemId |String |Id of the Item that was added. |
 +|ItemTypeId |String |Item Type id of the Item that was added. |
 +
 +**<​relation></​relation>​** - Contained inside of the item node, the relation node 
 +defines a Relation that was added to the WorkXpress application.
 +
 +^relation Attributes: ^^^
 +|reference |String |The reference that was defined for the Relation Type in the request document. |
 +|relationId |String |Id of the Relationship.|
 +
 +**Examples:​** ​
 +<WRAP center round box 80%>
 +An example of an AddItem request might use the following XML :
 +<​code><​wxRequest> ​
 +    <dataSet reference=”workxpress”>​
 +        <item itemTypeId=”a35234” />
 +        <​fields>​
 +            <field fieldId=”a66969”>​
 +                <​value>​WorkXpress</​value>​
 +            </​field>​
 +            <field fieldId=”a36314”>​
 +                <​value>​http://​www.workxpress.com</​value>​
 +            </​field>​
 +        </​fields>​
 +        <​relations>​
 +            <​relation action=”add” oppositeItemId=”u7436”
 +reference=”account_to_contact”
 +                relationType=”a36495” startingSide=”base”>​
 +                <​fields>​
 +                    <field fieldId=”a36498”>​
 +                        <​value>​Developer</​value>​
 +                    </​field>​
 +                </​fields>​
 +            </​relation>​
 +        </​relations>​
 +    </​dataSet>​
 +</​wxRequest>​ </​code>​
 +</​WRAP>​
 +
 +
 +<WRAP center round box 80%>
 +Corresponding response XML: 
 +<​code><​wxResponse>​
 +    <​callStatus status=”success” />
 +    <​compatibilityLevel>​1</​compatibilityLevel>​
 +    <dataSet reference=”workxpress”>​
 +        <item itemId=”u7563” itemTypeId=”a35234”>​
 +            <​relation reference=”account_to_contact” relationId=”u7564”
 +/>
 +        </​item>​
 +    </​dataSet>​
 +</​wxRequest>​ </​code>​
 +
 +</​WRAP>​
 +
 + 
 + 
    
 ===== Function: UpdateItem ===== ===== Function: UpdateItem =====
Line 334: Line 447:
 ^dataSet Attributes:​^^^ ^dataSet Attributes:​^^^
 |reference |String |An identifier that will be returned with the response to identify different data sets. | |reference |String |An identifier that will be returned with the response to identify different data sets. |
-|action |String ​ |The operation to perform on the Item.  Valid values are    +|action |String ​ |The operation to perform on the Item.  Valid values are:|    
-delete – Deleted Items are completely removed from WorkXpress and cannot be +| ::: | ::: |delete – Deleted Items are completely removed from WorkXpress and cannot be retrieved.  ​
-retrieved. ​ recycle – Recycled Items are not removed from WorkXpress and can be +| ::: | ::: |recycle – Recycled Items are not removed from WorkXpress and can be restored. restore – Restores a previously recycled item. 
-restored. restore – Restores a previously recycled item. update – Updates an  +| ::: | ::: |update – Updates an existing Item.|
-existing Item.|+
    
 **<​items></​items>​** - Contained inside of the dataSet node, the items node contains **<​items></​items>​** - Contained inside of the dataSet node, the items node contains
Line 347: Line 459:
  
 ^item Attributes:​^^^ ​ ^item Attributes:​^^^ ​
-|itemId |String |The id of the Item to perform +|itemId |String |The id of the Item to perform the operation on |
-the operation on |+
  
 **<​map></​map>​** - Contained inside of the items node, the map node contains the  **<​map></​map>​** - Contained inside of the items node, the map node contains the 
Line 374: Line 485:
 node is the parent node for any Relationships that should be added or updated. node is the parent node for any Relationships that should be added or updated.
    
-**<​relation></​relation>​** - Contained inside of the relations node, the relation node +**<​relation></​relation>​** - Contained inside of the relations node, the relation node defines a single Relation to add or update. ​
-defines a single Relation to add or update. ​+
  
 ^relation Attributes:​^^^ ^relation Attributes:​^^^
-|action |String |The action to perform on the +|action |String |The action to perform on the Relationship. ​ Valid values are: | 
-Relationship. ​ Valid values are: +| ::: | ::: |add – Creates a new Relationship.| 
- +| ::: | ::: |update – Updates an existing Relationship.| 
-add – Creates a new +| ::: | ::: |delete – Deleted Relationships are completely removed from WorkXpress and cannot be retrieved.| 
-Relationship. +| ::: | ::: |recycle – Recycled Relationships are not removed from WorkXpress and can be restored.
- +| ::: | ::: |restore – Restores a previously recycled Relationship. | 
-update – Updates an existing ​ +|oppositeItemId |String |The Item Id of the Item that you wish to relate the Item you are updating to.  If the action is not set to add, this will be used to find an existing Relationship. | 
-Relationship. +|reference |String |An identifier that will be returned with the response to identify each Relationship that was created or updated. | 
- +|relationType |String |Id of the Relation Type you would like to create. | 
-delete – Deleted +|startingSide |String |Defines which side of the Relation the Item being updated will be on.  Valid values are:| 
-Relationships are completely +| ::: | ::: |base – The Item will be on the base side.| 
-removed from WorkXpress +| ::: | ::: |target – The Item will be on the target side. |
-and cannot be retrieved. +
- +
-recycle – Recycled +
-Relationships are not +
-removed from WorkXpress +
-and can be restored.+
  
-restore – Restores a +**Response XML** - Below is a description of the valid nodes returned in the Response XML from an UpdateItem request.
-previously recycled +
-Relationship. | +
-|oppositeItemId |String |The Item Id of the Item that +
-you wish to relate the Item +
-you are updating to.  If the +
-action is not set to add, this +
-will be used to find an +
-existing Relationship. | +
-|reference |String |An identifier that will be +
-returned with the response to +
-identify each Relationship +
-that was created or updated. | +
-|relationType |String |Id of the Relation Type you +
-would like to create. | +
-|startingSide |String |Defines which side of the +
-Relation the Item being +
-updated will be on.  Valid +
-values are: +
- +
-base – The Item will be on +
-the base side. +
-  +
-target – The Item will be on +
-the target side. | +
- +
-**Response XML** - Below is a description of the valid nodes returned in the Response ​ +
-XML from an UpdateItem request.+
  
 **<​wxResponse></​wxResponse>​** - The root node for the Response XML document. ​ **<​wxResponse></​wxResponse>​** - The root node for the Response XML document. ​
Line 442: Line 519:
  
 ^dataSet Attributes:​^^^ ​ ^dataSet Attributes:​^^^ ​
-|reference |String |The reference that was defined for the data set in the request +|reference |String |The reference that was defined for the data set in the request document. |
-document. |+
  
 **<​item></​item>​** - Contained inside of the dataSet node, defines an Item that was  **<​item></​item>​** - Contained inside of the dataSet node, defines an Item that was 
Line 455: Line 531:
  
 ^relation Attributes:​^^^ ​ ^relation Attributes:​^^^ ​
-|Reference |String |The reference that was defined for the Relation in the request +|Reference |String |The reference that was defined for the Relation in the request document. |
-document. |+
 |relationId |String |Id of the Relationship. | |relationId |String |Id of the Relationship. |
  
 **Examples:​** ​ **Examples:​** ​
-//An example of a basic UpdateData request might use the following XML :// + 
-<WRAP center round box 80%> +<WRAP center round box 80%>//An example of a basic UpdateData request might use the following XML :// 
-<code><​wxRequest+<​code>​
     <dataSet action=”update” reference=”account”>​     <dataSet action=”update” reference=”account”>​
         <​items>​         <​items>​
Line 488: Line 563:
 </​WRAP>​ </​WRAP>​
  
-//​Corresponding response XML://+
    
-<WRAP center round box 80%><​code>​+<WRAP center round box 80%>//​Corresponding response XML://<​code>​
 <​wxResponse>​ <​wxResponse>​
     <​callStatus status=”success” />     <​callStatus status=”success” />
Line 577: Line 652:
  
 **Examples:​** ​ **Examples:​** ​
-//An example of a basic ExecuteAction request might use the following XML :// +<WRAP center round box 80%>//An example of a basic ExecuteAction request might use the following XML :// 
-<WRAP center round box 80%><​code>​+<​code>​
 <​wxResponse> ​ <​wxResponse> ​
     <dataSet reference=”accounts”>​     <dataSet reference=”accounts”>​
Line 593: Line 668:
  
  
-//​Corresponding response XML://  +<WRAP center round box 80%>//​Corresponding response XML://  
-<WRAP center round box 80%><​code>​+<​code>​
 <​wxResponse>​ <​wxResponse>​
     <​callStatus status=”success” />     <​callStatus status=”success” />
Line 615: Line 690:
 the clean version of the map definition that must be used in any API call. the clean version of the map definition that must be used in any API call.
   ​   ​
-{{ :​map_builder.gif?​nolink |}}+{{ :​map_builder.gif?​nolink&​500 ​|}}
 ====== Action: Third Party Web Service ====== ====== Action: Third Party Web Service ======
    
Line 629: Line 704:
 such as strings, numbers and booleans. such as strings, numbers and booleans.
  
-{{ :​third_party_web_service.gif?​nolink |}}+{{ :​third_party_web_service.gif?​nolink&​500 ​|}}
  
  
api.txt · Last modified: 2016/09/14 18:19 (external edit)
Copyright WorkXpress, 2024