Abiquo Documentation Cookies Policy

Our Documentation website uses cookies to improve your experience. Please visit our Cookie Policy page for more information about cookies and how we use them.


Abiquo 4.4

Skip to end of metadata
Go to start of metadata

EnterpriseProperties Resource

Contents:

The Enterprise Properties Resource enables you to manage generic enterprise metadata. Through the user interface configuration the administrator can set predefined property keys and default values.

Main URI of the Resource

This class operates mainly over the Resource URI: /admin/enterprises/{enterprise}/properties

Exposed Methods

List enterprise properties

Retrieves the properties of an enterprise.

Synopsis: GET http://example.com/api/admin/enterprises/{enterprise}/properties
Roles Required: ENTERPRISE_ADMINISTER_ALL
Request Headers: Accept: application/vnd.abiquo.enterpriseproperties+json; version=4.4; application/vnd.abiquo.enterpriseproperties+xml; version=4.4;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: EnterpriseProperties Media Type
Request Example:

 Click here to show or hide the request example

GET_adm_ents_X_props_AC_entprops_j.0001.txt

cURL:

curl -X GET http://localhost:9000/api/admin/enterprises/5842/properties \ 
	 -H 'Accept:application/vnd.abiquo.enterpriseproperties+json; version=4.2' \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

--none--

Response payload:

{
  "id": 9, 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/enterprises/5842/properties", 
      "type": "application/vnd.abiquo.enterpriseproperties+json", 
      "rel": "edit", 
      "title": "enterprise properties"
    }, 
    {
      "href": "http://localhost:9009/api/admin/enterprises/5842", 
      "type": "application/vnd.abiquo.enterprise+json", 
      "rel": "enterprise", 
      "title": "0"
    }
  ], 
  "properties": {
    "key2": "val2", 
    "key1": "val1"
  }
}

Update enterprise properties

Updates the properties of an enterprise, overwriting all existing properties.

Synopsis: PUT http://example.com/api/admin/enterprises/{enterprise}/properties
Roles Required: ENTERPRISE_ADMINISTER_ALL
Request Headers: Accept: application/vnd.abiquo.enterpriseproperties+json; version=4.4; application/vnd.abiquo.enterpriseproperties+xml; version=4.4;  Content-type:  application/vnd.abiquo.enterpriseproperties+json; version=4.4; application/vnd.abiquo.enterpriseproperties+xml; version=4.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: EnterpriseProperties Media Type
Response Message Body Entity: EnterpriseProperties Media Type
Request Example:

 Click here to show or hide the request example

PUT_adm_ents_X_props_CT_entprops_j_AC_entprops_j.0001.txt

cURL:

curl -X PUT http://localhost:9000/api/admin/enterprises/5842/properties \ 
	 -H 'Accept:application/vnd.abiquo.enterpriseproperties+json; version=4.2' \ 
	 -H 'Content-Type:application/vnd.abiquo.enterpriseproperties+json; version=4.2' \ 
	 -d @requestpayload.json \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

{
  "id": 9, 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/enterprises/5842/properties", 
      "type": "application/vnd.abiquo.enterpriseproperties+json", 
      "rel": "edit", 
      "title": "enterprise properties"
    }, 
    {
      "href": "http://localhost:9009/api/admin/enterprises/5842", 
      "type": "application/vnd.abiquo.enterprise+json", 
      "rel": "enterprise", 
      "title": "0"
    }
  ], 
  "properties": {
    "key2": "val2", 
    "key1": "val1", 
    "Property key": "Property value"
  }
}

Response payload:

{
  "properties": {
    "key2": "val2", 
    "key1": "val1", 
    "Property key": "Property value"
  }, 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/enterprises/5842/properties", 
      "type": "application/vnd.abiquo.enterpriseproperties+json", 
      "rel": "edit", 
      "title": "enterprise properties"
    }, 
    {
      "href": "http://localhost:9009/api/admin/enterprises/5842", 
      "type": "application/vnd.abiquo.enterprise+json", 
      "rel": "enterprise", 
      "title": "0"
    }
  ]
}

Minimum Request Message Body:

You can send only the properties without the links.

{
  "properties": {"property_input": "Head Office", "property_multi": "Barcelona", "property_combo": "London"}
}