NSOA.wsapi.read(readRequest)
Use this function to retrieve data from OpenAir. The function returns an error if the response would exceed 1000 objects.
Note:
For more information about the SOAP API (Web Services), see XML API and SOAP API.
See also Making SOAP Calls.
Parameters
-
readRequest {object} [required] — Array of ReadRequest objects.
Returns
-
Array of ReadResult objects.
Units Limit
-
20 units
+10 for each additional object passed
For more information, see Scripting Governance.
Since
-
November 16, 2013
Example
-
This sample creates a new category in OpenAir.
// Create the issue object var issue = new NSOA.record.oaIssue(); issue.project_id = NSOA.form.getValue('id'); issue.issue_stage_id = 1; // Define the read request var readRequest = { type : "Issue", method : "equal to", // return only records that match search criteria fields : "id, date", // specify fields to be returned attributes : [ // Limit attribute is required; type is Attribute { name : "limit", value : "10" } ], objects : [ // One object with search criteria; type implied by rr 'type' issue ] }; // Invoke the read call var results = NSOA.wsapi.read(readRequest);
Note:This simple example does not show error checking, see Handling SOAP Errors.
See Code Samples for more examples.