.. _fabricdir: POST #### Creating a Fabric object ************************* URL:: /api/dcrooms/ Request body: .. code-block:: json { "dcrooms": { "dc": , "name": , "racks": , "spines": , "leafs": , "config": } } Request Example: .. code-block:: json { "dcrooms": { "dc": 1, "name":"Fabric name", "racks": 32, "spines": 4, "leafs": 2, "config": {} } } * **dc** - It is the fk of the Data Center. **name** - It is the name of the Fabric. **racks** - Total number of the racks in a fabric. **spines** - Total number of the spines in a fabric. **leafs** - Total number of the leafes in a fabric. **config** - Json with the father's environments related to the fabric and it's peculiarities. Only fields 'dc' and 'name' are required. Example of config json: .. code-block:: json { "BGP": { "spines": , "mpls": , "leafs": }, "Gerencia": { "telecom": { "vlan": , "rede": } }, "VLT": { "id_vlt_lf1": , "priority_vlt_lf1": , "priority_vlt_lf2": , "id_vlt_lf2": }, "Ambiente": [ { "id": , "details": [ { "name": , "min_num_vlan_1": , "max_num_vlan_1": , "config": [ { "subnet": , "type": , "mask": , "network_type": , "new_prefix": },... ] }, ... ] }, { "id": , "details": [] },... { "id": , "details": [ { "v4": { "new_prefix": }, "v6": { "new_prefix": } } ] },... ], "Channel": { "channel": } } At the end of POST request, it will be returned a json with the Fabric object created. Response Body: .. code-block:: json { "dcrooms": { "id": 1 "dc": 1, "name":"Fabric name", "racks": 32, "spines": 4, "leafs": 2, "config": {} } }