Tenants Web Service

The API provides the tenants web service to let you view, create, and modify tenant definitions.
Local admin users can view, create, and modify tenant definitions using the
tenants
web service. The basic tenant definition contains a few parameters to identify the tenant. The infrastructure--devices, networks, servers--and the monitoring parameters for a customer's monitored systems must be associated with the tenant definition. Each tenant must contain at least one IP domain, plus as many of the following definitions as required to manage the associated enterprise infrastructure and applications:
  • User accounts
  • Roles
  • Custom and system groups
  • Custom reports
  • Custom menus
To associate definitions and monitoring parameters with an existing tenant definition, log in as the tenant administrator and use the required web services to create the required definitions. The definitions are then associated with the tenant definition and available to users logged in with this tenant's user accounts.
In this article:
Tenants Web Service Parameters
Issue the following call to see the available parameters and operations for the
tenants
web service:
http://
PC_host
:8181/pc/center/rest/tenants/documentation
Parameters
  • tenantDescription
    (Optional) Describes the tenant.
  • idName
    Is a name for the tenant.
  • status
    Is the status of this tenant. Select one of the following values:
    • Activated: Enables tenant user accounts for use.
    • Disabled: Prevents any actions by user accounts that are associated with this tenant.
  • removable
    States whether the item can be deleted (removed from the database).
    Values
    : true or false.
  • theme
    Specifies the format--the theme that controls the appearance of the page in the browser window--to use for this tenant. All operators whose user account is associated with this tenant see this same theme. The CA-Blue and CA-Gray are available.
    Default:
    CA-Blue
  • defaultCulture
    Specifies a language (locale). Supply a language identifier from the following list:
    • en-US (English, United States)
    • ja-JP (Japanese)
    • zh-CN (Simplified Chinese)
    • fr-FR (French, France)
  • accountId
    Identifies this tenant; usually corresponds to the MSP account number. If a value is supplied as input, it must be unique across all defined tenants.
  • tenantID
    Is an internal (database) identifier for a tenant definition.
Tenants Web Service Example Syntax
You can retrieve a current list of tenant definitions, create tenant definitions, and modify these definitions by changing their parameters using the
tenants
web service.
Operations
The following basic operations are supported by the
tenants
web service:
  • GET
    Returns a list of tenant definitions sorted by name. Available on the /tenantID endpoint. Use the following syntax:
    http://
    PC_host
    :8181/pc/center/webservice/tenants/
  • POST
    Creates a custom tenant. Use the following syntax:
    http://
    PC_host
    :8181/pc /center/webservice/tenants/
  • PUT
    Updates an existing tenant definition. Use the following syntax:
    http://
    PC_host
    :8181/pc/center/webservice/tenants/
Create a Tenant
Use any REST client to create and configure a tenant using the
tenants
web service.
Follow these steps:
  1. Set up a REST client with a connection to the
    NetOps Portal
    server.
  2. Enter a URL for the
    NetOps Portal
    RESTful web services API in the REST client. Use the following format:
    http://
    PC_host
    :8181/pc/center/webservice/tenants/
  3. Select
    POST
    for
    "HTTP" Method
    .
  4. Provide a valid Username and Password for a user account that has global administrator access to
    NetOps Portal
    .
  5. Select
    'application/xml'
    as the
    'Body Content-type'
    in the Body settings.
  6. Add the following XML within the
    Body
    text section:
    <tenant> <tenantName>Name of tenant</tenantName> <tenantDesc>Description of the tenant</tenantDesc> <accountIdentifier>unique string for this tenant</accountIdentifier> <status>{activated or disabled}</status> <removable>{true or false}</removable> <theme>{CA-Blue or CA-Gray}</theme> <defaultCulture>culture</defaultCulture> </tenant>
  7. Replace any values with the values that you want to use for the new tenant.
    For example, supply the following parameters:
    <tenant> <tenantName>John Doe</tenantName> <tenantDesc>John Doe Corporation tenant</tenantDesc> <accountIdentifier>JD1234</accountIdentifier> <status>Enabled</status> <removable>false</removable> <theme>CA-Blue</theme> <defaultCulture>en-US</defaultCulture> </tenant>
  8. Run the method.
  9. Repeat the preceding steps until you have created as many tenants as you require.