Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Communication/PhoneNumbers - Add Number Lookup API #23053

Merged
merged 23 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7a6deb4
add new 2023-05-01-preview version to communication-phone-numbers
ericasp16 Mar 13, 2023
f1f37cb
add number lookup API definitions and examples
ericasp16 Mar 13, 2023
ff1eb3f
add tag to readme
ericasp16 Mar 13, 2023
6bbac7f
fix references to CommunicationErrorResponse
ericasp16 Mar 13, 2023
4ef44d9
fix version numbers, problems with examples
ericasp16 Mar 13, 2023
8a3e672
fix model validation
ericasp16 Mar 13, 2023
b6586fc
update with feedback from ACS review
ericasp16 Apr 11, 2023
3cbf7f6
temporarily removing 2023-05-01-preview in order to base it off of th…
ericasp16 Apr 13, 2023
5447961
re-adding 20203-05-01-preview, copied from 2022-06-01-preview
ericasp16 Apr 13, 2023
3ec0727
add operator information search endpoint and example
ericasp16 Apr 14, 2023
939e8a3
update examples
ericasp16 Apr 14, 2023
90e82c3
updated to fix automatic validation
ericasp16 Apr 14, 2023
d213fd5
fix model validation error
ericasp16 Apr 14, 2023
15ea3b6
temporarily remove 2023-05-01-preview to base off newest version
ericasp16 Apr 25, 2023
b8ae91b
Merge branch 'main' into ericasp/communication-phone-numbers-number-l…
ericasp16 Apr 25, 2023
5810906
re-create 2023-05-01-preview, based off latest stable version
ericasp16 Apr 25, 2023
73713ec
update 2023-05-01-preview with number lookup endpoint information
ericasp16 Apr 25, 2023
6dd14e6
fix model validation
ericasp16 Apr 25, 2023
48cdf33
attempt to fix a naming conflict
ericasp16 Apr 26, 2023
0a27b0c
update documentation comments, operationId
ericasp16 Apr 26, 2023
cfd053e
fix example to match response in swagger
ericasp16 Apr 27, 2023
d2d8fef
revert to 'Error' name
ericasp16 Apr 27, 2023
dfbfd12
fix lintdiff
ericasp16 Apr 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"api-version": "2022-12-01",
"api-version": "2023-05-01-preview",
"endpoint": "https://resourcename.communication.azure.com/",
"operationId": "search_my-operation-id"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"parameters": {
"api-version": "2023-05-01-preview",
"endpoint": "https://resourcename.communication.azure.com/",
"body": {
"phoneNumbers": [
"+11234567890"
]
}
},
"responses": {
"200": {
"body": {
"values": [
{
"phoneNumber": "+11234567890",
"numberType": "mobile",
"operatorDetails": {
"name": "T-Mobile",
"mobileNetworkCode": "260",
"mobileCountryCode": "310"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,54 @@
}
}
}
},
"/operatorInformation/:search": {
"post": {
"tags": [
"Obtain operator information for requested numbers"
],
"summary": "Searches for operator information for a given list of phone numbers.",
"operationId": "PhoneNumbers_OperatorInformationSearch",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"in": "body",
"name": "body",
"required": true,
"description": "The phone number(s) whose operator information should be searched",
"schema": {
"$ref": "#/definitions/OperatorInformationRequest"
}
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/OperatorInformationResult"
}
},
"default": {
"description": "Failure",
"schema": {
"$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse"
}
}
},
"x-ms-examples": {
"Search for operator information on phone numbers": {
"$ref": "./examples/SearchOperatorInformation.json"
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -1418,6 +1466,80 @@
"type": "string"
}
}
},
"OperatorInformationRequest": {
"description": "Represents a search request for operator information for the given phone numbers",
"type": "object",
"properties": {
"phoneNumbers": {
"description": "Phone number(s) whose operator information is being requested",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"OperatorInformationResult": {
"description": "Represents a search result containing operator information associated with the requested phone numbers",
"type": "object",
"properties": {
"values": {
"description": "Results of a search.\r\nThis array will have one entry per requested phone number which will contain the relevant operator information.",
"type": "array",
"items": {
"$ref": "#/definitions/OperatorInformation"
}
}
}
},
"OperatorInformation": {
"description": "Represents metadata about a phone number that is controlled/provided by that phone number's operator.",
"type": "object",
"properties": {
"phoneNumber": {
"description": "E.164 formatted string representation of the phone number",
"type": "string"
},
"numberType": {
"description": "Type of service associated with the phone number",
"enum": [
"geographic",
"mobile",
"paging",
"freePhone",
"specialServices",
"testNumber",
"voip"
],
"type": "string",
"x-ms-enum": {
"name": "OperatorNumberType",
"modelAsString": true
}
},
"operatorDetails": {
"$ref": "#/definitions/OperatorDetails"
}
}
},
"OperatorDetails": {
"description": "Represents metadata describing the operator of a phone number",
"type": "object",
"properties": {
"name": {
"description": "Name of the phone operator",
"type": "string"
},
"mobileNetworkCode": {
"description": "Mobile Network Code",
"type": "string"
},
"mobileCountryCode": {
"description": "Mobile Country Code",
"type": "string"
}
}
}
},
"parameters": {
Expand Down