]project-open[ : @This Wiki

Welcome, Unregistered Visitor

 ·  ·  ·  Contact ·  Index · Login · Register


Remote Training
SaaS Service

1 registered user
 in last 24 hours

]po[ REST Interface - Creating Objects

This page provides details on creating new objects via the ]po[ REST interface.

Object Creation Overview

While U=Update operation is a "generic" operations allowing any of the object's field to be updated, the C=Creation requires a certain structure of attributes for a successful object creation. The following section details the minimum attributes required for object creation.


In order to create a new project, you need to provide the attributes:

  • project_name,
  • project_nr
  • project_path (=project_nr)
  • company_id (the customer)
  • project_status_id and
  • project_type_id

All other attributes are technically optional during the C=Create operation, even though these fields may be necessary for normal operations (for example: A project with an empty start_date or end_date may not appear in the ProjectListPage.

Please find below an esample XML structure for creating a new project.

        <project_name>EPM Tool</project_name>

Assuming that this XML structure is stored in a file name "im_project.xml", you can create a new project using the following "wget" statement:

wget -O - --post-file=im_project.xml --user='bbigboss@tigerpond.com' --password=ben http://localhost/intranet-rest/im_project

As a result, the REST interface should return a XML structure with the object_id of the newly created object:

<?xml version='1.0'?>

Translation Task

The creation of translation tasks works analog to the creation of projects. The XML structure looks like this:

<?xml version='1.0'?>
        <task_uom_id href="http://localhost/intranet-rest/im_category/324">324</task_uom_id>
        <task_status_id href="http://localhost/intranet-rest/im_category/340">340</task_status_id>
        <task_type_id href="http://localhost/intranet-rest/im_category/89">89</task_type_id>
        <end_date>2006-04-23 00:00:00+02</end_date>
        <source_language_id href="http://localhost/intranet-rest/im_category/261">261</source_language_id>
        <target_language_id href="http://localhost/intranet-rest/im_category/251">251</target_language_id>



Financial Documents (im_invoice and im_invoice_item)

The creation of financial documents consists of two parts: Creating the financial document itself (im_invoice) and then populating the document with a number of items (im_invoice_item).

Creating the im_invoice document will result in a financial document with amount=0:

<?xml version='1.0'?>
        <customer_id href="http://localhost/intranet-rest/im_company/9672">9672</customer_id>
        <company_contact_id href="http://localhost/intranet-rest/user/"></company_contact_id>
        <provider_id href="http://localhost/intranet-rest/im_company/8720">8720</provider_id>
        <invoice_office_id href="http://localhost/intranet-rest/im_office/"></invoice_office_id>
        <cost_status_id href="http://localhost/intranet-rest/im_category/3810">3810</cost_status_id>
        <cost_type_id href="http://localhost/intranet-rest/im_category/3700">3700</cost_type_id>
        <payment_method_id href="http://localhost/intranet-rest/im_category/804">804</payment_method_id>
        <template_id href="http://localhost/intranet-rest/im_category/900">900</template_id>

In a second step you may now add items to the financial document using:

<?xml version='1.0'?>
        <item_name>Line 01</item_name>

An object type specific logic will update the financial document amount with the sum of the items.

Please note that all items should have the same currency. Otherwise the amount of the financial document is undefined.






Please take a moment to complete this form to help us improve our service.

Please only provide feedback in regards to content this page shows. For support inquiries please refer either to the Community Support forum at Sourceforge or check out our 'Professional Support'

Did this page help you to achieve your goal?

 Yes  No  Don't know

Please provide us with comments to improve this page:

How useful is the information?

 1  2  3  4  5


Demo Server
Modules & Functionality
Business Processes supported


Getting started
User Manuals
Configuration Manuals
Community Support
Professional Support


RSS Community / Sourceforge
Register for Newsletter

Get in touch


Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Generic License - Privacy Policy