Updated on 2024-03-15 GMT+08:00

Querying an SMS Application

Function

This API is used to query information about a created application.

URI

GET /v2/{project_id}/msgsms/apps

Table 1 URI parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining Account, User, and Project Information.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

app_name

No

String

Application name.

end_time

No

String

End time.

limit

No

Integer

Quantity. The default value is 10.

offset

No

Integer

Offset.

region

No

String

Region.

  • cn: Chinese mainland
  • intl: international

sort_dir

No

String

Sorting method.

  • desc: The query results are displayed in the descending order.
  • asc: The query results are displayed in ascending order.

sort_key

No

String

Sorting field. Only create_time is supported.

start_time

No

String

Start time.

status

No

String

Status.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Request body parameter type. This parameter must be set to application/json.

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

results

Array of SmsAppQueryResp

Query result.

total

Long

Total number.

Table 5 SmsAppQueryResp response parameters

Parameter

Description

id

Primary key ID of the application. It is unique and is used to obtain and modify the application.

create_time

Creation time.

update_time

Update time.

customer_id

Customer ID.

resource_id

Resource ID.

developer_account

Developer account.

app_name

Application name.

app_key

Application key.

status

Application status.

  • CREATED: pending (to be brought online). The application has not been created. Wait for a while.
  • SUSPENDED: suspended. Service requests cannot be initiated. If the SMS content sent violates service rules or you apply to unsubscribe from the Message & SMS service, the operation manager will suspend your SMS application.
  • LAUNCHED: normal. The application is added and can be used properly.
  • PROCESSING: Resources are to be allocated. Contact the account manager or submit a service ticket to apply for resource configuration.

region

Region.

intl_channel_num

International SMS channel number.

enterprise_project_id

Enterprise project ID.

enterprise_project_name

Enterprise project name.

app_access_addr

Access address.

protocol

Protocol.

platform

Platform.

Request Example

GET /v2/845ada5bc7444f1295cd517af0123da1/msgsms/apps?app_name=auto_test789 
Host: 100.85.***.***:30300
Content-Type: application/json
X-Auth-Token:******

Response Example

{
    "results": [
        {
            "id": "9e61f59c-1a6b-4ee5-9651-5bca450694b3",
            "create_time": "2022-08-12 06:51:17",
            "update_time": "2022-08-12 06:51:17",
            "customer_id": "******c55c3c4526b2ed7a0213bc9871",
            "tenant": {
                "customer_id": "******c55c3c4526b2ed7a0213bc9871",
                "customer_name": "****05",
                "enterprise_name": "Huawei Technologies Co., Ltd."
            },
            "resource_id": "******8a-a690-4e14-a1c7-2430937336d0",
            "developer_account": "****66_sms",
            "app_name": "auto_test789",
            "omp_app_name": "******4877bf46b5906a3240636bc7aa",
            "app_key": "******3baZf4c856O4Qrbqvui3K2",
            "status": "LAUNCHED",
            "industry": 14,
            "region": "cn",
            "intl_channel_num": "******886739",
            "enterprise_project_id": "0",
            "enterprise_project_name": "default",
            "app_access_addr": "https://100.**.***.**:8443",
            "protocol": "HTTP",
            "platform": "NFV",
            "is_support_multiomp": false
        }
    ],
    "total": 1
}

Returned Values

Status Code

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

500

System error