GetAllSegments API
  • 1 Minute to read
  • Dark
    Light
  • PDF

GetAllSegments API

  • Dark
    Light
  • PDF

Article summary

Retrieves the collection of COAsegment objects. Each COAsegment object returned from this method corresponds to a data row of COAsegment in the database.

Syntax

COAsegment = api.GetAllSegments()

Usage

Use the GetAllSegments call to retrieve COAsegment data. Upon invocation, the Web Service queries the database for COAsegment data rows and returns the collection of COAsegment objects. Each COAsegment object corresponds to a data row in the database.

The Client application can then use methods on the collection of COAsegment objects to iterate through the collection and retrieve information. The Client application must be logged in with sufficient access rights to query COAsegment objects.

Response

COAsegment ()

The GetAllSegments method call returns collection of COAsegment objects which contain the data values of COAsegment data rows in the database.

Sample Code

Private Sub getAllSegments()
Dim api As New HostAPI()
Dim objSegment() As COASegmet
Try
'Call the web method to retrieve the list of COA segments
		objSegment = api.getALLSegments()
'Loop through the segments collection objects to display the segments retrieved
If Not objSegment Is Nothing Then
			Console.WriteLine("Name" & vbTab & "|DisplayName" & vbTab & "|Type" & vbTab & "|Visability" & vbTab & "|ActiveStatus")
For Each _Obj As COASegment in objSegment
				Console.WriteLine(_Obj.Name & "|" & _Obj.DisplayName & vbTab & "|" & _Obj.Type.ToString() & vbTab & "|" & _Obj.Visibility.ToString() & vbTab & "|" & _Obj.ActiveStatus.ToString())
Next
End If
Catch ex As Exception
End Try
End Sub

Was this article helpful?