Find the ID of a View - ABO

Back Office Integration Guide

Product
ABO
AFS_Version
7.9
Category
Reference Guide
language
English

This API returns all View IDs for a service instance. View ID is used in other Back Office APIs.

A "Find a View ID" API request takes the following form:

http://$HOST/bo-ws/service/$SERVICE_ID/instance/$SERVICE_STATUS/view?parameters

The list of parameters and their possible values are enumerated below.

  • $HOST is the server hosting the Back Office.
  • $SERVICE_ID is the number of the desired service.
  • $SERVICE_STATUS is the status of the desired service.

Method: GET

API usage example:

  • $HOST: 10.61.8.175
  • $SERVICE_ID: 1
  • $SERVICE_STATUS: stable

http://10.61.8.175/bo-ws/service/1/instance/stable/view?afs:login=login://$USER:$PASSWORD@$AUTHENTICATION_AUTHORITY

View IDs can be found at XPath:

/value/result/values/item/viewId

The XML result of the previous request is shown below:

<?xml version="1.0" standalone='yes'?>
<afs:value
xsi:schemaLocation="http://ref.antidot.net/v7/bo/output http://ref.antidot.net/v7.4/bo/output.xsd"
xsi:type="afs:ws.response" xmlns:afs="http://ref.antidot.net/v7/bo/output"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<afs:query xsi:type="afs:ws.response.query">
<afs:locale>fr_FR</afs:locale>
<afs:parameters/>
<afs:properties xsi:type="afs:dynamic"/>
</afs:query>
<afs:result xsi:type="afs:ws.filtering.result">
<afs:count>n</afs:count> <!-- n is the number of views -->
<afs:values>
<afs:item xsi:type="afs:bows.view"
reference="/bo-ws/project/1/service/1/instance/stable/view/1">
<afs:customParams/>
<afs:filters/>
<afs:name>test</afs:name> <!-- This is the name of the first view -->
<afs:queryParams>
<afs:item xsi:type="afs:string">test</afs:item>
</afs:queryParams>
<afs:serviceInstanceKey xsi:type="afs:ServiceInstanceKey">
<afs:instance>stable</afs:instance>
<afs:serviceId>1</afs:serviceId>
</afs:serviceInstanceKey>
<afs:viewId>1</afs:viewId> <!-- This is the VIEW ID of the first view -->
</afs:item>
<afs:item xsi:type="afs:bows.view"
reference="/bo-ws/project/1/service/1/instance/stable/view/22">
<afs:customParams/>
<afs:filters>
<afs:item
xsi:type="afs:net.antidot.protobuf.ac.views.Views.Filter">
<afs:rawData>tutu=tata</afs:rawData>
</afs:item>
<afs:item
xsi:type="afs:net.antidot.protobuf.ac.views.Views.Filter">
<afs:rawData>tyty=toto</afs:rawData>
</afs:item>
</afs:filters>
<afs:name>titi</afs:name> <!-- This is the name of the second view -->
<afs:queryParams>
<afs:item xsi:type="afs:string">titi</afs:item>
</afs:queryParams>
<afs:serviceInstanceKey xsi:type="afs:ServiceInstanceKey">
<afs:instance>stable</afs:instance>
<afs:serviceId>1</afs:serviceId>
</afs:serviceInstanceKey>
<afs:viewId>22</afs:viewId> <!-- This is the VIEW ID of the second view -->
</afs:item>

<!-- There are as many afs:item elements as there are views -->

</afs:values>
</afs:result>
</afs:value>