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

CALL-52978-Phase-1: Move numbers across locations via API #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
385 changes: 385 additions & 0 deletions provisioning-api/webex-calling-provisioning-apis.json
Original file line number Diff line number Diff line change
Expand Up @@ -2196,6 +2196,381 @@
"response": []
}
]
},
{
"name": "Move Numbers",
"item": [
{
"name": "List Manage Numbers Jobs",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Expected status code: 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{WEBEX_API_URL}}/telephony/config/jobs/numbers/manageNumbers",
"host": [
"{{WEBEX_API_URL}}"
],
"path": [
"telephony",
"config",
"jobs",
"numbers",
"manageNumbers"
]
}
},
"response": []
},
{
"name": "Initiate Manage Numbers Job",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Expected status code: 202\", function () {",
" pm.response.to.have.status(202);",
"});",
"",
"let res = pm.response.json();",
"",
"pm.collectionVariables.set(\"_jobId\", res.id);",
"",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"operation\": \"MOVE\",\n \"targetLocationId\": {{TARGET_LOCATION}} ,\n \"numberList\": [{\n \"locationId\": {{_locationId}}, \n \"numbers\": [{{NUMBER_TO_MOVE}}]\n }]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{WEBEX_API_URL}}/telephony/config/jobs/numbers/manageNumbers",
"host": [
"{{WEBEX_API_URL}}"
],
"path": [
"telephony",
"config",
"jobs",
"numbers",
"manageNumbers"
]
},
"description": "The phone numbers should be an unassigned numbers. Both source and target location should have the same PSTN Connection."
},
"response": []
},
{
"name": "Pause Manage Numbers Job",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Expected status code: 204\", function () {",
" pm.response.to.have.status(204);",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"operation\": \"MOVE\",\n \"targetLocationId\": \"Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OL2Y1OTc5NzE2LWVlZjItNDkxYS1iZmU5LWYwMWIwZGJjYzU2ZQ\",\n \"numberList\": [{\n \"locationId\": \"Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzAxOTRmMGVmLTQ0OGMtNGI5MS1hNjVlLTFhN2VmYzYwYzk3ZQ\",\n \"numbers\": [\"+17184275806\"]\n }]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{WEBEX_API_URL}}/telephony/config/jobs/numbers/manageNumbers/{{_jobId}}/actions/pause/invoke",
"host": [
"{{WEBEX_API_URL}}"
],
"path": [
"telephony",
"config",
"jobs",
"numbers",
"manageNumbers",
"{{_jobId}}",
"actions",
"pause",
"invoke"
]
}
},
"response": []
},
{
"name": "Resume Manage Numbers Job",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Expected status code: 204\", function () {",
" pm.response.to.have.status(204);",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"operation\": \"MOVE\",\n \"targetLocationId\": \"Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OL2Y1OTc5NzE2LWVlZjItNDkxYS1iZmU5LWYwMWIwZGJjYzU2ZQ\",\n \"numberList\": [{\n \"locationId\": \"Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzAxOTRmMGVmLTQ0OGMtNGI5MS1hNjVlLTFhN2VmYzYwYzk3ZQ\",\n \"numbers\": [\"+17184275806\"]\n }]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{WEBEX_API_URL}}/telephony/config/jobs/numbers/manageNumbers/{{_jobId}}/actions/resume/invoke",
"host": [
"{{WEBEX_API_URL}}"
],
"path": [
"telephony",
"config",
"jobs",
"numbers",
"manageNumbers",
"{{_jobId}}",
"actions",
"resume",
"invoke"
]
}
},
"response": []
},
{
"name": "Abandon Manage Numbers Job",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Expected status code: 204\", function () {",
" pm.response.to.have.status(204);",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"operation\": \"MOVE\",\n \"targetLocationId\": \"Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OL2Y1OTc5NzE2LWVlZjItNDkxYS1iZmU5LWYwMWIwZGJjYzU2ZQ\",\n \"numberList\": [{\n \"locationId\": \"Y2lzY29zcGFyazovL3VzL0xPQ0FUSU9OLzAxOTRmMGVmLTQ0OGMtNGI5MS1hNjVlLTFhN2VmYzYwYzk3ZQ\",\n \"numbers\": [\"+17184275806\"]\n }]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{WEBEX_API_URL}}/telephony/config/jobs/numbers/manageNumbers/{{_jobId}}/actions/abandon/invoke",
"host": [
"{{WEBEX_API_URL}}"
],
"path": [
"telephony",
"config",
"jobs",
"numbers",
"manageNumbers",
"{{_jobId}}",
"actions",
"abandon",
"invoke"
]
}
},
"response": []
},
{
"name": "Retrieve Manage Numbers Job Details",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Expected status code: 200\", function () {",
" pm.response.to.have.status(200);",
"});",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{WEBEX_API_URL}}/telephony/config/jobs/numbers/manageNumbers/{{_jobId}}",
"host": [
"{{WEBEX_API_URL}}"
],
"path": [
"telephony",
"config",
"jobs",
"numbers",
"manageNumbers",
"{{_jobId}}"
]
}
},
"response": []
},
{
"name": "Retrieve Manage Numbers Job Error Details",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Expected status code: 200\", function () {",
" pm.response.to.have.status(200);",
"});",
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{WEBEX_API_URL}}/telephony/config/jobs/numbers/manageNumbers/{{_jobId}}/errors",
"host": [
"{{WEBEX_API_URL}}"
],
"path": [
"telephony",
"config",
"jobs",
"numbers",
"manageNumbers",
"{{_jobId}}",
"errors"
]
}
},
"response": []
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{WEBEX_TOKEN}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
}
]
},
Expand Down Expand Up @@ -3906,6 +4281,16 @@
{
"key": "_jobId",
"value": ""
},
{
"key": "NUMBER_TO_MOVE",
"value": "Set this to a valid unassigned phone numner to be moved.",
"type": "string"
},
{
"key": "TARGET_LOCATION",
"value": "Set this to a valid location id to which the number is moved.",
"type": "string"
}
]
}