Uploaded by heru handoko

hadoop api modelv2

advertisement
HADOOP API MODEL
1. Get Security Token
URL: http://10.54.36.39/api/v1/token
Method: GET
Endpoint to retrieve security token
Parameter
Type
username
String
password
String
Action
String
Return Body Example
Description
Username
Password
Login/Logout
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9. ",
"username": "admin",
"fullname": "administrator",
"email": "abcd@telkomsel.co.id",
"role": "Admin"
}
2. Get Table Information
URL : http://10.54.36.38/api/hadoop/info
Method: GET
Input Param
Parameter
Type
Token
String
Description
Security token
{'token':
'MDY1ODAzLCJpZGVudGl0eSI6ImFkbWluIiwiZnJlc2giOnRydWUsInR5cGUiOiJhY2Nlc3MifQ'}
This endpoint is for retrieving data containing Hadoop all table information
When the token is valid it will return the data like below
Return Body Example:
{
"result": [
{
"type": "4G_RAN_ZTE_1"
"description": "Table consisting ZTE 4G Radio Cell Data"
"columns": [
'num_iub_drop',
'denum_iub_drop',
'iub_drop_rate',
'numerator_mean_drop_rate',
'denumerator_mean_drop_rate',
'mean_drop_rate',
'peak_drop_rate',
'max_rtt',
'mean_rtt',
'jitter',
'crc_ethernet_error',
'discard',
'total_usage_ul_average_mbps',
'total_usage_dl_average_mbps',
'total_usage_ul_maximum_mbps',
'total_usage_dl_maximum_mbps',
's1_usage_ul_average_mbps',
's1_usage_dl_average_mbps',
's1_usage_ul_maximum_mbps',
's1_usage_dl_maximum_mbps',
'x2_usage_ul_average_mbps',
'x2_usage_dl_average_mbps',
'x2_usage_ul_maximum_mbps',
'x2_usage_dl_maximum_mbps',
'dl_traffic_volume_mbyte',
'ul_traffic_volume_mbyte',
'total_traffic_volume_mbyte',
'rrc_avg_user_number',
'rrc_max_user_number',
'cell_dl_dimensioning_throughput',
'cell_ul_dimensioning_throughput',
'total_dimensioning_throughput',
'max_dimensioning_throughput',
'numerator_dl_resource_block_utilizing_rate',
'denumerator_dl_resource_block_utilizing_rate',
'dl_resource_block_utilizing_rate',
'numerator_ul_resource_block_utilizing_rate',
'denumerator_ul_resource_block_utilizing_rate',
'ul_resource_block_utilizing_rate',
'max_resource_block_utilizing_rate',
'numerator_rrc_setup_success',
'denumerator_rrc_setup_success',
'rrc_setup_success_rate',
'numerator_e_rab_setup_success_rate',
'denumerator_e_rab_setup_success_rate',
'e_rab_setup_success_rate',
'numerator_s1',
'denumerator_s1',
'numerator_call_setup_success_rate',
'denumerator_call_setup_success_rate',
'call_setup_success_rate',
'numerator_service_drop_excluding_mme',
'denumerator_service_drop_excluding_mme',
'service_drop_rate_excluding_mme',
'numerator_service_drop_rate_including_mme',
'denumerator_service_drop_rate_including_mme',
'service_drop_rate_including_mme',
'numerator_intra_frequency_handover_out_success_rate',
'denumerator_intra_frequency_handover_out_success_rate',
'intra_frequency_handover_out_success_rate',
'numerator_lte_wcdma_redirection_success_rate',
'denumerator_lte_wcdma_redirection_success_rate',
'lte_wcdma_redirection_success_rate',
'numerator_lte_geran_redirection_success_rate',
'denumerator_lte_geran_redirection_success_rate',
'lte_geran_redirect_sr',
'numerator_radio_network_availability_rate',
'denumerator_radio_network_availability_rate',
'radio_network_availability_rate',
'numerator_csfb_preparation_success_rate',
'denumerator_csfb_preparation_success_rate',
'csfb_preparation_success_rate',
'numerator_cell_downlink_throughput',
'denumerator_cell_downlink_throughput',
'cell_downlink_throughput',
'numerator_cell_uplink_throughput',
'denumerator_cell_uplink_throughput',
'cell_uplink_throughput',
'numerator_user_downlink_throughput',
'denumerator_user_downlink_throughput',
'user_downlink_throughput',
'numerator_user_uplink_throughput',
'denumerator_user_uplink_throughput',
'user_uplink_throughput',
'numerator_paging_number_from_s1',
'denumerator_paging_number_from_s1',
'paging_number_from_s1',
'numerator_no_redirection_requests_lte_utran_csfb',
'denumerator_no_redirection_requests_lte_utran_csfb',
'no_redirection_requests_lte_utran_csfb',
'numerator_no_redirection_requests_lte_gsm_csfb',
'denumerator_no_redirection_requests_lte_gsm_csfb',
'no_redirection_requests_lte_gsm_csfb',
'num_inter_frequency_handover_out_success_rate',
'denum_inter_frequency_handover_out_success_rate',
'inter_frequency_handover_out_success_rate',
'numerator_iratho',
'denumerator_iratho',
'iratho',
'cqi_0',
'cqi_1',
'cqi_2',
'cqi_3',
'cqi_4',
'cqi_5',
'cqi_6',
'cqi_7',
'cqi_8',
'cqi_9',
'cqi_10',
'cqi_11',
'cqi_12',
'cqi_13',
'cqi_14',
'cqi_15',
'cqi_dist_denum',
'numerator_pdcch',
'denumerator_pdcch',
'pdcch_agg8',
'ta_index0',
'ta_index1',
'ta_index2',
'ta_index3',
'ta_index4',
'ta_index5',
'ta_index6',
'ta_index7',
'ta_index8',
'ta_index9',
'ta_index10',
'ta_index11',
'total_ta',
'non_bh_interference',
'ta_index0_ratio',
'ta_index1_ratio',
'ta_index2_ratio',
'ta_index3_ratio',
'ta_index4_ratio',
'ta_index5_ratio',
'ta_index6_ratio',
'ta_index7_ratio',
'ta_index8_ratio',
'ta_index9_ratio',
'ta_index10_ratio',
'ta_index11_ratio',
'active_user_dl_data_in_buffer_max',
'active_user_dl_data_in_buffer_avg',
'active_user_ul_data_in_buffer_max',
'active_user_ul_data_in_buffer_avg',
'active_user_ue_rrc_connected_max',
'active_user_ue_rrc_connected_avg',
]
},
{
"type": "TRANSPORT_NOK_1"
"description": "Table consisting Nokia Transport Cell Data"
"columns": [
'num_iub_drop',
'denum_iub_drop',
'iub_drop_rate',
'numerator_mean_drop_rate',
'denumerator_mean_drop_rate',
'mean_drop_rate',
'peak_drop_rate',
'max_rtt',
'mean_rtt',
'jitter',
'crc_ethernet_error',
'discard',
'total_usage_ul_average_mbps',
'total_usage_dl_average_mbps',
'total_usage_ul_maximum_mbps',
'total_usage_dl_maximum_mbps',
's1_usage_ul_average_mbps',
's1_usage_dl_average_mbps',
's1_usage_ul_maximum_mbps',
's1_usage_dl_maximum_mbps',
'x2_usage_ul_average_mbps',
'x2_usage_dl_average_mbps',
'x2_usage_ul_maximum_mbps',
'x2_usage_dl_maximum_mbps',
]
},
]
}
Available types:























'4G_RAN_ERI_1'
'3G_RAN_ERI_1'
'2G_RAN_ERI_1'
'4G_RAN_ZTE_1'
'3G_RAN_ZTE_1'
'2G_RAN_ZTE_1'
'TRANSPORT_ZTE_1'
'4G_RAN_HUA_2'
'3G_RAN_HUA_1'
'2G_RAN_HUA_1'
'TRANSPORT_HUA_1'
'4G_RAN_NOK_1'
'3G_RAN_NOK_1'
'2G_RAN_NOK_1'
'TRANSPORT_NOK_1,
'CORE_PS_2G_NOK_1'
'CORE_PS_3G_NOK_1'
'CORE_PS_4G_NOK_1'
'CORE_CS_NOK_1'
'CORE_PS_ERI_1'
'CORE_CS_ERI_1'
'CORE_PS_HUA_1'
‘DSP_1’
Return Response HTTP Code
Code
200
201
422
Description
Data retrieved successfully.
Data not found.
Invalid token
3. Hadoop Query
URL : http://10.54.36.38/api/hadoop/query
Method: POST
This API endpoint will take JSON argument for the parameters
Parameter
Type
Description
type
String
Select the desired table
agg_mode
String (auto/manual)
Aggregation mode auto will use the default
aggregation formula for all column
If Aggregation mode manual is selected user
can define the aggregation formula for each
column
start_time
finish_time
Datetime string
e.g '2019-03-01 00:00:00'
Datetime string
token
ftp_ip
ftp_user
ftp_password
ftp_path
String
String
String
String
String
columns
List of String
agg_func
List of String
(only radio type can use auto mode and
contain null item in agg_func when manual
mode)
Date and Time range
Date and Time range. Time delta can’t be
more than one month-to-date.
Security token
Target FTP server IP
FTP server username
FTP server password
FTP server directory. File in copying state will
have “COPYING_” prefix (without quotes) at
its filename.
File path must be absolute, startswith “/”
Remote path assumed to be existing.
List of output table columns, leave [] for all
column query
List of customized aggregate function for each
column, the length of columns list and
agg_func list must be the same. Use null to
use default aggregate function
Agg_mode = manual must be selected to use
this
JSON input example:
Example 1
{
'type': '4G_RAN_ZTE_1'
'agg_mode': 'auto',
'start_time': '2019-03-01 00:00:00',
'finish_time': '2019-03-02 00:00:00',
'ftp_ip': '10.10.0.1'
' ftp_user': 'telkomsel'
' ftp_password': 'abc123'
' ftp_path': '/opt/oss/server/var/fileint/pmneexport'
'colums' : [
'numerator_no_redirection_requests_lte_utran_csfb',
'denumerator_no_redirection_requests_lte_utran_csfb',
'no_redirection_requests_lte_utran_csfb',
'numerator_no_redirection_requests_lte_gsm_csfb',
'denumerator_no_redirection_requests_lte_gsm_csfb',
'no_redirection_requests_lte_gsm_csfb',
'num_inter_frequency_handover_out_success_rate',
'denum_inter_frequency_handover_out_success_rate',
'inter_frequency_handover_out_success_rate',
'numerator_iratho',
'denumerator_iratho',
]
'agg_func': []
}
When agg_mode is auto 'agg_func' can be list of none.
Example 2
{
'type': ' TRANSPORT_NOK_1'
'agg_mode': manual,
'start_time': '2019-03-01T00:00:00',
'finish_time': '2019-03-02T00:00:00',
'ftp_ip': '10.10.0.1'
'ftp_user': 'telkomsel'
'ftp_password': 'abc123'
'ftp_path': '/',
'colums' : [
'x2_usage_ul_average_mbps',
'x2_usage_dl_average_mbps',
'x2_usage_ul_maximum_mbps',
'x2_usage_dl_maximum_mbps',
]
'agg_func': [
'sum(x2_usage_ul_average_mbps)',
'sum(x2_usage_dl_average_mbps)',
'min('x2_usage_ul_maximum_mbps')',
'max(x2_usage_dl_maximum_mbps)'
]
}
When agg_mode is manual, the numbers of item in 'colums' and 'agg_func' have to be the same.
When the input is valid it will return a unique string as the task id. It will run task to query to
Hadoop and push to query result to target FTP server.
The generated data (query result) identifier is on Cell level only (Cell Name, LAC-CI).
Response HTTP Status
Code
200
401
422
Response Body
Description
Query sent
Invalid input
Invalid token
{'task_id': 'f5ed60bd-cd32-498b-aeba-669242622b39'}
4. Get Task Status
URL : URL : http://10.54.36.38/api/hadoop/track
This endpoint is for tracking the status of the task
Input Param
Parameter
Token
Task_id
Type
String
String
Description
Security token
String of task id
When the input is valid it will return the task status details.
Return Body
Parameter
task_id
status
Type
String
String
start
finish
path
String
String
String
size
ftp_ip
Example
Integer
String
Description
String of task id
Task status (Running Query, Uploading to FTP
server, Done)
Time when task is started
Time when task is finished
File path in ftp server. File in copying state will
have “COPYING_” prefix (without quotes) at
its filename.
File size of the query result
Target ftp server IP
{
'task_id': 'f5ed60bd-cd32-498b-aeba-669242622b39',
'status': 'Running Query',
'filename': 'Filename',
'start': '2019-03-18T00:00:00',
'finish': '2019-03-18T00:05:00',
'path': '/opt/oss/server/var/fileint/pmneexport',
'size': 120812841,
'ftp_ip': '10.10.0.1'
}
Return HTTP Status
Code
200
Description
Data data retrieved successfully.
201
422
Data not found.
Invalid token
Download