{"openapi":"3.0.0","info":{"title":"5gCore-gNB","description":"This is a sample gNB server.","contact":{"email":"albertlost323@gmail.com"},"license":{"name":"The MIT Lisence","url":"https://lostpoet.mit-license.org/"},"version":"1.0.0"},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/LostPoet/5gCore-gNB/1.0.0"},{"url":"{apiRoot}/5gcore-gnb/v1","variables":{"apiRoot":{"description":"apiRoot as defined in clause clause 4.4 of 3GPP TS 29.501","default":"https://example.com"}}}],"paths":{"/n2-interface":{"post":{"tags":["Interact with AMF"],"operationId":"n2_interface","parameters":[{"name":"messageType","in":"query","description":"indicate the messages type","required":true,"style":"form","explode":true,"schema":{"pattern":"^[A-Z_]+$","type":"string"}}],"responses":{"200":{"description":"Send Request Successfully"},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"},"default":{"description":"Unexpected Error"}},"x-openapi-router-controller":"gnb1.controllers.interact_with_amf_controller"}},"/n3-interface":{"post":{"tags":["Userplane Data Transfer"],"operationId":"n3_interface","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpfDataFlow"}}},"required":true},"responses":{"200":{"description":"Send Request Successfully"},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"},"default":{"description":"Unexpected Error"}},"x-openapi-router-controller":"gnb1.controllers.userplane_data_transfer_controller"}},"/ue-interface":{"post":{"tags":["Interact with UE"],"operationId":"ue_interface","parameters":[{"name":"messageType","in":"query","description":"indicate the messages type","required":true,"style":"form","explode":true,"schema":{"pattern":"^[A-Z_]+$","type":"string"}}],"responses":{"200":{"description":"Send Request Successfully"},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"},"default":{"description":"Unexpected Error"}},"x-openapi-router-controller":"gnb1.controllers.interact_with_ue_controller"}},"/xn-interface":{"post":{"tags":["Interact with peer gNB"],"operationId":"xn_interface","parameters":[{"name":"messageType","in":"query","description":"indicate the messages type","required":true,"style":"form","explode":true,"schema":{"pattern":"^[A-Z_]+$","type":"string"}}],"responses":{"200":{"description":"Send Request Successfully"},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"},"default":{"description":"Unexpected Error"}},"x-openapi-router-controller":"gnb1.controllers.interact_with_peer_gnb_controller"}}},"components":{"schemas":{"UpfDataFlow":{"required":["data","dataType"],"type":"object","properties":{"data":{"type":"string"},"dataType":{"type":"string","enum":["UPLINK","DOWNLINK"]}}},"5gSTmsi":{"required":["prefix","tmsi"],"type":"object","properties":{"prefix":{"$ref":"#/components/schemas/amfSetIdAndAmfPointer"},"tmsi":{"$ref":"#/components/schemas/5gTmsi"}}},"amfSetIdAndAmfPointer":{"pattern":"^[A-Fa-f0-9]{4}$","type":"string"},"5gTmsi":{"pattern":"^[A-Fa-f0-9]{1}$","type":"string"},"5gGuti":{"pattern":"^([0-9]{5,6}[0-9a-fA-F]{14})$","type":"string"},"RegistrationType":{"type":"string","enum":["INITIAL_REGISTRATION","MOBILITY_REGISTRATION_UPDATE","PERIODIC_REGISTRATION_UPDATE","EMERGENCY_REGISTRATION"]},"suci":{"pattern":"^(0-[0-9]{3}-[0-9]{2,3}|[1-7]-.+)-[0-9]{1,4}-(0-0-.+|[a-fA-F1-9]-([1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])-[a-fA-F0-9]+)$","type":"string"},"Dnn":{"type":"string"},"N1MessageContainer":{"required":["n1MessageClass","n1MessageContent"],"type":"object","properties":{"n1MessageClass":{"$ref":"#/components/schemas/N1MessageClass"},"n1MessageContent":{"$ref":"#/components/schemas/RefToBinaryData"},"nfId":{"$ref":"#/components/schemas/NfInstanceId"},"serviceInstanceId":{"type":"string"}}},"N1MessageClass":{"anyOf":[{"type":"string","enum":["5GMM","SM","LPP","SMS","UPDP","LCS"]},{"type":"string"}]},"PduSessionType":{"anyOf":[{"type":"string","enum":["IPV4","IPV6","IPV4V6","UNSTRUCTURED","ETHERNET"]},{"type":"string"}]},"MaxIntegrityProtectedDataRate":{"description":"Possible values are\n  - 64_KBPS\n  - MAX_UE_RATE\n","anyOf":[{"type":"string","enum":["64_KBPS","MAX_UE_RATE"]},{"type":"string","description":"This string provides forward-compatibility with future extensions to the enumeration but is not used to encode content defined in the present version of this API.\n"}]},"Ambr":{"required":["downlink","uplink"],"type":"object","properties":{"uplink":{"$ref":"#/components/schemas/BitRate"},"downlink":{"$ref":"#/components/schemas/BitRate"}}},"BitRate":{"pattern":"^\\d+(\\.\\d+)? (bps|Kbps|Mbps|Gbps|Tbps)$","type":"string"},"TunnelInfo":{"required":["gtpTeid"],"type":"object","properties":{"ipv4Addr":{"$ref":"#/components/schemas/Ipv4Addr"},"ipv6Addr":{"$ref":"#/components/schemas/Ipv6Addr"},"gtpTeid":{"$ref":"#/components/schemas/Teid"},"anType":{"$ref":"#/components/schemas/AccessType"}}},"Teid":{"pattern":"^[A-F0-9]{8}$","type":"string"},"N2InfoContainer":{"required":["n2InformationClass"],"type":"object","properties":{"n2InformationClass":{"$ref":"#/components/schemas/N2InformationClass"},"smInfo":{"$ref":"#/components/schemas/N2SmInformation"},"ranInfo":{"$ref":"#/components/schemas/N2RanInformation"},"nrppaInfo":{"$ref":"#/components/schemas/NrppaInformation"},"pwsInfo":{"$ref":"#/components/schemas/PwsInformation"}}},"N2InformationClass":{"anyOf":[{"type":"string","enum":["SM","NRPPa","PWS","PWS-BCAL","PWS-RF","RAN"]},{"type":"string"}]},"N2SmInformation":{"required":["pduSessionId"],"type":"object","properties":{"pduSessionId":{"$ref":"#/components/schemas/PduSessionId"},"n2InfoContent":{"$ref":"#/components/schemas/N2InfoContent"},"sNssai":{"$ref":"#/components/schemas/Snssai"},"homePlmnSnssai":{"$ref":"#/components/schemas/Snssai"},"subjectToHo":{"type":"boolean"}}},"PduSessionId":{"maximum":255,"minimum":0,"type":"integer"},"Snssai":{"required":["sst"],"type":"object","properties":{"sst":{"maximum":255,"minimum":0,"type":"integer"},"sd":{"pattern":"^[A-Fa-f0-9]{6}$","type":"string"}}},"N2RanInformation":{"required":["n2InfoContent"],"type":"object","properties":{"n2InfoContent":{"$ref":"#/components/schemas/N2InfoContent"}}},"N2InfoContent":{"required":["ngapData"],"type":"object","properties":{"ngapMessageType":{"$ref":"#/components/schemas/Uinteger"},"ngapIeType":{"$ref":"#/components/schemas/NgapIeType"},"ngapData":{"$ref":"#/components/schemas/RefToBinaryData"}}},"Uinteger":{"minimum":0,"type":"integer"},"NgapIeType":{"anyOf":[{"type":"string","enum":["PDU_RES_SETUP_REQ","PDU_RES_REL_CMD","PDU_RES_MOD_REQ","HANDOVER_CMD","HANDOVER_REQUIRED","HANDOVER_PREP_FAIL","SRC_TO_TAR_CONTAINER","TAR_TO_SRC_CONTAINER","RAN_STATUS_TRANS_CONTAINER","SON_CONFIG_TRANSFER","NRPPA_PDU","UE_RADIO_CAPABILITY","RIM_INFO_TRANSFER","SECONDARY_RAT_USAGE"]},{"type":"string"}]},"RefToBinaryData":{"required":["contentId"],"type":"object","properties":{"contentId":{"type":"string"}}},"NrppaInformation":{"required":["nfId","nrppaPdu"],"type":"object","properties":{"nfId":{"$ref":"#/components/schemas/NfInstanceId"},"nrppaPdu":{"$ref":"#/components/schemas/N2InfoContent"},"serviceInstanceId":{"type":"string"}}},"PwsInformation":{"required":["messageIdentifier","pwsContainer","serialNumber"],"type":"object","properties":{"messageIdentifier":{"$ref":"#/components/schemas/Uint16"},"serialNumber":{"$ref":"#/components/schemas/Uint16"},"pwsContainer":{"$ref":"#/components/schemas/N2InfoContent"},"sendRanResponse":{"type":"boolean","default":false},"omcId":{"$ref":"#/components/schemas/OmcIdentifier"}}},"Uint16":{"maximum":65535,"minimum":0,"type":"integer"},"OmcIdentifier":{"type":"string"},"Guami":{"required":["amfId","plmnId"],"type":"object","properties":{"plmnId":{"$ref":"#/components/schemas/PlmnId"},"amfId":{"$ref":"#/components/schemas/AmfId"}}},"PlmnId":{"required":["mcc","mnc"],"type":"object","properties":{"mcc":{"$ref":"#/components/schemas/Mcc"},"mnc":{"$ref":"#/components/schemas/Mnc"}}},"Mcc":{"pattern":"^\\d{3}$","type":"string"},"Mnc":{"pattern":"^\\d{2,3}$","type":"string"},"AmfId":{"pattern":"^[A-Fa-f0-9]{6}$","type":"string"},"Pei":{"pattern":"^(imei-[0-9]{15}|imeisv-[0-9]{16}|mac([0-9a-fA-F]{2})((-[0-9a-fA-F]{2}){5})|.+)$","type":"string","example":"2769169126891"},"Tai":{"required":["plmnId","tac"],"type":"object","properties":{"plmnId":{"$ref":"#/components/schemas/PlmnId"},"tac":{"$ref":"#/components/schemas/Tac"},"nid":{"$ref":"#/components/schemas/Nid"}}},"Tac":{"pattern":"^([A-Fa-f0-9]{4})|([A-Fa-f0-9]{6})$","type":"string"},"Nid":{"pattern":"^[A-Fa-f0-9]{13}$","type":"string"},"UserLocation":{"type":"object","properties":{"eutraLocation":{"$ref":"#/components/schemas/EutraLocation"},"nrLocation":{"$ref":"#/components/schemas/NrLocation"},"n3gaLocation":{"$ref":"#/components/schemas/N3gaLocation"}}},"EutraLocation":{"required":["ecgi","tai"],"type":"object","properties":{"tai":{"$ref":"#/components/schemas/Tai"},"ecgi":{"$ref":"#/components/schemas/Ecgi"},"ignoreEcgi":{"type":"boolean","default":false},"ageOfLocationInformation":{"maximum":32767,"minimum":0,"type":"integer"},"ueLocationTimestamp":{"$ref":"#/components/schemas/DateTime"},"geographicalInformation":{"pattern":"^[0-9A-F]{16}$","type":"string"},"geodeticInformation":{"pattern":"^[0-9A-F]{20}$","type":"string"},"globalNgenbId":{"$ref":"#/components/schemas/GlobalRanNodeId"},"globalENbId":{"$ref":"#/components/schemas/GlobalRanNodeId"}}},"Ecgi":{"required":["eutraCellId","plmnId"],"type":"object","properties":{"plmnId":{"$ref":"#/components/schemas/PlmnId"},"eutraCellId":{"$ref":"#/components/schemas/EutraCellId"},"nid":{"$ref":"#/components/schemas/Nid"}}},"EutraCellId":{"pattern":"^[A-Fa-f0-9]{7}$","type":"string"},"DateTime":{"type":"string","format":"date-time"},"NrLocation":{"required":["ncgi","tai"],"type":"object","properties":{"tai":{"$ref":"#/components/schemas/Tai"},"ncgi":{"$ref":"#/components/schemas/Ncgi"},"ageOfLocationInformation":{"maximum":32767,"minimum":0,"type":"integer"},"ueLocationTimestamp":{"$ref":"#/components/schemas/DateTime"},"geographicalInformation":{"pattern":"^[0-9A-F]{16}$","type":"string"},"geodeticInformation":{"pattern":"^[0-9A-F]{20}$","type":"string"},"globalGnbId":{"$ref":"#/components/schemas/GlobalRanNodeId"}}},"Ncgi":{"required":["nrCellId","plmnId"],"type":"object","properties":{"plmnId":{"$ref":"#/components/schemas/PlmnId"},"nrCellId":{"$ref":"#/components/schemas/NrCellId"},"nid":{"$ref":"#/components/schemas/Nid"}}},"NrCellId":{"pattern":"^[A-Fa-f0-9]{9}$","type":"string"},"N3gaLocation":{"type":"object","properties":{"n3gppTai":{"$ref":"#/components/schemas/Tai"},"n3IwfId":{"pattern":"^[A-Fa-f0-9]+$","type":"string"},"ueIpv4Addr":{"$ref":"#/components/schemas/Ipv4Addr"},"ueIpv6Addr":{"$ref":"#/components/schemas/Ipv6Addr"},"portNumber":{"$ref":"#/components/schemas/Uinteger"},"ssId":{"type":"string"},"bssId":{"type":"string"},"tnapCivicAddress":{"$ref":"#/components/schemas/Bytes"},"hfcNodeId":{"$ref":"#/components/schemas/HfcNodeId"}}},"Bytes":{"type":"string","format":"byte"},"HfcNodeId":{"required":["hfcNId"],"type":"object","properties":{"hfcNId":{"$ref":"#/components/schemas/HfcNId"},"macAddr":{"$ref":"#/components/schemas/MacAddr48"}}},"HfcNId":{"maxLength":6,"type":"string"},"MacAddr48":{"pattern":"^([0-9a-fA-F]{2})((-[0-9a-fA-F]{2}){5})$","type":"string"},"GlobalRanNodeId":{"required":["plmnId"],"type":"object","properties":{"plmnId":{"$ref":"#/components/schemas/PlmnId"},"n3IwfId":{"$ref":"#/components/schemas/N3IwfId"},"gNbId":{"$ref":"#/components/schemas/GNbId"},"ngeNbId":{"$ref":"#/components/schemas/NgeNbId"},"nid":{"$ref":"#/components/schemas/Nid"},"eNbId":{"$ref":"#/components/schemas/ENbId"}}},"N3IwfId":{"pattern":"^[A-Fa-f0-9]+$","type":"string"},"GNbId":{"required":["bitLength","gNBValue"],"type":"object","properties":{"bitLength":{"maximum":32,"minimum":22,"type":"integer"},"gNBValue":{"pattern":"^[A-Fa-f0-9]{6,8}$","type":"string"}}},"NgeNbId":{"pattern":"^(MacroNGeNB-[A-Fa-f0-9]{5}|LMacroNGeNB-[A-Fa-f0-9]{6}|SMacroNGeNB-[A-Fa-f0-9]{5})$","type":"string"},"ENbId":{"pattern":"^(MacroeNB-[A-Fa-f0-9]{5}|LMacroeNB-[A-Fa-f0-9]{6}|SMacroeNB-[A-Fa-f0-9]{5}|HomeeNB-[A-Fa-f0-9]{7})$","type":"string"},"AccessType":{"type":"string","enum":["3GPP_ACCESS","NON_3GPP_ACCESS"]},"NfInstanceId":{"type":"string","format":"uuid"},"CorrelationID":{"maxLength":255,"minLength":1,"type":"string"},"Ipv4Addr":{"pattern":"^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$","type":"string","example":"198.51.100.1"},"Ipv6Addr":{"type":"string","example":"2001:db8:85a3::8a2e:370:7334","allOf":[{"pattern":"^((:|(0?|([1-9a-f][0-9a-f]{0,3}))):)((0?|([1-9a-f][0-9a-f]{0,3})):){0,6}(:|(0?|([1-9a-f][0-9a-f]{0,3})))$"},{"pattern":"^((([^:]+:){7}([^:]+))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))$"}]}}}}