Use NetOps Portal Web Services
In this article:
NetOps PortalWeb Services
You can access the API components that
DX NetOps Performance Managementincludes as RESTful web services from a web browser. The endpoints require authentication. Only local admin users can access the API components (make
NetOps PortalRESTful web services calls). The resulting API launch page includes a list of the available web services, endpoint addresses, and Web Application Description Language (WADL) and Web Service Definition Language (WSDL) URLs.
You can access the full list of
NetOps PortalRESTful web services at the following URL:
From the launch page, you can access the WADL of each web service for testing. If you use a testing utility to run web service calls, you receive feedback that is useful for debugging purposes. Using a testing utility can be a timesaver. You can supply username and password parameters as service endpoints for automatic authentication of all service calls. Testing utilities require a WSDL file that describes the service being tested. WSDL files are XML files that conform to the WSDL. In the REST format, use the simpler WADL. To access the SOAP web services, use the link to the WSDL.
NetOps PortalREST Web Services Documentation
Most of the web services provide their own documentation, including lists and descriptions of the available parameters and operations. You can access this documentation in HTML format from the launch page:
The Endpoints and the XML Schema
The endpoints act on a common set of data. You can represent the data in different data formats (for example, MIME types). The format depends on the endpoint that consumes or produces the data. An XML schema describes the data and other supported data formats, such as JSON.
The articles in this section of the documentation describe the basic terms and parameters of the XML schema to create scripts for the
NetOps PortalRESTful web services. You can group the data by namespace. A schema describes the types and elements of each namespace.
Typesdefine the structure of the data, while
elementsare instances of a type. For example, REST endpoints produce or consume elements, and the structure of each element is described by its type.
Interact with the
NetOps PortalREST Web Services Using Examples
The following examples illustrate some standard procedures for interacting with the
NetOps PortalRESTful web services using a REST client. This article includes information about how to create user account roles and user accounts using a REST client.
Verify the Prerequisites
Connect a REST Client to the
NetOps PortalREST Web Services
Follow these steps:
- Launch the REST client.
- Enter a URL for theNetOps PortalRESTful web services API in theURLfield, and then selectGETfor theHTTP Method. Use the following format:http://PC_host:8181/pc/center/webservice/Web_Service_NameFor example, to invoke thetenantsweb service, supply the following URL:http://PC_host:8181/pc/center/webservice/tenants/
- SelectBasic Authenticationfrom theAuthenticationmenu.TheBasic Authorizationdialog opens.
- Do the following:
TheRequest Headerdialog opens.
- Enter a valid username and password for a user account that has global administrator access, and then clickOK.
- SelectCustom Headerfrom theHeadersmenu.
- EnterContent-Typeas the value for theNameparameter.
- Enterapplication/xmlin theValuefield, and then clickOK.TheHeaderssection now shows the following updated values:Authorization:Basic YWRtaW46YWR...Content-Type:application/xml
NetOps PortalREST Web Service Examples
Example: Simple PUT operation that updates the description parameter of a tenant
The following is an example of a simple PUT operation that updates the description parameter of a tenant:
Substitute the desired values for the italicized terms. The following parameters are required:
- tenantNameThe name of the tenant that you want to edit.
- tenantDescriptionThe new description to identify this tenant.
Example: Simple GET operation that returns a list of tenant IDs and names
The following is an example of a simple GET operation that returns a list of tenant IDs and names using the
The following XML is returned:
<?xml version="1.0" encoding="UTF-8"?> <idNames> <idName value="tenantAccountId" /> <idName value="tenantItemId" /> <idName value="tenantName" /> </idNames>
HTTP requests always return a response and a status code, even when successful. The response text is either the expected result or an error message to indicate a problem. The status code is 200 for a successful response, or a numeric error indicator. The following HTTP response code ranges are used:
- 200 - Command status is 'OK'.
- 400 - A user error has occurred. Errors in this range indicate a problem with the input text (400) or the user credentials (403) and can usually be easily corrected.
- 500 - A system error occurred. Errors in this range typically indicate a system fault. These errors can require assistance from Broadcom Technical Support to resolve them.
For more information about HTTP status codes, see the IETF website.