Quick Start

Set up your environment and make your first REST API call by performing these tasks.

Task 1: Set Up Your REST Client

You can use cURL in the command line, as shown in the examples in this document, or you can set up your REST client to make requests. See "Install and Use cURL" for information about using cURL.

To help create requests in a client, you can download the Oracle Communications Unified Topology for Inventory and Automation (UTIA) REST API Swagger file and import it into your client. From the navigation bar at the left of this document, select the Download option and then select Swagger. The Swagger file is in JSON format.

Task 2: Create a User

Create a UIM user that has read, write, or read/write permissions for the UTIA REST API endpoints. Users added to the uim-users group in WebLogic Server have authorization to access all UTIA REST endpoints.

See Unified Inventory Management Installation Guide for information on creating a new user.

Task 3: Make a Sample Request

To check that your connection works, use cURL or your REST client to make a simple GET request. Use one of the endpoints your assigned role has read access to. For example, try getting the list of logical devices from the UIM environment:

- curl -–location --request GET ‘https://<hostname>:<port>/topology/<version>/vertex’ --header " Authorization: Bearer access token" 

where:

  • hostname is the URL for the Oracle Communications UTIA server.
  • port is the port for the Oracle Communications UTIA server.
  • version is the version of the API you're using, such as v2. See Versioning in Send Requests.
  • access token is the generated token to access the REST APIs using OAuth2 authentication. See Authentication and Authorization.

If the request is successful, you'll receive a 200 response with a body listing the logical devices:

{
        "autoSuggestName": "(150004)-PE_MUMBAI",
        "businessObjectClass": "LogicalDeviceDAO",
        "createdDate": "2023-04-12T08:31:19.366Z",
        "createdUser": "uimqa",
        "deviceIdentifier": "PE_MUMBAI.001",
        "entityId": 1307,
        "entityVersion": 4,
        "geometry": {
            "gtype": 1,
            "dim": 2,
            "srid": 8307
        },
        "id": "150004",
        "inventoryStatus": "INSTALLED",
        "lastModifiedDate": "2023-04-12T08:40:20.448Z",
        "lastModifiedUser": "uimqa",
        "latitude": 35.0,
        "longitude": 4.0,
        "name": "PE_MUMBAI",
        "referenceId": 29,
        "specName": "Packet Network Device"
    },
    {
        "autoSuggestName": "(1)-PD_LOC_OPI1",
        "businessObjectClass": "PhysicalDeviceDAO",
        "createdDate": "2023-04-11T05:44:48.569Z",
        "createdUser": "uimqa",
        "entityId": 1282,
        "entityVersion": 6,
        "geometry": {
            "gtype": 1,
            "dim": 2,
            "srid": 8307
        },
        "id": "1",
        "inventoryStatus": "INSTALLED",
        "lastModifiedDate": "2023-04-11T05:45:20.402Z",
        "lastModifiedUser": "uimqa",
        "latitude": 17.385,
        "longitude": 78.4867,
        "name": "PD_LOC_OPI1",
        "properties": {
            "serialNumber": "11"
        },
        "referenceId": 1,
        "specName": "BATPhysicalDeviceSpec"
    },
    {
        "autoSuggestName": "(8)-PLACE_OPI1",
        "businessObjectClass": "GeographicPlaceDAO",
        "createdDate": "2023-04-11T05:44:48.004Z",
        "createdUser": "uimqa",
        "entityId": 1280,
        "entityVersion": 1,
        "geometry": {
            "gtype": 1,
            "dim": 2,
            "srid": 8307
        },
        "id": "8",
        "lastModifiedDate": "2023-04-11T05:44:49.935Z",
        "lastModifiedUser": "uimqa",
        "latitude": 17.385,
        "longitude": 78.4867,
        "name": "PLACE_OPI1",
        "referenceId": 22,
        "specName": "BATPlaceLocationSpec"
    },