Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

get

URLapi/v1/api.php?target=vlan&action=get
Descriptionsearches Searches enabled VLANs. When not given options, returns all enabled VLANs. Note: an optional parameter, unavailable, is used to get available (un-enabled) VLANs as well
Returns

Examples

SUCCESSFUL{"success":1,"message":"2 domains found. ","data":{"1":{"id":"1","domain":"DefaultDomain","attr_6c":null,"attr_custom":null,"vlans":[{"id":"4","vlan":"105","name":"NewName"}]},"2":{"id":"2","domain":"6connect.com","attr_6c":null,"attr_custom":null,"vlans":[{"id":"20","vlan":"11","name":""}]}}}
ERROR{ "success":0, "message":"error message" }
Required Parameters

None

Optional Parameters
NameTypeExampleDescription
unavailableSTRINGtrueWill return available, instead of enabled, VLANs
domainIdINTEGER1domain ID
idINTEGER21VLAN ID in the vlan table
Example URLapi/v1/api.php?target=vlan&action=get&id=4&unavailable=true
Example

deleteDomain

URL api/v1/api.php?target=vlan&action=deleteDomain
Description Deletes a VLAN domain.
Returns

Examples

SUCCESSFUL {"success":1,"message":"Domain #7 successfully deleted."}
ERROR{ "success":0, "message":"error message" }
Required Parameters
NameTypeExampleDescription
XdomainIdXINTEGERX7Xdomain ID
Optional ParametersName

None

TypeDescription
XXXX
Example URLURLapi/v1/api.php?target=vlan&action=deleteDomain&domainId=7 

updateDomain

URL 
Description 
api/v1/api.php?target=vlan&action=updateDomain
DescriptionUpdates a VLAN domain.
Returns

Examples

SUCCESSFUL ERROR{"success":01,"message":"error message" }
Required Parameters
NameTypeExampleDescription
XXXX
Optional Parameters
NameTypeExampleDescription
XXXX
Example URL 

Update

URL 
Description 
Returns

Examples

SUCCESSFUL 
ERROR{ "success":0, "message":"error message" }
Required Parameters
NameTypeExampleDescription
XXXX
Optional Parameters
NameTypeExampleDescription
XXXX
Example URL 

removeTags

URL 
Description 
Returns

Examples

SUCCESSFUL 
ERROR{ "success":0, "message":"error message" }
Required Parameters
NameTypeExampleDescription
XXXX
Optional Parameters
NameTypeExampleDescription
XXXX
Example URL 
Domain 2 updated","id":"2","data":[{"id":"2","domain":"44.6connect.com","attr_6c":{"range":"S","restricted":[1,1002,1003,1004,1005]},"vlans":[{"id":"19","vlan":"10","name":"","tags":["105"]},{"id":"20","vlan":"11","name":"","tags":["105"]},{"id":"21","vlan":"12","name":"","tags":["105"]},{"id":"22","vlan":"13","name":"","tags":["105"]},{"id":"23","vlan":"14","name":"","tags":["105"]},{"id":"24","vlan":"15","name":"","tags":["105"]},{"id":"25","vlan":"16","name":"","tags":["105"]},{"id":"26","vlan":"17","name":"","tags":["105"]},{"id":"27","vlan":"18","name":"","tags":["105"]},{"id":"29","vlan":"20","name":"","tags":["105"]},{"id":"30","vlan":"21","name":"","tags":["105"]},{"id":"3286","vlan":"3281","name":"Bob","tags":["105"]},{"id":"3287","vlan":"3282","name":""},{"id":"3288","vlan":"3283","name":""},{"id":"3289","vlan":"3284","name":""},{"id":"3290","vlan":"3285","name":""},{"id":"3291","vlan":"3286","name":""},{"id":"3292","vlan":"3287","name":""},{"id":"3293","vlan":"3288","name":""},{"id":"3294","vlan":"3289","name":""}],"vlans_unnamed":{"1":null,"2":{"tags":["105"]},"3":{"tags":["105"]},
....
"1002":null,"1003":null,"1004":null,"1005":null},"type":"domain","util":{"S":{"used":11,"total":1000}}}]}
ERROR{ "success":0, "message":"error message" }
Required Parameters
NameTypeExampleDescription
domainIdINTEGER7domain ID
Optional Parameters
NameTypeExampleDescription
XXXX
Example URL 

update

URLapi/v1/api.php?target=vlan&action=update
DescriptionUpdate properties of a VLAN: name, tags, or both.
Returns

Examples

SUCCESSFUL{"success":1,"message":"VLAN (table ID 11735) updated","id":"11735","data":[{"id":"11735","vlan":"50","domain_id":"7","resource_id":null,"name":"","domain_name":"lax.com","tags":[],"tagsString":[]}]}
ERROR{ "success":0, "message":"error message" }
Required Parameters
NameTypeExampleDescription
idINTEGER11735VLAN record ID (which is “id” of the VLANs in “get” action results)
Optional Parameters
NameTypeExampleDescription
nameSTRING or empty stringHQname of the VLAN
tagsINTEGER or STRING or empty string111,112

ID of tags to be assigned to this VLAN. Multiple tags IDs are assignable with a comma delimiter.

Empty parameter will result in no tags being assigned.

Example URL

api/v1/api.php?target=vlan&action=update&id=11735&name=OReilly&tags=156,159

api/v1/api.php?target=vlan&action=update&id=11735&name=OReilly

api/v1/api.php?target=vlan&action=update&id=11735&tags=156,159

api/v1/api.php?target=vlan&action=update&id=11735&name=

api/v1/api.php?target=vlan&action=update&id=11735&tags=

removeTags

URLapi/v1/api.php?target=vlan&action=removeTags
DescriptionRemove tags from a domain's VLAN(s).
Returns

Examples

SUCCESSFUL{"success":1,"message":"VLAN tags for VLANs updated","id":"1","data":[]}
ERROR{ "success":0, "message":"error message" }
Required Parameters
NameTypeExampleDescription
domainIdINTEGER1domain ID for domain whose VLANs will be un-tagged
vlanINTEGER or STRING

500

500-510

a single VLAN (not the record ID from the get action results, but actual VLAN ID), OR

range of VLANs (using hyphen for minimum through maximum), OR comma-delimited list of VLANs and/or VLAN ranges

tagIdINTEGER or STRING150,99a single tag ID or comma-delimited list of tag ID's
Optional Parameters

None

Example URL

api/v1/api.php?target=vlan&action=removeTags&domainId=1&vlan=500-510&tagId=159

api/v1/api.php?target=vlan&action=removeTags&domainId=1&vlan=400,406,500-510&tagId=159,160

addTags

URLapi/v1/api.php?target=vlan&action=addTags
DescriptionAdd tags to a domain's VLAN(s).
Returns

Examples

SUCCESSFUL{"success":1,"message":"VLAN tags for VLANs updated","id":"1","data":[]}
ERROR{ "success":0, "message":"

addTags

URL 
Description 
Returns

Examples

SUCCESSFUL 
ERROR{ "success":0, "message":"error message" }
Required Parameters
NameTypeExampleDescription
XXXX
Optional Parameters
NameTypeExampleDescription
XXXX
domainIdINTEGER1domain ID for domain whose VLANs will be un-tagged
vlanINTEGER or STRING

515

500-510

a single VLAN (not the record ID from the get action results, but actual VLAN ID), OR

range of VLANs (using hyphen for minimum through maximum), OR comma-delimited list of VLANs and/or VLAN ranges

tagIdINTEGER or STRING150,99a single tag ID or comma-delimited list of tag ID's
Optional Parameters

None

Example URL

api/v1/api.php?target=vlan&action=addTags&domainId=1&vlan=500-510&tagId=159

api/v1/api.php?target=vlan&action=addTags&domainId=1&vlan=400,406,500-510&tagId=159,160

Example URL 

smartAssign

URL api.php?target=vlan&action=smartAssign
Description Finds and enables an unassigned VLAN matching the provided search parameters and optionally renames it.
Returns

Examples

SUCCESSFUL

Return Data:  the full domain description, plus the chosen VLAN with its new name (optional)

 {"success":1,"message":"VLAN enabled. ","data":{"21":{"id":"21","domain":"Swisscom Demo","attr_6c":"{\"range\":\"E\"}","attr_custom":null,"vlans":[{"id":"46183","vlan":"1808","name":"RESERVED_DEV"}]}}}

ERROR{ "success":0, "message":"error message" }
Required Parameters
NameTypeExampleDescription
domainIdINTEGER15The Id number of the domain you would like to Smart Assign from.
Optional Parameters
NameTypeExampleDescription
tagsSTRING5,7,12A comma-separated list of the Tag Ids being used for the Smart Assign.
nameSTRING

CustomerName_13 , RESERVED_DEV

The name that will be assigned to the VLAN matching the given search parameters. 
Example URLapi.php?target=vlan&action=smartAssign&domainId=21&name=RESERVED_DEV&tags=5,7,12