Skip to content

OLT Gem Mapping ​

5 operations. Call any of them with omada_call_operation (or, in full tool mode, as a tool named by its operationId).

OperationMethodSummary
addGemMappingPOSTCreate new gem mapping
deleteGemMappingPOSTDelete an existing gem mapping
editGemMappingPOSTModify an existing gem mapping
getGemMappingListGETGet gem mapping list
getGemMappingPageGETGet gem mapping page

addGemMapping ​

POST /openapi/v1/{omadacId}/sites/{siteId}/olts/{deviceMac}/pon/profile/line/{lineProfileId}/gem-mappings/add

Create new gem mapping

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
deviceMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
lineProfileIdpathstringyesLine Profile ID should be a number between 0-512

Request body — application/json (required) — schema GemMappingDTO

FieldTypeRequiredDescription
gemMappingIdintegeryesGemMappingId should be within the range of 1 to 8,and should not be null
lineProfileIdintegernoThe ID of the associated Line Profile should be within the range of 1 to 512.
gemPortIdintegeryesGem port ID should be within the range of 1 to 1023
vlanTypestringnoThe mapping relationship between Gem Port and VLAN is valid when the Line Profile's mappingMode is set to: Vlan, Vlan-Priority, Port-Vlan, or Port-VLAN-Priority. VlanType should be a value as follows: TAGGED;UNTAGGED, with the default value being TAGGED.
vlanIdintegernoVLAN ID is valid when the vlanType is set to Tagged. VlanId should be within the range of 1 to 4094.
priorityintegernoThe mapping relationship between Gem Port and 802.1p priority.It is valid when the Line Profile's mappingMode is set to: Priority, Vlan-Priority, Port-Priority, or Port-VLAN-Priority. Priority should be within the range of 0 to 7.
portMappingTypestringnoThe mapping relationship between Gem Port and ONT Port ID is valid when the Line Profile's mappingMode is set to: Port, Port-Vlan, Port-Priority, or Port-Vlan-Priority. PortMappingType should be a value as follows:ETH;POTS, with the default value being ETH.
portIdintegernoThe mapped ONT port ID is valid when the portMappingType has a value. When portMappingType is ETH, portId should be within the range of 1 to 24.
json
// omada_call_operation
{
  "operationId": "addGemMapping",
  "params": {
    "siteId": "<siteId>",
    "deviceMac": "<deviceMac>",
    "lineProfileId": "<lineProfileId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Create new gem mapping
The interface requires one of the permissions:
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-45000 - This OLT does not exist.
-45001 - The OLT is offline. Please reconnect
-45002 - OLT upgrading... Cannot manage the device now.
-45003 - OLT rebooting... Cannot manage the device now.

deleteGemMapping ​

POST /openapi/v1/{omadacId}/sites/{siteId}/olts/{deviceMac}/pon/profile/line/{lineProfileId}/gem-mappings/delete

Delete an existing gem mapping

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
deviceMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
lineProfileIdpathstringyesLine Profile ID should be a number between 0-512

Request body — application/json (required) — schema GemMappingDeleteDTO

FieldTypeRequiredDescription
lineProfileIdintegernoThe ID of the associated Line Profile,lineProfileId should be within the range of 1 to 512.
gemMappingListarray<GemMappingDeleteItem>yesgemMappingList
json
// omada_call_operation
{
  "operationId": "deleteGemMapping",
  "params": {
    "siteId": "<siteId>",
    "deviceMac": "<deviceMac>",
    "lineProfileId": "<lineProfileId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Delete an existing gem mapping
The interface requires one of the permissions:
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-45000 - This OLT does not exist.
-45001 - The OLT is offline. Please reconnect
-45002 - OLT upgrading... Cannot manage the device now.
-45003 - OLT rebooting... Cannot manage the device now.

editGemMapping ​

POST /openapi/v1/{omadacId}/sites/{siteId}/olts/{deviceMac}/pon/profile/line/{lineProfileId}/gem-mappings/edit

Modify an existing gem mapping

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
deviceMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
lineProfileIdpathstringyesLine Profile ID should be a number between 0-512

Request body — application/json (required) — schema GemMappingModifyDTO

FieldTypeRequiredDescription
gemMappingIdintegeryesGemMappingId should be within the range of 1 to 8,and should not be null
lineProfileIdintegernoThe ID of the associated Line Profile,lineProfileId should be within the range of 1 to 512.
gemPortIdintegeryesGem port ID should be within the range of 1 to 1023
vlanTypestringnoThe mapping relationship between Gem Port and VLAN is valid when the Line Profile's mappingMode is set to: Vlan, Vlan-Priority, Port-Vlan, or Port-VLAN-Priority. VlanType should be a value as follows: TAGGED;UNTAGGED, with the default value being TAGGED.
vlanIdintegernoVLAN ID is valid when the vlanType is set to Tagged. VlanId should be within the range of 1 to 4094.
priorityintegernoThe mapping relationship between Gem Port and 802.1p priority.It is valid when the Line Profile's mappingMode is set to: Priority, Vlan-Priority, Port-Priority, or Port-VLAN-Priority. Priority should be within the range of 0 to 7.
portMappingTypestringnoThe mapping relationship between Gem Port and ONT Port ID is valid when the Line Profile's mappingMode is set to: Port, Port-Vlan, Port-Priority, or Port-Vlan-Priority. PortMappingType should be a value as follows: ETH, with the default value being ETH.
portIdintegernoThe mapped ONT port ID is valid when the portMappingType has a value. When portMappingType is ETH, portId should be within the range of 1 to 24.
json
// omada_call_operation
{
  "operationId": "editGemMapping",
  "params": {
    "siteId": "<siteId>",
    "deviceMac": "<deviceMac>",
    "lineProfileId": "<lineProfileId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify an existing gem mapping
The interface requires one of the permissions:
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-45000 - This OLT does not exist.
-45001 - The OLT is offline. Please reconnect
-45002 - OLT upgrading... Cannot manage the device now.
-45003 - OLT rebooting... Cannot manage the device now.

getGemMappingList ​

GET /openapi/v1/{omadacId}/sites/{siteId}/olts/{deviceMac}/pon/profile/line/{lineProfileId}/gem-mappings/list

Get gem mapping list

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
deviceMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
lineProfileIdpathstringyesLine Profile ID should be a number between 0-512
queryParamqueryGemMappingListQueryDTOnoObject: its fields (searchKey, sorts, lineProfileId) are sent as separate query parameters.
json
// omada_call_operation
{
  "operationId": "getGemMappingList",
  "params": {
    "siteId": "<siteId>",
    "deviceMac": "<deviceMac>",
    "lineProfileId": "<lineProfileId>"
  }
}
Details, permissions and error codes

Get gem mapping list
The interface requires one of the permissions:
Site Device Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-45000 - This OLT does not exist.
-45001 - The OLT is offline. Please reconnect
-45002 - OLT upgrading... Cannot manage the device now.
-45003 - OLT rebooting... Cannot manage the device now.

getGemMappingPage ​

GET /openapi/v1/{omadacId}/sites/{siteId}/olts/{deviceMac}/pon/profile/line/{lineProfileId}/gem-mappings/page

Get gem mapping page

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
deviceMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
lineProfileIdpathstringyesLine Profile ID should be a number between 0-512
queryParamqueryGemMappingPageQueryDTOnoObject: its fields (searchKey, sorts, size, number, lineProfileId) are sent as separate query parameters.
json
// omada_call_operation
{
  "operationId": "getGemMappingPage",
  "params": {
    "siteId": "<siteId>",
    "deviceMac": "<deviceMac>",
    "lineProfileId": "<lineProfileId>"
  }
}
Details, permissions and error codes

Get gem mapping page
The interface requires one of the permissions:
Site Device Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-45000 - This OLT does not exist.
-45001 - The OLT is offline. Please reconnect
-45002 - OLT upgrading... Cannot manage the device now.
-45003 - OLT rebooting... Cannot manage the device now.

Released under the MIT License. Not affiliated with or endorsed by TP-Link.