Update enterprise properties via API


Introduction to working with enterprise properties in the API

Enterprise properties enable you to store tenant metadata and you can also use them to configure billing dashboards and integrations, such as the VMware NSX integration, Azure VPNs, and onboard from public cloud.

To retrieve or update enterprise properties, you will require the following privilege:

  • Allow user to switch enterprise:  ROLE_ENTERPRISE_ADMINISTER_ALL

There are three types of enterprise properties:

  • READ_WRITE

  • READ_ONLY

  • HIDDEN

To update READ_ONLY or HIDDEN properties you will require the following privilege:

  • Manage enterprise properties: ENTERPRISE_MANAGE_PROPERTIES

 

When you update enterprise properties using the API, you will overwrite all existing properties  

Default properties:

  • If you created the enterprise using the API, by default there are no properties.

  • If you created the enterprise using the user interface, some default properties and values may have been defined and/or modified. See Predefine enterprise properties for the UI

For details of how to manage enterprise properties in the UI, see: Manage enterprise credentials and properties


Retrieve enterprises by property key or value

When you get enterprises, you can filter enterprises by their properties using the "prop" query parameter.  The platform combines the filters with an OR operator.

For example:

  • To get enterprises that have property pairs Key1=Value1 or Key2=Value2 get the enterprises with the query parameters as shown here:

    admin/enterprises?prop.Key1=Value1&prop.Key2=Value2



  • Enterprises with properties with key 'Key1' and any value: 

    admin/enterprises?prop.Key1



  • Enterprises with properties with value 'Value1' and any key: 

    admin/enterprises?prop=Value1



The following query gives an example of how  to get all the enterprises that have the "dataset_id" property:

In our system, this query returns a collection of two enterprises. 

 

To get all enterprises with a property that has a key of "dataset_id"  and a value of "billingDatasetId22", you could use the following query.


Get the properties of an enterprise

To retrieve the existing enterprise properties from an enterprise, get the properties link from the enterprise's data object. 

For one of the enterprises in the above example, the link is as follows.

Make a GET request to the properties link similar to the one shown here.

The response is an enterpriseproperties object as follows.


Update enterprise properties

To update enterprise properties using the API, enter the properties in key and value format. 

When you update enterprise properties you will overwrite the existing properties.

 

When you make the put request, use an enterpriseproperties object, similar to this example. See https://wiki.abiquo.com/api/latest/enterpriseproperties.html

The full PUT request to update the properties with this data entity would be as follows.

Remember that you will require the privileges listed in the Introduction to enterprise properties in the API.

And an example response would be as follows:

Sample updated enterprise properties


 

Related pages

Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved