Testopia:Documentation:XMLRPC:Build: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
 
No edit summary
Line 13: Line 13:


{| border=1 cellpadding=4
{| border=1 cellpadding=4
| '''Attribute''' || '''Data Type''' || '''Comments'''  
| '''Attribute''' || '''Data Type''' || '''Comments''' || '''Create''' || '''Read''' || '''Update'''
|-
|-
| build_id || integer ||
| build_id || integer || ||  || X || 
|-
|-
| product_id || integer ||
| product_id || integer || || Required || X || X
|-
|-
| name || string ||
| name || string || || Required || X || X
|-
|-
| description || string ||
| description || string || || Optional || X || X
|-
|-
| milestone || string ||
| milestone || string || || Optional || X || X
|-
| isactive || boolean || || Optional || X || X
|-
|-
|}
|}
Line 29: Line 31:


===Methods===
===Methods===
----
====get - Get A Build by ID====
----
=====Usage=====
Build.get
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| build_id || integer || Must be greater than 0.
|-
|}
=====Result=====
A hash map of key/value pairs for the attributes listed above or a hash map containing values for the keys, "faultcode" and "faultstring".
=====Example=====
<b>Perl</b>
my $build_id = 1;
my $result = $proxy->call('Build.get', $build_id);
----
====create - Create A New Build====
----
=====Usage=====
Build.create
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| new_values || hashmap || See required attributes list<sup>1</sup> below.
|-
|}
<sup>1</sup> Required attributes: name and product_id.
=====Result=====
An integer value representing the new build_id or a hash map containing values for the keys, "faultcode" and "faultstring".
=====Example=====
<b>Perl</b>
my $result = $proxy->call('Build.create', {'product_id' => 1, 'name' => 'New Build'});
----
====update - Update An Existing Build====
----
=====Usage=====
Build.update
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| buld_id || integer ||
|-
| new_values || hashmap || build_id and product_id can not be modified.
|-
|}
=====Result=====
The modified Build on success or a hash map containing values for the keys, "faultcode" and "faultstring".
=====Example=====
<b>Perl</b>
my $build_id = 1;
my $result = $proxy->call('Build.update', $build_id, {'name' => 'New Build'});


----
----
Line 51: Line 129:
=====Example=====
=====Example=====
<b>Perl</b>
<b>Perl</b>
  $proxy->call('Build.lookup_id_by_name', 'First Build');
  my $build_name = 'Build Name';
my $result = $proxy->call('Build.lookup_id_by_name', $build_name);




Line 76: Line 155:
=====Example=====
=====Example=====
<b>Perl</b>
<b>Perl</b>
  $proxy->call('Build.lookup_name_by_id', 1);
  my $build_id = 1;
my $result = $proxy->call('Build.lookup_name_by_id', $build_id);




141

edits

Navigation menu