Interface Design¶
Introduction to MEP interface¶
MEP majorly consists of two main functional modules, MEP-server and MEP-auth. The MEP server interface is divided into two categories, one is the Mp1 interface that follows the ETSI MEC 011 v2.1.1 standard, which mainly provides functions such as service registration discovery, App status notification subscription, and Dns rule acquisition; the other is the Mm5 interface, mainly provides configuration management functions for MECM/MEPM. MEP auth is currently mainly used as an authentication module to provide App with the function of token application and issuance. URL is the service’s own URL, and PORT is the service’s own PORT. If it passes through KONG, PORT becomes KONG’s PORT, and the URL needs to add the corresponding route. Mepauth directly adds {KONG_MEPAUTH_ROUTE} (the current value is /mepauth), and mepserver replaces /mep with {KONG_MEPSERVER_ROUTE} (the current value is /mepserver).
MEP-auth module interface¶
Service Authentication Interface¶
The application authenticates to LDVS through AK/SK, and returns the token after passing the authentication. Each token has a validity period (1 hour). The token distributor will withdraw the token after the validity period ends. When the HTTP request with expired token arrives, it will be returned with status code 401. At this time, the token carrier needs to re-acquire the token. When the token is still valid, the bearer of the token will return the token that is still valid when the same user obtains the token again.
URL
POST /mep/token
Request Parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
Content-Type |
String |
MIME type, fill “application/json” |
header |
Yes |
Authorization |
String |
Certification information |
header |
Yes |
x-sdk-date |
String |
Signature time (current time stamp, format: YYYYMMDDTHHMMSSZ) |
header |
Yes |
Host |
String |
It is consistent with the host field used for generating the authentication information signature. |
header |
Yes |
Body parameters
No
Example Request
POST /mep/token
{
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "SDK-HMAC-SHA256 Access= QVUJMSUMgS0VZLS0tLS0=,
SignedHeaders=content-type;host;x-sdk-date,
Signature=142b0dc3feaeb3662b2033a8e6425596546e08a231aa39179b4060867dd15d3d"
},
{
"key": "x-sdk-date",
"value": "20060102T150405Z"
},
{
"key":"Host",
"value":"xxx"
}
]
}
Return parameter
Return code: 200
OK
Name |
Type |
Description |
Required |
---|---|---|---|
access_token |
String |
Token |
Yes |
token_type |
String |
Token Type (Bearer) |
Yes |
expires_in |
int |
Invalidate Time |
Yes |
Return Example
HTTP/1.1 200 OK
{
"access_token":"xxxx",
"token_type":"Bearer",
"expires_in":"3600"
}
Note: When testing, ensure that the AK/SK used when starting the EG-LDVS is the same AAK/SK used for the token acquisition.For authentication based on AK/SK, EG-LDVS fails three authentication failures within 5 minutes of the same AK, and the corresponding AK will be locked for 15 minutes.
AK/SK configuration interface¶
URL
PUT /mep/appMng/v1/applications/{appInstanceId}/confs
Request Parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
Content-Type |
String |
MIME type, fill “application/json” |
header |
Yes |
appInstanceId |
String |
APP Instance ID (UUID) |
path |
Yes |
Body parameters
Name |
Type |
Description |
Required |
---|---|---|---|
authInfo |
Object |
User information |
Yes |
>credentials |
Object |
Certificate information |
Yes |
>>accessKeyId |
String |
AK |
Yes |
>>secretKey |
String |
SK |
Yes |
appInfo |
Object |
app information |
Yes |
>appName |
String |
app name |
Yes |
>requiredServices |
Array[String] |
List of service dependent services |
Yes |
Example Request
PUT /mep/appMng/v1/applications/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f/confs
{
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"authInfo": {
"credentials": {
"accessKeyId": "QVUJMSUMgS0VZLS0tLS0",
"secretKey": "DXPb4sqElKhcHe07Kw5uorayETwId1JOjjOIRomRs5wyszoCR5R7AtVa28KT3lSc"
}
},
"appInfo": {
"appName": "name1",
"requiredServices": [
"serviceA",
"serviceB"
]
}
}
}
Return parameter
Return code: 200
Name |
Type |
Description |
Required |
---|---|---|---|
authInfo |
Object |
User information |
Yes |
>credentials |
Object |
Certificate information |
Yes |
>>accessKeyId |
String |
AK |
Yes |
>>secretKey |
String |
SK |
Yes |
appInfo |
Object |
app information |
Yes |
>appName |
String |
app name |
Yes |
>requiredServices |
Array[String] |
app-dependent services |
Yes |
Return Example
HTTP/1.1 200 OK
{
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"authInfo": {
"credentials": {
"accessKeyId": "QVUJMSUMgS0VZLS0tLS0",
"secretKey": "DXPb4sqElKhcHe07Kw5uorayETwId1JOjjOIRomRs5wyszoCR5R7AtVa28KT3lSc"
}
},
"appInfo": {
"appName": "name1",
"requiredServices": [
"serviceA",
"serviceB"
]
}
}
}
MEP-server interface¶
Service¶
1. Query availability services list¶
This method retrieves information about a list of mecService resources. This method is typically used in “service availability query” procedure
URL
GET /mep/mec_service_mgmt/v1/services
Request Parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
Authorization |
String |
Token information, format: Bearer token information |
header |
Yes |
X-AppInstanceId |
String |
App instance id |
header |
Yes |
ser_name |
String |
service name |
query |
No |
Body parameters
No
Example Request
GET /mep/mec_service_mgmt/v1/services?ser_name=xxx
{
"header": [
{
"key": "Authorization",
"value": "Bearer xxx"
},
{
"key": "X-AppInstanceId",
"value": "xxx"
}
]
}
Return parameter
Return code: 200
OK
Name |
Type |
Description |
Required |
---|---|---|---|
serInstanceId |
String |
Service Instance ID |
Yes |
serName |
String |
Service Name |
Yes |
serCategory |
Object |
Service Class |
No |
>href |
String |
Directory reference |
No |
>id |
String |
Class ID |
No |
>name |
String |
Class name |
No |
>version |
String |
class version number |
No |
version |
String |
Service version number |
Yes |
state |
String |
Service Status (ACTIVE/INACTIVE) |
Yes |
transportInfo |
Object |
Service information |
No |
>id |
String |
ID |
No |
>name |
String |
Name |
No |
> description |
String |
Description |
No |
> type |
String |
Type (REST_HTTP/MB_TOPIC_BASED/MB_ROUTING/MB_PUBSUB/RPC/RPC_STREAMING/WEBSOCKET) |
No |
> protocol |
String |
Agreement Name |
No |
> version |
String |
version number |
No |
> endpoint |
Ojbect |
Endpoint, one of the three messages (uris/addresses/alternative) |
No |
>>uris |
Array[String] |
List of service portals in URI format |
No |
>>addresses |
Array[Object] |
List of service entrance information addresses (IP address + port number) |
No |
>>>host |
String |
IP Address |
No |
>>>port |
String |
port number |
No |
>>alternative |
String |
Service entrance information for the format or external specification definition |
No |
> security |
Object |
Security information |
No |
>> oAuth2Info |
Object |
OAuth2.0 parameter |
No |
>>> grantTypes |
Array[String] |
granted type (OAUTH2_AUTHORIZATION_CODE/OAUTH2_IMPLICIT_GRANT/OAUTH2_RESOURCE_OWNER/OAUTH2_CLIENT_CREDENTIALS) |
No |
>>> tokenEndpoint |
String |
Token endpoint |
No |
> implSpecificInfo |
String |
Other realized information |
No |
serializer |
String |
Serialization Type (JSON/XML/PROTOBUF3) |
Yes |
scopeOfLocality |
String |
Geographical range (MEC_SYSTEM/MEC_HOST/NFVI_POP/ZONE/ZONE_GROUP/NFVI_NODE), default value MEC_HOST |
No |
consumedLocalOnly |
boolean |
Is it only consumed by local APP (true/false) |
No |
isLocal |
boolean |
Is Local Domain (true/false) |
No |
livenessInterval |
integer |
Interval (in seconds) between two consecutive heartbeat messages |
No |
_links |
Object |
Links to resources related to this resource. Shall be absent in HTTP requests. |
No |
>self |
object |
Link to this resource. Shall be present in HTTP responses. |
No |
>>liveness |
string |
Link to the resource where the MEC platform expects the service instance to send the liveness information. |
No |
Return Example
HTTP/1.1 200 OK
[
{
"serInstanceId": "0bc92b06cc213d2ad8beda71bd0e1460",
"serName": "ExampleService",
"serCategory": {
"href": "/example/catalogue1",
"id": "id12345",
"name": "RNI",
"version": "version1"
},
"version": "ServiceVersion1",
"state": "ACTIVE",
"transportInfo": {
"id": "TransId12345",
"name": "REST",
"description": "REST API",
"type": "REST_HTTP",
"protocol": "HTTP",
"version": "2.0",
"endpoint": {},
"security": {
"oAuth2Info": {
"grantTypes": [
"OAUTH2_CLIENT_CREDENTIALS"
],
"tokenEndpoint": "/mecSerMgmtApi/security/TokenEndPoint"
}
},
"implSpecificInfo": {}
},
"serializer": "JSON",
"scopeOfLocality": "MEC_SYSTEM",
"consumedLocalOnly": false,
"isLocal": true,
"livenessInterval": 60,
"_links": {
"self": {
"liveness" : "/mec_service_mgmt/v1/applications/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f/service/0bc92b06cc213d2ad8beda71bd0e1460/liveness"
}
}
}
]
2. Query availability individual service¶
This method retrieves information about a mecService resource. This method is typically used in “service availability query” procedure
URL
GET /mep/mec_service_mgmt/v1/services/{serviceId}
Request Parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
serviceId |
String |
service id |
path |
Yes |
Authorization |
String |
Token information, format: Bearer token information |
header |
Yes |
ser_name |
String |
service name |
query |
No |
Body parameters
No
Example Request
GET /mep/mec_service_mgmt/v1/services?ser_name=xxx
{
"header": [
{
"key": "Authorization",
"value": "Bearer xxx"
}
]
}
Return parameter
Return code: 200
OK
Name |
Type |
Description |
Required |
---|---|---|---|
serInstanceId |
String |
Service Instance ID |
Yes |
serName |
String |
Service Name |
Yes |
serCategory |
Object |
Service Class |
No |
>href |
String |
Directory reference |
No |
>id |
String |
Class ID |
No |
>name |
String |
Class name |
No |
>version |
String |
class version number |
No |
version |
String |
Service version number |
Yes |
state |
String |
Service Status (ACTIVE/INACTIVE) |
Yes |
transportInfo |
Object |
Service information |
No |
>id |
String |
ID |
No |
>name |
String |
Name |
No |
> description |
String |
Description |
No |
> type |
String |
Type (REST_HTTP/MB_TOPIC_BASED/MB_ROUTING/MB_PUBSUB/RPC/RPC_STREAMING/WEBSOCKET) |
No |
> protocol |
String |
Agreement Name |
No |
> version |
String |
version number |
No |
> endpoint |
Ojbect |
Endpoint, one of the three messages (uris/addresses/alternative) |
No |
>>uris |
Array[String] |
List of service portals in URI format |
No |
>>addresses |
Array[Object] |
List of service entrance information addresses (IP address + port number) |
No |
>>>host |
String |
IP Address |
No |
>>>port |
String |
port number |
No |
>>alternative |
String |
Service entrance information for the format or external specification definition |
No |
> security |
Object |
Security information |
No |
>> oAuth2Info |
Object |
OAuth2.0 parameter |
No |
>>> grantTypes |
Array[String] |
granted type (OAUTH2_AUTHORIZATION_CODE/OAUTH2_IMPLICIT_GRANT/OAUTH2_RESOURCE_OWNER/OAUTH2_CLIENT_CREDENTIALS) |
No |
>>> tokenEndpoint |
String |
Token endpoint |
No |
> implSpecificInfo |
String |
Other realized information |
No |
serializer |
String |
Serialization Type (JSON/XML/PROTOBUF3) |
Yes |
scopeOfLocality |
String |
Geographical range (MEC_SYSTEM/MEC_HOST/NFVI_POP/ZONE/ZONE_GROUP/NFVI_NODE), default value MEC_HOST |
No |
consumedLocalOnly |
boolean |
Is it only consumed by local APP (true/false) |
No |
isLocal |
boolean |
Is Local Domain (true/false) |
No |
livenessInterval |
integer |
Interval (in seconds) between two consecutive heartbeat messages |
No |
_links |
Object |
Links to resources related to this resource. Shall be absent in HTTP requests. |
No |
>self |
object |
Link to this resource. Shall be present in HTTP responses. |
No |
>>liveness |
string |
Link to the resource where the MEC platform expects the service instance to send the liveness information. |
No |
Return Example
HTTP/1.1 200 OK
{
"serInstanceId": "0bc92b06cc213d2ad8beda71bd0e1460",
"serName": "ExampleService",
"serCategory": {
"href": "/example/catalogue1",
"id": "id12345",
"name": "RNI",
"version": "version1"
},
"version": "ServiceVersion1",
"state": "ACTIVE",
"transportInfo": {
"id": "TransId12345",
"name": "REST",
"description": "REST API",
"type": "REST_HTTP",
"protocol": "HTTP",
"version": "2.0",
"endpoint": {},
"security": {
"oAuth2Info": {
"grantTypes": [
"OAUTH2_CLIENT_CREDENTIALS"
],
"tokenEndpoint": "/mecSerMgmtApi/security/TokenEndPoint"
}
},
"implSpecificInfo": {}
},
"serializer": "JSON",
"scopeOfLocality": "MEC_SYSTEM",
"consumedLocalOnly": false,
"isLocal": true,
"livenessInterval": 60,
"_links": {
"self": {
"liveness" : "/mec_service_mgmt/v1/applications/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f/service/0bc92b06cc213d2ad8beda71bd0e1460/liveness"
}
}
}
3. Query transport information¶
Transport information query provides a standardized means to the MEC applications to discover the available transports supported in MEP.
URL
GET mep/mec_service_mgmt/v1/transports
Request parameters
None
Body Parameters
None
Example Request
GET mep/mec_service_mgmt/v1/transports
Return Parameters
Name | Type | Description | Required |
---|---|---|---|
id | string | Transport ID. | Yes |
name | string | Transport name. | Yes |
description | string | Description about the transport. | No |
type | TransportType | Transport type. | Yes |
protocol | string | Name of the protocol used. | Yes |
version | string | Version of the protocol used. | Yes |
endpoint | EndPointInfo | Information about the endpoint to access the transport. | Yes |
security | SecurityInfo | Information about the security used by the transport. | Yes |
implSpecificInfo | Object | Any other implementation specific information. | No |
Return Code: 200 OK
Example Response
HTTP/1.1 200 OK
[
{
"id": "TransId12345",
"name": "REST",
"description": "REST API",
"type": "REST_HTTP",
"protocol": "HTTP",
"version": "2.0",
"endpoint": {},
"security": {
"oAuth2Info": {
"grantTypes": [
"OAUTH2_CLIENT_CREDENTIALS"
],
"tokenEndpoint": "/mecSerMgmtApi/security/TokenEndPoint"
}
},
"implSpecificInfo": {}
}
]
Exception status code
HTTP Status Code | Description |
---|---|
400 | Bad request, used to indicate that the requested parameters are incorrect. |
403 | The current operation is forbidden. |
404 | The requested resource was not found. |
DNS rule configuration interfaces¶
Using the Mp1 interfaces mec apps can query and activate/deactivate dns rules associated to it. Implementation of this interface are as per the ETSI GS MEC 011 V2.1.1 document.
1. Query all dns rules¶
Query all DNS rules associated with an application.
URL
GET /mep/mec_app_support/v1/applications/{appInstanceId}/dns_rules
Request parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
Authorization |
String |
Token information, format: Bearer token information |
header |
Yes |
appInstanceId |
String |
APP Instance ID (UUID) |
path |
Yes |
Body Parameters
None
Example Request
GET /mep/mec_app_support/v1/applications/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f/dns_rules
Return Parameters
Name |
Type |
Description |
---|---|---|
dnsRuleId |
string |
Rule Id |
domainName |
string |
MEC app domain name |
ipAddressType |
enum {IP_V4, IP_V6} |
MEC app ip address type |
ipAddress |
string |
MEC app ip address |
ttl |
int (non-zero value) |
TTL value |
state |
enum {ACTIVE, INACTIVE} |
State |
Return Code: 200 OK
Example Response
HTTP/1.1 200 OK
[
{
"dnsRuleId": "20a19292-384c-4d44-ba64-a8e8269f0f25",
"domainName": "voicerecgservice.com",
"ipAddressType": "IP_V4",
"ipAddress": "192.168.27.48",
"ttl": 30,
"state": "ACTIVE"
},
{
"dnsRuleId": "bbc14ed1-92f4-457f-95e8-93aa723a9f12",
"domainName": "facerecgservice.com",
"ipAddressType": "IP_V4",
"ipAddress": "192.168.147.240",
"ttl": 30,
"state": "INACTIVE"
}
]
2. Query a specific dns rule¶
Query single DNS rule associated with an application.
URL
GET /mep/mec_app_support/v1/applications/{appInstanceId}/dns_rules/{dnsRuleId}
Request parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
Authorization |
String |
Token information, format: Bearer token information |
header |
Yes |
appInstanceId |
String |
APP Instance ID(UUID) |
path |
Yes |
dnsRuleId |
String |
DNS rule identifier(UUID) |
path |
Yes |
Body Parameters
None
Example Request
GET /mep/mec_app_support/v1/applications/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f/dns_rules/bbc14ed1-92f4-457f-95e8-93aa723a9f12
Return Parameters
Name |
Type |
Description |
---|---|---|
dnsRuleId |
string |
Rule Id |
domainName |
string |
MEC app domain name |
ipAddressType |
enum {IP_V4, IP_V6} |
MEC app ip address type |
ipAddress |
string |
MEC app ip address |
ttl |
int (non-zero value) |
TTL value |
state |
enum {ACTIVE, INACTIVE} |
State |
Return Code: 200 OK
Example Response
HTTP/1.1 200 OK
{
"dnsRuleId": "bbc14ed1-92f4-457f-95e8-93aa723a9f12",
"domainName": "facerecgservice.com",
"ipAddressType": "IP_V4",
"ipAddress": "192.168.147.240",
"ttl": 30,
"state": "INACTIVE"
}
3. Update a specific dns rule¶
Modify the state of a rule associated with an application. This interface can modify the state from ACTIVE to INACTIVE or vice versa. No other field can be modified using this interface.
URL
PUT /mep/mec_app_support/v1/applications/{appInstanceId}/dns_rules/{dnsRuleId}
Request parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
Authorization |
String |
Token information, format: Bearer token information |
header |
Yes |
appInstanceId |
String |
APP Instance ID(UUID) |
path |
Yes |
dnsRuleId |
String |
DNS rule identifier(UUID) |
path |
Yes |
Body Parameters
Name |
Type |
Description |
Required |
---|---|---|---|
dnsRuleId |
string |
Rule Id |
No, if present must be same with actual |
domainName |
string |
MEC app domain name |
No, if present must be same with actual |
ipAddressType |
enum {IP_V4, IP_V6} |
MEC app ip address type |
No, if present must be same with actual |
ipAddress |
string |
MEC app ip address |
No, if present must be same with actual |
ttl |
int (non-zero value) |
TTL value |
No, if present must be same with actual |
state |
enum {ACTIVE, INACTIVE} |
State |
Yes |
Example Request
PUT /mep/mec_app_support/v1/applications/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f/dns_rules/bbc14ed1-92f4-457f-95e8-93aa723a9f12
{
"dnsRuleId": "bbc14ed1-92f4-457f-95e8-93aa723a9f12",
"domainName": "facerecgservice.com",
"ipAddressType": "IP_V4",
"ipAddress": "192.168.147.240",
"ttl": 30,
"state": "ACTIVE"
}
Return Parameters
Name |
Type |
Description |
---|---|---|
dnsRuleId |
string |
Rule Id |
domainName |
string |
MEC app domain name |
ipAddressType |
enum {IP_V4, IP_V6} |
MEC app ip address type |
ipAddress |
string |
MEC app ip address |
ttl |
int (non-zero value) |
TTL value |
state |
enum {ACTIVE, INACTIVE} |
State |
Return Code: 200 OK
Example Response
HTTP/1.1 200 OK
{
"dnsRuleId": "bbc14ed1-92f4-457f-95e8-93aa723a9f12",
"domainName": "facerecgservice.com",
"ipAddressType": "IP_V4",
"ipAddress": "192.168.147.240",
"ttl": 30,
"state": "ACTIVE"
}
Traffic rule configuration interfaces¶
Using the Mp1 interfaces mec apps can query and modify the traffic rules associated to it. Implementation of this interface are as per the ETSI GS MEC 011 V2.1.1 document.
1. Query all traffic rules¶
Query all traffic rules associated with an application.
URL
GET /mep/mec_app_support/v1/applications/{appInstanceId}/traffic_rules
Request parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
Authorization |
String |
Token information, format: Bearer token information |
header |
Yes |
appInstanceId |
String |
APP Instance ID (UUID) |
path |
Yes |
Body Parameters
None
Example Request
GET /mep/mec_app_support/v1/applications/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f/traffic_rules
Return Parameters
Name |
Type |
Description |
---|---|---|
trafficRuleId |
string |
Traffic rule ID. |
filterType |
enum {FLOW, PACKET} |
Filter type. |
priority |
number (1 ~ 256) |
Priority of the traffic rule. If any conflict in the traffic rules, then higher the priority higher the precedence. |
trafficFilter |
list |
List of traffic filters. |
> srcAddress |
list |
List of source ip address. |
> dstAddress |
list |
List of destination ip address. |
> srcPort |
list |
List of source port address. |
> dstPort |
list |
List of destination port address. |
> protocol |
list |
List of protocols. |
> tag |
list |
List of tags. |
> srcTunnelAddress |
list |
List of source tunnel address. |
> tgtTunnelAddress |
list |
List of target tunnel address. |
> srcTunnelPort |
list |
List of source tunnel ports. |
> dstTunnelPort |
list |
List of destination tunnel ports. |
> qCI |
number |
Match packets with same QCI. |
> dSCP |
number |
Match packets with same DSCP. |
> tC |
number |
Match packets with same TC. |
action |
enum {DROP, FORWARD_DECAPSULATED, FORWARD_AS_IS, PASSTHROUGH, DUPLICATE_DECAPSULATED, DUPLICATE_AS_IS} |
Action when traffic rule matches. |
dstInterface |
list |
Destination interface parameters. |
> interfaceType |
enum {TUNNEL, MAC, IP} |
Match packets with same TC. |
> tunnelInfo |
object |
Tunnel parameters. |
>> tunnelType |
enum {GTP_U, GRE} |
Tunnel type. |
>> tunnelDstAddress |
string |
Destination IP address. |
>> tunnelSrcAddress |
string |
Source IP address. |
> srcMacAddress |
string |
Source MAC address |
> dstMacAddress |
string |
Destination MAC address. |
> dstIpAddress |
string |
Destination IP address. |
state |
enum {ACTIVE, INACTIVE} |
State of the rule. |
Return Code: 200 OK
Example Response
HTTP/1.1 200 OK
[
{
"trafficRuleId": "TrafficRule1",
"filterType": "FLOW",
"priority": 1,
"trafficFilter": [
{
"srcAddress": [
"192.158.1.1/28"
],
"dstAddress": [
"192.168.1.1/28"
],
"srcPort": [
"8080"
],
"dstPort": [
"8080"
],
"protocol": [
"TCP"
],
"tag": null,
"srcTunnelAddress": null,
"tgtTunnelAddress": null,
"srcTunnelPort": null,
"dstTunnelPort": null,
"qCI": 2,
"dSCP": 0,
"tC": 1
}
],
"action": "DROP",
"dstInterface": [],
"state": "ACTIVE"
}
]
2. Query a specific traffic rule¶
Query single traffic rule associated with an application.
URL
GET /mep/mec_app_support/v1/applications/{appInstanceId}/traffic_rules/{trafficRuleId}
Request parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
Authorization |
String |
Token information, format: Bearer token information |
header |
Yes |
appInstanceId |
String |
APP Instance ID(UUID) |
path |
Yes |
trafficRuleId |
String |
Traffic rule identifier(UUID) |
path |
Yes |
Body Parameters
None
Example Request
GET /mep/mec_app_support/v1/applications/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f/traffic_rules/TrafficRule1
Return Parameters
Name |
Type |
Description |
---|---|---|
trafficRuleId |
string |
Traffic rule ID. |
filterType |
enum {FLOW, PACKET} |
Filter type. |
priority |
number (1 ~ 256) |
Priority of the traffic rule. If any conflict in the traffic rules, then higher the priority higher the precedence. |
trafficFilter |
list |
List of traffic filters. |
> srcAddress |
list |
List of source ip address. |
> dstAddress |
list |
List of destination ip address. |
> srcPort |
list |
List of source port address. |
> dstPort |
list |
List of destination port address. |
> protocol |
list |
List of protocols. |
> tag |
list |
List of tags. |
> srcTunnelAddress |
list |
List of source tunnel address. |
> tgtTunnelAddress |
list |
List of target tunnel address. |
> srcTunnelPort |
list |
List of source tunnel ports. |
> dstTunnelPort |
list |
List of destination tunnel ports. |
> qCI |
number |
Match packets with same QCI. |
> dSCP |
number |
Match packets with same DSCP. |
> tC |
number |
Match packets with same TC. |
action |
enum {DROP, FORWARD_DECAPSULATED, FORWARD_AS_IS, PASSTHROUGH, DUPLICATE_DECAPSULATED, DUPLICATE_AS_IS} |
Action when traffic rule matches. |
dstInterface |
list |
Destination interface parameters. |
> interfaceType |
enum {TUNNEL, MAC, IP} |
Match packets with same TC. |
> tunnelInfo |
object |
Tunnel parameters. |
>> tunnelType |
enum {GTP_U, GRE} |
Tunnel type. |
>> tunnelDstAddress |
string |
Destination IP address. |
>> tunnelSrcAddress |
string |
Source IP address. |
> srcMacAddress |
string |
Source MAC address |
> dstMacAddress |
string |
Destination MAC address. |
> dstIpAddress |
string |
Destination IP address. |
state |
enum {ACTIVE, INACTIVE} |
State of the rule. |
Return Code: 200 OK
Example Response
HTTP/1.1 200 OK
{
"trafficRuleId": "TrafficRule1",
"filterType": "FLOW",
"priority": 1,
"trafficFilter": [
{
"srcAddress": [
"192.158.1.1/28"
],
"dstAddress": [
"192.168.1.1/28"
],
"srcPort": [
"8080"
],
"dstPort": [
"8080"
],
"protocol": [
"TCP"
],
"tag": null,
"srcTunnelAddress": null,
"tgtTunnelAddress": null,
"srcTunnelPort": null,
"dstTunnelPort": null,
"qCI": 2,
"dSCP": 0,
"tC": 1
}
],
"action": "DROP",
"dstInterface": [],
"state": "ACTIVE"
}
3. Update a specific traffic rule¶
Modify the traffic rule associated with an application.
URL
PUT /mep/mec_app_support/v1/applications/{appInstanceId}/traffic_rules/{trafficRuleId}
Request parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
Authorization |
String |
Token information, format: Bearer token information |
header |
Yes |
appInstanceId |
String |
APP Instance ID(UUID) |
path |
Yes |
trafficRuleId |
String |
Traffic rule identifier(UUID) |
path |
Yes |
Body Parameters
Name |
Type |
Description |
---|---|---|
trafficRuleId |
string |
Traffic rule ID. |
filterType |
enum {FLOW, PACKET} |
Filter type. |
priority |
number (1 ~ 256) |
Priority of the traffic rule. If any conflict in the traffic rules, then higher the priority higher the precedence. |
trafficFilter |
list |
List of traffic filters. |
> srcAddress |
list |
List of source ip address. |
> dstAddress |
list |
List of destination ip address. |
> srcPort |
list |
List of source port address. |
> dstPort |
list |
List of destination port address. |
> protocol |
list |
List of protocols. |
> tag |
list |
List of tags. |
> srcTunnelAddress |
list |
List of source tunnel address. |
> tgtTunnelAddress |
list |
List of target tunnel address. |
> srcTunnelPort |
list |
List of source tunnel ports. |
> dstTunnelPort |
list |
List of destination tunnel ports. |
> qCI |
number |
Match packets with same QCI. |
> dSCP |
number |
Match packets with same DSCP. |
> tC |
number |
Match packets with same TC. |
action |
enum {DROP, FORWARD_DECAPSULATED, FORWARD_AS_IS, PASSTHROUGH, DUPLICATE_DECAPSULATED, DUPLICATE_AS_IS} |
Action when traffic rule matches. |
dstInterface |
list |
Destination interface parameters. |
> interfaceType |
enum {TUNNEL, MAC, IP} |
Match packets with same TC. |
> tunnelInfo |
object |
Tunnel parameters. |
>> tunnelType |
enum {GTP_U, GRE} |
Tunnel type. |
>> tunnelDstAddress |
string |
Destination IP address. |
>> tunnelSrcAddress |
string |
Source IP address. |
> srcMacAddress |
string |
Source MAC address |
> dstMacAddress |
string |
Destination MAC address. |
> dstIpAddress |
string |
Destination IP address. |
state |
enum {ACTIVE, INACTIVE} |
State of the rule. |
Example Request
PUT /mep/mec_app_support/v1/applications/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f/traffic_rules/TrafficRule1
{
"trafficRuleId": "TrafficRule1",
"filterType": "FLOW",
"priority": 1,
"trafficFilter": [
{
"srcAddress": [
"192.158.1.1/28"
],
"dstAddress": [
"192.168.1.1/28"
],
"srcPort": [
"8080"
],
"dstPort": [
"8080"
],
"protocol": [
"TCP"
],
"tag": null,
"srcTunnelAddress": null,
"tgtTunnelAddress": null,
"srcTunnelPort": null,
"dstTunnelPort": null,
"qCI": 2,
"dSCP": 0,
"tC": 1
}
],
"action": "DROP",
"dstInterface": [],
"state": "ACTIVE"
}
Return Parameters
Name |
Type |
Description |
---|---|---|
trafficRuleId |
string |
Traffic rule ID. |
filterType |
enum {FLOW, PACKET} |
Filter type. |
priority |
number (1 ~ 256) |
Priority of the traffic rule. If any conflict in the traffic rules, then higher the priority higher the precedence. |
trafficFilter |
list |
List of traffic filters. |
> srcAddress |
list |
List of source ip address. |
> dstAddress |
list |
List of destination ip address. |
> srcPort |
list |
List of source port address. |
> dstPort |
list |
List of destination port address. |
> protocol |
list |
List of protocols. |
> tag |
list |
List of tags. |
> srcTunnelAddress |
list |
List of source tunnel address. |
> tgtTunnelAddress |
list |
List of target tunnel address. |
> srcTunnelPort |
list |
List of source tunnel ports. |
> dstTunnelPort |
list |
List of destination tunnel ports. |
> qCI |
number |
Match packets with same QCI. |
> dSCP |
number |
Match packets with same DSCP. |
> tC |
number |
Match packets with same TC. |
action |
enum {DROP, FORWARD_DECAPSULATED, FORWARD_AS_IS, PASSTHROUGH, DUPLICATE_DECAPSULATED, DUPLICATE_AS_IS} |
Action when traffic rule matches. |
dstInterface |
list |
Destination interface parameters. |
> interfaceType |
enum {TUNNEL, MAC, IP} |
Match packets with same TC. |
> tunnelInfo |
object |
Tunnel parameters. |
>> tunnelType |
enum {GTP_U, GRE} |
Tunnel type. |
>> tunnelDstAddress |
string |
Destination IP address. |
>> tunnelSrcAddress |
string |
Source IP address. |
> srcMacAddress |
string |
Source MAC address |
> dstMacAddress |
string |
Destination MAC address. |
> dstIpAddress |
string |
Destination IP address. |
state |
enum {ACTIVE, INACTIVE} |
State of the rule. |
Return Code: 200 OK
Example Response
HTTP/1.1 200 OK
{
"trafficRuleId": "TrafficRule1",
"filterType": "FLOW",
"priority": 1,
"trafficFilter": [
{
"srcAddress": [
"192.158.1.1/28"
],
"dstAddress": [
"192.168.1.1/28"
],
"srcPort": [
"8080"
],
"dstPort": [
"8080"
],
"protocol": [
"TCP"
],
"tag": null,
"srcTunnelAddress": null,
"tgtTunnelAddress": null,
"srcTunnelPort": null,
"dstTunnelPort": null,
"qCI": 2,
"dSCP": 0,
"tC": 1
}
],
"action": "DROP",
"dstInterface": [],
"state": "ACTIVE"
}
Mm5 Interface for appd configurations¶
Using the Mm5 interfaces MECM can create, query, update or delete the appd configurations which includes multiple dns and traffic rules associated to an application. Implementation of this interface are specified in ETSI GS MEC 010-1 V1.1.1 and ETSI GS MEC 010-2 V2.1.1 documents.
1. Create a new appd configurations¶
Create a new appd configuration and associate it with a MEC application. Each configuration can have thirty-two DNS rules and sixteen Traffic rules. There can be only one appd configuration per application at a time and the appd configuration is an asynchronous in nature. Once the request is received in the mep, after validation mep will start a task to handle multiple dns and traffic rules and return a task id to the caller of the API. Using the task-id the caller can check the status of the operation at any time.
URL
POST /mepcfg/app_lcm/v1/applications/{appInstanceId}/appd_configuration
Request parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
appInstanceId |
String |
APP Instance ID(UUID) |
path |
Yes |
Body Parameters
Name |
Type |
Description |
Required |
---|---|---|---|
appTrafficRule |
list |
List of traffic rules. Max 16. |
No |
> trafficRuleId |
string |
Traffic rule ID. |
Yes |
> filterType |
enum {FLOW, PACKET} |
Filter type. |
Yes |
> priority |
number (1 ~ 256) |
Priority of the traffic rule. If any conflict in the traffic rules, then higher the priority higher the precedence. |
Yes |
> trafficFilter |
list |
List of traffic filters. Max 16. |
No |
>> srcAddress |
list |
List of source ip address. Max 64. |
No |
>> dstAddress |
list |
List of destination ip address. Max 64. |
No |
>> srcPort |
list |
List of source port address. |
No |
>> dstPort |
list |
List of destination port address. |
No |
>> protocol |
list |
List of protocols. Max 8. |
Yes |
>> tag |
list |
List of tags. Max 8. |
Yes |
>> srcTunnelAddress |
list |
List of source tunnel address. |
No |
>> tgtTunnelAddress |
list |
List of target tunnel address. |
No |
>> srcTunnelPort |
list |
List of source tunnel ports. |
No |
>> dstTunnelPort |
list |
List of destination tunnel ports. |
No |
>> qCI |
number |
Match packets with same QCI. |
No |
>> dSCP |
number |
Match packets with same DSCP. |
No |
>> tC |
number |
Match packets with same TC. |
No |
> action |
enum {DROP, FORWARD_DECAPSULATED, FORWARD_AS_IS, PASSTHROUGH, DUPLICATE_DECAPSULATED, DUPLICATE_AS_IS} |
Action when traffic rule matches. |
Yes |
> dstInterface |
list |
Destination interface parameters. Max 2. |
No |
>> interfaceType |
enum {TUNNEL, MAC, IP} |
Match packets with same TC. |
Yes |
>> tunnelInfo |
object |
Tunnel parameters. |
No |
>>> tunnelType |
enum {GTP_U, GRE} |
Tunnel type. |
Yes |
>>> tunnelDstAddress |
string |
Destination IP address. |
No |
>>> tunnelSrcAddress |
string |
Source IP address. |
No |
>> srcMacAddress |
string |
Source MAC address |
No |
>> dstMacAddress |
string |
Destination MAC address. |
No |
>> dstIpAddress |
string |
Destination IP address. |
No |
> state |
enum {ACTIVE, INACTIVE} |
State of the rule. |
No |
appDNSRule |
list |
List of DNS rules. Max 32. |
No |
> dnsRuleId |
string |
DNS rule ID. |
Yes |
> domainName |
string |
Domain name. |
Yes |
> ipAddressType |
enum {IPv4, IPv6} |
IP address type. |
Yes |
> ipAddress |
string |
IP address. |
Yes |
> ttl |
number |
Time To Live value. |
Yes |
> state |
enum {ACTIVE, INACTIVE} |
Rule state. |
Yes |
appSupportMp1 |
bool |
Whether Mp1 interface is supported. |
No |
appName |
string |
Application name. |
Yes |
Example Request
POST /mepcfg/app_lcm/v1/applications/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f/appd_configuration
{
"appTrafficRule": [
{
"trafficRuleId": "TrafficRule1",
"filterType": "FLOW",
"priority": 1,
"trafficFilter": [
{
"srcAddress": [
"192.158.1.1/28"
],
"dstAddress": [
"192.168.1.1/28"
],
"srcPort": [
"8080"
],
"dstPort": [
"8080"
],
"protocol": [
"TCP"
],
"qCI": 1,
"dSCP": 0,
"tC": 1
}
],
"action": "DROP",
"state": "ACTIVE"
}
],
"appDNSRule": [
{
"dnsRuleId": "dnsRule1",
"domainName": "facerecgservice.com",
"ipAddressType": "IP_V4",
"ipAddress": "192.168.147.240",
"ttl": 30,
"state": "ACTIVE"
}
],
"appSupportMp1": true,
"appName": "abc1"
}
Return Parameters
Name |
Type |
Description |
---|---|---|
taskId |
string |
Task ID |
appInstanceId |
string |
Application instance ID |
configResult |
string |
Configuration result |
configPhase |
string |
Progress percentage |
Detailed |
string |
Detailed reason |
Return Code: 200 OK
Example Response
HTTP/1.1 200 OK
{
"taskId": "d464dd0a-d927-4baf-bc2c-d902fb0b2c73",
"appInstanceId": "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f",
"configResult": "PROCESSING",
"configPhase": "0",
"Detailed": "Operation In progress"
}
2. Query appd configuration¶
Query appd configuration associated with an application.
URL
GET /mepcfg/app_lcm/v1/applications/{appInstanceId}/appd_configuration
Request parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
appInstanceId |
String |
APP Instance ID(UUID) |
path |
Yes |
Body Parameters
None
Example Request
GET /mepcfg/app_lcm/v1/applications/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f/appd_configuration
Return Parameters
Name |
Type |
Description |
---|---|---|
appTrafficRule |
list |
List of traffic rules. |
> trafficRuleId |
string |
Traffic rule ID. |
> filterType |
enum {FLOW, PACKET} |
Filter type. |
> priority |
number (1 ~ 256) |
Priority of the traffic rule. If any conflict in the traffic rules, then higher the priority higher the precedence. |
> trafficFilter |
list |
List of traffic filters. |
>> srcAddress |
list |
List of source ip address. |
>> dstAddress |
list |
List of destination ip address. |
>> srcPort |
list |
List of source port address. |
>> dstPort |
list |
List of destination port address. |
>> protocol |
list |
List of protocols. |
>> tag |
list |
List of tags. |
>> srcTunnelAddress |
list |
List of source tunnel address. |
>> tgtTunnelAddress |
list |
List of target tunnel address. |
>> srcTunnelPort |
list |
List of source tunnel ports. |
>> dstTunnelPort |
list |
List of destination tunnel ports. |
>> qCI |
number |
Match packets with same QCI. |
>> dSCP |
number |
Match packets with same DSCP. |
>> tC |
number |
Match packets with same TC. |
> action |
enum {DROP, FORWARD_DECAPSULATED, FORWARD_AS_IS, PASSTHROUGH, DUPLICATE_DECAPSULATED, DUPLICATE_AS_IS} |
Action when traffic rule matches. |
> dstInterface |
list |
Destination interface parameters. |
>> interfaceType |
enum {TUNNEL, MAC, IP} |
Match packets with same TC. |
>> tunnelInfo |
object |
Tunnel parameters. |
>>> tunnelType |
enum {GTP_U, GRE} |
Tunnel type. |
>>> tunnelDstAddress |
string |
Destination IP address. |
>>> tunnelSrcAddress |
string |
Source IP address. |
>> srcMacAddress |
string |
Source MAC address |
>> dstMacAddress |
string |
Destination MAC address. |
>> dstIpAddress |
string |
Destination IP address. |
> state |
enum {ACTIVE, INACTIVE} |
State of the rule. |
appDNSRule |
list |
List of DNS rules. |
> dnsRuleId |
string |
DNS rule ID. |
> domainName |
string |
Domain name. |
> ipAddressType |
enum {IPv4, IPv6} |
IP address type. |
> ipAddress |
string |
IP address. |
> ttl |
number |
Time To Live value. |
> state |
enum {ACTIVE, INACTIVE} |
Rule state. |
appSupportMp1 |
bool |
Whether Mp1 interface is supported. |
appName |
string |
Application name. |
Return Code: 200 OK
Example Response
HTTP/1.1 200 OK
{
"appTrafficRule": [
{
"trafficRuleId": "TrafficRule1",
"filterType": "FLOW",
"priority": 1,
"trafficFilter": [
{
"srcAddress": [
"192.158.1.1/28"
],
"dstAddress": [
"192.168.1.1/28"
],
"srcPort": [
"8080"
],
"dstPort": [
"8080"
],
"protocol": [
"TCP"
],
"tag": null,
"srcTunnelAddress": null,
"tgtTunnelAddress": null,
"srcTunnelPort": null,
"dstTunnelPort": null,
"qCI": 2,
"dSCP": 0,
"tC": 1
}
],
"action": "DROP",
"dstInterface": [],
"state": "ACTIVE"
}
],
"appDNSRule": [
{
"dnsRuleId": "dnsRule1",
"domainName": "facerecgservice.com",
"ipAddressType": "IP_V4",
"ipAddress": "192.168.147.240",
"ttl": 30,
"state": "ACTIVE"
}
],
"appSupportMp1": true,
"appName": "abc1"
}
3. Modify appd configuration¶
Appd configuration for each applications can be configured using this interface. MEP will take the difference of existing configuration and the new modification input and then act on create/modify/delete of dns and/or traffic rules.
URL
PUT /mepcfg/app_lcm/v1/applications/{appInstanceId}/appd_configuration
Request parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
appInstanceId |
String |
APP Instance ID(UUID) |
path |
Yes |
Body Parameters
Name |
Type |
Description |
Required |
---|---|---|---|
appTrafficRule |
list |
List of traffic rules. Max 16. |
No |
> trafficRuleId |
string |
Traffic rule ID. |
Yes |
> filterType |
enum {FLOW, PACKET} |
Filter type. |
Yes |
> priority |
number (1 ~ 256) |
Priority of the traffic rule. If any conflict in the traffic rules, then higher the priority higher the precedence. |
Yes |
> trafficFilter |
list |
List of traffic filters. Max 16. |
No |
>> srcAddress |
list |
List of source ip address. Max 64. |
No |
>> dstAddress |
list |
List of destination ip address. Max 64. |
No |
>> srcPort |
list |
List of source port address. |
No |
>> dstPort |
list |
List of destination port address. |
No |
>> protocol |
list |
List of protocols. Max 8. |
Yes |
>> tag |
list |
List of tags. Max 8. |
Yes |
>> srcTunnelAddress |
list |
List of source tunnel address. |
No |
>> tgtTunnelAddress |
list |
List of target tunnel address. |
No |
>> srcTunnelPort |
list |
List of source tunnel ports. |
No |
>> dstTunnelPort |
list |
List of destination tunnel ports. |
No |
>> qCI |
number |
Match packets with same QCI. |
No |
>> dSCP |
number |
Match packets with same DSCP. |
No |
>> tC |
number |
Match packets with same TC. |
No |
> action |
enum {DROP, FORWARD_DECAPSULATED, FORWARD_AS_IS, PASSTHROUGH, DUPLICATE_DECAPSULATED, DUPLICATE_AS_IS} |
Action when traffic rule matches. |
Yes |
> dstInterface |
list |
Destination interface parameters. Max 2. |
No |
>> interfaceType |
enum {TUNNEL, MAC, IP} |
Match packets with same TC. |
Yes |
>> tunnelInfo |
object |
Tunnel parameters. |
No |
>>> tunnelType |
enum {GTP_U, GRE} |
Tunnel type. |
Yes |
>>> tunnelDstAddress |
string |
Destination IP address. |
No |
>>> tunnelSrcAddress |
string |
Source IP address. |
No |
>> srcMacAddress |
string |
Source MAC address |
No |
>> dstMacAddress |
string |
Destination MAC address. |
No |
>> dstIpAddress |
string |
Destination IP address. |
No |
> state |
enum {ACTIVE, INACTIVE} |
State of the rule. |
No |
appDNSRule |
list |
List of DNS rules. Max 32. |
No |
> dnsRuleId |
string |
DNS rule ID. |
Yes |
> domainName |
string |
Domain name. |
Yes |
> ipAddressType |
enum {IPv4, IPv6} |
IP address type. |
Yes |
> ipAddress |
string |
IP address. |
Yes |
> ttl |
number |
Time To Live value. |
Yes |
> state |
enum {ACTIVE, INACTIVE} |
Rule state. |
Yes |
appSupportMp1 |
bool |
Whether Mp1 interface is supported. |
No |
appName |
string |
Application name. |
Yes |
Example Request
PUT /mepcfg/app_lcm/v1/applications/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f/appd_configuration
{
"appTrafficRule": [
{
"trafficRuleId": "TrafficRule1",
"filterType": "FLOW",
"priority": 1,
"trafficFilter": [
{
"srcAddress": [
"192.158.1.1/28"
],
"dstAddress": [
"192.168.1.1/28"
],
"srcPort": [
"8080"
],
"dstPort": [
"8080"
],
"protocol": [
"TCP"
],
"qCI": 1,
"dSCP": 0,
"tC": 1
}
],
"action": "DROP",
"state": "ACTIVE"
}
],
"appDNSRule": [
{
"dnsRuleId": "dnsRule1",
"domainName": "facerecgservice.com",
"ipAddressType": "IP_V4",
"ipAddress": "192.168.147.240",
"ttl": 30,
"state": "ACTIVE"
}
],
"appSupportMp1": true,
"appName": "abc1"
}
Return Parameters
Name |
Type |
Description |
---|---|---|
taskId |
string |
Task ID |
appInstanceId |
string |
Application instance ID |
configResult |
string |
Configuration result |
configPhase |
string |
Progress percentage |
Detailed |
string |
Detailed reason |
Return Code: 200 OK
Example Response
HTTP/1.1 200 OK
{
"taskId": "d464dd0a-d927-4baf-bc2c-d902fb0b2c73",
"appInstanceId": "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f",
"configResult": "PROCESSING",
"configPhase": "0",
"Detailed": "Operation In progress"
}
4. Delete appd configuration¶
Delete appd configuration request.
URL
DELETE /mepcfg/app_lcm/v1/applications/{appInstanceId}/appd_configuration
Request parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
appInstanceId |
String |
APP Instance ID(UUID) |
path |
Yes |
Body Parameters
None
Example Request
DELETE /mepcfg/app_lcm/v1/applications/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f/appd_configuration
Return Parameters
Name |
Type |
Description |
---|---|---|
taskId |
string |
Task ID |
appInstanceId |
string |
Application instance ID |
configResult |
string |
Configuration result |
configPhase |
string |
Progress percentage |
Detailed |
string |
Detailed reason |
Return Code: 200 OK
Example Response
HTTP/1.1 200 OK
{
"taskId": "d464dd0a-d927-4baf-bc2c-d902fb0b2c73",
"appInstanceId": "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f",
"configResult": "PROCESSING",
"configPhase": "0",
"Detailed": "Operation In progress"
}
5. Query task status¶
Once the appd configuration create, modify or delete is submitted, mep will create a task and return a task id to the caller and the caller can periodically check the status of the task using this id. This interface calls the mep for the task status.
URL
GET /mepcfg/app_lcm/v1/tasks/{taskId}/appd_configuration
Request parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
taskId |
String |
Task ID(UUID) |
path |
Yes |
Body Parameters
None
Example Request
GET /mepcfg/app_lcm/v1/tasks/d464dd0a-d927-4baf-bc2c-d902fb0b2c73/appd_configuration
Return Parameters
Name |
Type |
Description |
---|---|---|
taskId |
string |
Task ID |
appInstanceId |
string |
Application instance ID |
configResult |
string |
Configuration result |
configPhase |
string |
Progress percentage |
Detailed |
string |
Detailed reason |
Return Code: 200 OK
Example Response
HTTP/1.1 200 OK
{
"taskId": "d464dd0a-d927-4baf-bc2c-d902fb0b2c73",
"appInstanceId": "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f",
"configResult": "SUCCESS",
"configPhase": "100",
"Detailed": ""
}
Application Termination¶
MEP support termination/stop of instance of an application after MEP receive the request from MECM.
1. App Instance Termination¶
Interface to remove the application’s ak/sk values, unregister the services and delete the DNS and traffic rule.
URL
DELETE /mep/mec_app_support/v1/applications/{appInstanceId}/AppInstanceTermination
Request parameters
Request parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
appInstanceId |
String |
APP Instance ID(UUID) |
path |
Yes |
appInstanceId |
String |
APP Instance ID(UUID) |
header |
Yes |
Example Request
DELETE /mep/mec_app_support/v1/applications/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f/AppInstanceTermination
Body Parameters
None
Return Code: 200 OK
Example Response
""
2. App Instance Termination Confirmation¶
After the MEC platform receives a request to terminate or stop a MEC application instance, the MEC platform notifies the MEC application instance that it will be terminated or stopped soon incase if graceful termination/stop is subscribed.
URL
POST /mep/mec_app_support/v1/applications/{appInstanceId}/confirm_termination
Request parameters
Name |
Type |
Description |
IN |
Required |
---|---|---|---|---|
appInstanceId |
String |
APP Instance ID(UUID) |
path |
Yes |
Example Request
POST /mep/mec_app_support/v1/applications/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f/confirm_termination
Body Parameters
{
"notificationType": "AppTerminationNotification",
"operationAction": "STOPPING",
"maxGracefulTimeout": "30",
"_links": {
"subscription": "mep/mec_app_support/v1/applications/6abe4782-2c70-4e47-9a4e-0ee3a1a0fd1e/subscriptions/6abe4782",
"confirmTermination": "/mep/mec_app_support/v1/applications/6abe4782-2c70-4e47-9a4e-0ee3a1a0fd1e/confirm_termination",
},
}
Return Code: 204 No Content
**Example Response**
POST /mep/mec_app_support/v1/applications/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f/confirm_termination { “operationAction”: “TERMINATING” }
Exception status code
<table border="1" class="docutils">
<thead>
<tr>
<th><strong>Data type</strong></th>
<th><strong>Response codes</strong></th>
<th><strong>Description</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>N/A</td>
<td>204 No Content</td>
<td>The request is acknowledged. The response body shall be empty.</td>
</tr>
<tr>
<td>ProblemDetails</td>
<td>401 Unauthorized</td>
<td>It is used when the client did not submit the appropriate credentials. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error.</td>
</tr>
<tr>
<td>ProblemDetails</td>
<td>403 Forbidden</td>
<td>The operation is not allowed given the current status of the resource. More information shall be provided in the "detail" attribute of the "ProblemDetails" structure.</td>
</tr>
<tr>
<td>ProblemDetails</td>
<td>404 Not Found</td>
<td>It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error.</td>
</tr>
<tr>
<td>ProblemDetails</td>
<td>409 Conflict</td>
<td>The operation cannot be executed currently, due to a conflict with the state of the resource. Typically, this is because the application instance resource is in NOT_INSTANTIATED state or because there is no termination ongoing. The response body shall contain a ProblemDetails structure, in which the "detail" attribute shall convey more information about the error.</td>
</tr>
<tr>
<td>ProblemDetails</td>
<td>429 Too Many Requests</td>
<td>It is used when a rate limiter has triggered. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error.</td>
</tr>
</tbody>
</table>
### Query Platform Capabilities(Services)
MEP supports for querying the capabilities(services) registered with it. These capability information will be used by the MECM to display it to the user on its portal. MECM send the capability query to MEP over Mm5 interface.
#### 1. Query all capabilities
Interface to query all capabilities. This interface return the capability list registered to the queried MEP server along with the consumers of it.
**URL**
GET /mepcfg/mec_platform_config/v1/capabilities
**Request parameters**
None
**Body Parameters**
None
**Example Request**
GET /mepcfg/mec_platform_config/v1/capabilities
**Return Parameters**
| Name | Type | Description |
| -------------- | --------------------------- | ------------------------ |
| capabilityId | String | Capability/Service id |
| capabilityName | String | Capability/Service name |
| status | Enum **{ACTIVE, INACTIVE}** | Status |
| version | String | Version info |
| consumers | Array[Object] | Consumer object list |
| >applicationInstanceId | String | Consumer application id |
Return Code: 200 OK
**Example Response**
HTTP/1.1 200 OK [ { “capabilityId”: “16384563dca094183778a41ea7701d15”, “capabilityName”: “FaceRegService”, “status”: “ACTIVE”, “version”: “4.5.8”, “consumers”: [ { “applicationInstanceId”: “5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f” }, { “applicationInstanceId”: “f05a5591-d8f2-4f89-8c0b-8cea6d45712e” }, { “applicationInstanceId”: “86dfc97d-325e-4feb-ac4f-280a0ba42513” } ] }, { “capabilityId”: “f7e898d1c9ea9edd05e1181bc09afc5e”, “capabilityName”: “Location”, “status”: “ACTIVE”, “version”: “v1.19”, “consumers”: [ { “applicationInstanceId”: “88922760-861b-4578-aae5-77b8fcb06142” } ] } ]
#### 2. Query individual capability
Interface to query an individual capability from MEP. This interface return a capability along with the consumers of it.
**URL**
GET /mepcfg/mec_platform_config/v1/capabilities/{capabilityId}
**Request parameters**
| **Name** | **Type** | **Description** | **IN** | **Required** |
| --- | --- | --- | --- | --- |
| capabilityId | String | Capability ID(UUID) | path | Yes |
**Body Parameters**
None
**Example Request**
GET /mepcfg/mec_platform_config/v1/capabilities/16384563dca094183778a41ea7701d15
**Return Parameters**
| Name | Type | Description |
| -------------- | --------------------------- | ------------------------ |
| capabilityId | String | Capability/Service id |
| capabilityName | String | Capability/Service name |
| status | Enum **{ACTIVE, INACTIVE}** | Status |
| version | String | Version info |
| consumers | Array[Object] | Consumer object list |
| >applicationInstanceId | String | Consumer application id |
Return Code: 200 OK
**Example Response**
HTTP/1.1 200 OK { “capabilityId”: “16384563dca094183778a41ea7701d15”, “capabilityName”: “FaceRegService”, “status”: “ACTIVE”, “version”: “4.5.8”, “consumers”: [ { “applicationInstanceId”: “5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f” }, { “applicationInstanceId”: “f05a5591-d8f2-4f89-8c0b-8cea6d45712e” }, { “applicationInstanceId”: “86dfc97d-325e-4feb-ac4f-280a0ba42513” } ] }
### Timing interfaces
Interface to get platform time for MEP applications.
#### 1. Query platform time
Interface to get the current MEP platform time.
**URL**
GET mep/mec_app_support/v1/timing/current_time
**Request parameters**
None
<table border="1" class="docutils">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>seconds</td>
<td>integer</td>
<td>The seconds part of the time in unix time format.</td>
</tr>
<tr>
<td>nanoSeconds</td>
<td>integer</td>
<td>The nano-seconds part of the time in unix time format.</td>
</tr>
<tr>
<td>timeSourceStatus</td>
<td>enum{TRACEABLE, NONTRACEABLE}</td>
<td>1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source</td>
</tr>
</tbody>
</table>
**Example Request**
GET mep/mec_app_support/v1/timing/current_time
**Body Parameters**
None
Return Code: 200 OK
**Example Response**
HTTP/1.1 200 OK { “seconds”: 1627971217, “nanoSeconds”: 869279458, “timeSourceStatus”: “TRACEABLE” }
#### 2. Query timing capability
Interface to get the timing capabilities. The information regarding available packet timing facilities.
**URL**
GET mep/mec_app_support/v1/timing/timing_caps
**Request parameters**
None
Return Parameters:
<table border="1" class="docutils">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td>timeStamp</td>
<td>Object</td>
<td>Time stamp information.</td>
<td>No</td>
</tr>
<tr>
<td>>seconds</td>
<td>integer</td>
<td>The seconds part of the time in unix time format.</td>
<td>Yes</td>
</tr>
<tr>
<td>>nanoSeconds</td>
<td>integer</td>
<td>The nano-seconds part of the time in unix time format.</td>
<td>Yes</td>
</tr>
<tr>
<td>ntpServers</td>
<td>Array[Object]</td>
<td>Details about all NTP server available in the platform.</td>
<td>No</td>
</tr>
<tr>
<td>>ntpServerAddrType</td>
<td>enum{IP_ADDRESS, DNS_NAME}</td>
<td>Address type.</td>
<td>Yes</td>
</tr>
<tr>
<td>>ntpServerAddr</td>
<td>string</td>
<td>NTP server address.</td>
<td>Yes</td>
</tr>
<tr>
<td>>minPollingInterval</td>
<td>integer</td>
<td>Minimum poll interval for NTP messages, in seconds as a power of two Range: 3…17</td>
<td>Yes</td>
</tr>
<tr>
<td>>maxPollingInterval</td>
<td>integer</td>
<td>Maximum poll interval for NTP messages, in seconds as a power of two Range: 3…17</td>
<td>Yes</td>
</tr>
<tr>
<td>>localPriority</td>
<td>integer</td>
<td>Local priority value.</td>
<td>Yes</td>
</tr>
<tr>
<td>>authenticationOption</td>
<td>enum{NONE, SYMMETRIC_KEY, AUTO_KEY}</td>
<td>Available authentication option.</td>
<td>Yes</td>
</tr>
<tr>
<td>>authenticationKeyNum</td>
<td>integer</td>
<td>Authentication key number. This configuration is valid if selected authenticationOption is SymmetricKey</td>
<td>Yes</td>
</tr>
<tr>
<td>ptpMasters</td>
<td>Array[Object]</td>
<td>Details about all PTP server available in the platform.</td>
<td>No</td>
</tr>
<tr>
<td>>ptpMasterIpAddress</td>
<td>string</td>
<td>PTP master IP address.</td>
<td>Yes</td>
</tr>
<tr>
<td>>ptpMasterLocalPriority</td>
<td>integer</td>
<td>Local priority number.</td>
<td>Yes</td>
</tr>
<tr>
<td>>delayReqMaxRate</td>
<td>integer</td>
<td>Acceptable maximum rate of the Delay_Req messages in packets per second</td>
<td>Yes</td>
</tr>
</tbody>
</table>
**Example Request**
GET mep/mec_app_support/v1/timing/timing_caps
**Body Parameters**
None
Return Code: 200 OK
**Example Response**
HTTP/1.1 200 OK { “timeStamp”: { “seconds”: 1627971264, “nanoSeconds”: 478959804 }, “ntpServers”: [ { “ntpServerAddrType”: “DNS_NAME”, “ntpServerAddr”: “mep-ntp”, “minPollingInterval”: 4, “maxPollingInterval”: 17, “localPriority”: 1, “authenticationOption”: “NONE”, “authenticationKeyNum”: 0 } ] }
### Abnormal status code
|**HTTP状态码**|**描述**|
|---|---|
|400|错误的请求,用来表示请求的参数不正确。|
|401|当前请求需要鉴权认证。|
|403|禁止当前操作。|
|404|请求的资源未被发现。|
|412|请求中的先决条件验证失败。|
|414|请求的URI超长,服务器拒绝处理请求。|
|500|内部服务器错误。|
|503|服务不可用。|
## Dns-Server
Mep has a programmable dns server which can perform the name resolution of the MEC applications. This management interface of the dns server is handled using a rest interface and this section cover the details of this interface.
### 1. Create new entry
DNS entry can be added using this interface. Once a record is added, the resource will be available for the device application to query. Using this interface multiple records for a zone can be submitted together.
**URL**
POST /mep/dns_server_mgmt/v1/rrecord
**Request parameters**
None
**Query parameters**
| Name | Type | Description | Required |
| ------------- | --------------------------- | ------------------------ | ------------- |
| zone | string | Zone name. Default is "." | Yes |
**Body Parameters**
| Name | Type | Description | Required |
| ------------- | --------------------------- | ------------------------ | ------------- |
| name | string | Domain name | Yes |
| type | enum **{A, AAAA}** | DNS resource type, A in case of Ipv4 and AAAA for Ipv6 | Yes |
| class | enum **{IN}** | Resource record class | Yes on create |
| ttl | int (non-zero value) | Record TTL value | Yes on create |
| rData | list(string) | IP Address list, Ip type must match with the **type** field | Yes on create |
**Example Request**
POST /mep/dns_server_mgmt/v1/rrecord?zone=”com.” [ { “name”: “www.example.com.”, “type”: “A”, “class”: “IN”, “ttl”: 30, “rData”: [ “172.168.15.101” ] } ]
**Return Parameters**
None
Return Code: 200 Success
**Example Response**
HTTP/1.1 200 Success
### 2. Modify the entry
DNS entry can be modified using this interface. Once a record is modified, the resource will be available for the device application to query. Using this interface multiple records for a zone can be submitted together.
**URL**
PUT /mep/dns_server_mgmt/v1/rrecord/{fqdn}/{rrtype}
**Request parameters**
| **Name** | **Type** | **Description** | **IN** | **Required** |
| --- | --- | --- | --- | --- |
| fqdn | String | Fully Qualified Domain Name | path | Yes |
| rrtype | String | Resource record type of the entry(A or AAAA). | path | Yes |
**Query parameters**
| Name | Type | Description | Required |
| ------------- | --------------------------- | ------------------------ | ------------- |
| zone | string | Zone name. Default is "." | Yes |
**Body Parameters**
| Name | Type | Description | Required |
| ------------- | --------------------------- | ------------------------ | ------------- |
| name | string | Domain name | Yes |
| type | enum **{A, AAAA}** | DNS resource type, A in case of Ipv4 and AAAA for Ipv6 | Yes |
| class | enum **{IN}** | Resource record class | Yes on create |
| ttl | int (non-zero value) | Record TTL value | Yes on create |
| rData | list(string) | IP Address list, Ip type must match with the **type** field | Yes on create |
**Example Request**
PUT /mep/dns_server_mgmt/v1/rrecord/www.example.com/A?zone=”com.” [ { “name”: “www.example.com.”, “type”: “A”, “class”: “IN”, “ttl”: 30, “rData”: [ “172.168.15.201” ] } ]
**Return Parameters**
None
Return Code: 200 Success
**Example Response**
HTTP/1.1 200 Success
### 2. Delete an entry
DNS entry can be deleted from the dns-server using this interface.
**URL**
DELETE /mep/dns_server_mgmt/v1/rrecord/{fqdn}/{rrtype}
**Query parameters**A
| Name | Type | Description | Required |
| ------------- | --------------------------- | ------------------------ | ------------- |
| zone | string | Zone name. Default is "." | Yes |
**Request parameters**
| **Name** | **Type** | **Description** | **IN** | **Required** |
| --- | --- | --- | --- | --- |
| fqdn | String | Fully Qualified Domain Name | path | Yes |
| rrtype | String | Resource record type of the entry(A or AAAA). | path | Yes |
**Body Parameters**
None
**Example Request**
DELETE /mep/dns_server_mgmt/v1/rrecord/www.example.com./A?zone=com.
**Return Parameters**
None
Return Code: 200 Success
**Example Response**
HTTP/1.1 200 Success
## MEP Agent
Mep agent is a component which run as side car with application. It helps to get authenticaion token, do service registration, send heartbeat on behalf of application.
#### 1. Get token
Applicaiontion can call this API to get authentication token from mepauth.
**URL**
GET /mep-agent/v1/token
**Request parameters**
| **Name** | **Type** | **Description** | **IN** | **Required** |
| --- | --- | --- | --- | --- |
| Content-Type | String | MIME type, fill in "application/json" | header | Yes|
**Body Parameters**
None
**Example Request**
GET /mep-agent/v1/token
{ “header”: [ { “key”: “Content-Type”, “value”: “application/json” } ] }
**Return Parameters**
Return code: 200 OK
|Name | Type | Description | Required|
|---|---|---|---|
|access\_token | String | Token| Yes|
|token\_type |String |Token Type(Bearer)| Yes|
|expires\_in | int | Expire time | Yes|
**Example Response**:
HTTP/1.1 200 OK { “access_token”:”xxxx”, “token_type”:”Bearer”, “expires_in”:”3600” }
#### 2. Get producer endpoint by service name
Applicaiontion can call this API to get producer endpoint from mepserver.
**URL**
GET /mep-agent/v1/endpoint/:serName
**Request parameters**
| **Name** | **Type** | **Description** | **IN** | **Required** |
| --- | --- | --- | --- | --- |
| Content-Type | String | MIME type, fill in "application/json" | header | Yes|
| serName | String | service name | path | Yes |
**Body Parameters**
None
**Example Request**
GET /mep-agent/v1/endpoint/serviceName
{ “header”: [ { “key”: “Content-Type”, “value”: “application/json” } ] }
**Return Parameters**
Return code: 200 OK
|Name | Type | Description | Required|
|---|---|---|---|
| endpoint | Object | endpoint | Yes|
|>uris | Array\[String\]| URI格式的服务入口信息列表| Yes|
|>addresses | Array\[Object\] | 服务入口信息地址列表(IP地址+端口号) | No|
|>>host | String | IP地址 | No|
|>>port | String | 端口号 | No|
|>alternative| String | 已实现格式或者外部规范定义的服务入口信息 | No|
**Example Response**
HTTP/1.1 200 OK { “endpoint”: { “uris”: [ “https://mep-api-gw.mep:8443/VideoService145da803354a611ebb15e” ], “addresses”: null, “alternative”: null } }