Python Scripts to Add Multiple Skills to WebEx CC
import requests
import json
# ---------- CONFIG ----------
ORG_ID = "6ccd2546-c63c-450b-af4a-372591ba0869"
TOKEN = "Bearer NDYxNDgxOGYtMjJhYS00MmI4LTk4YTItYWQ2YWRkNjIyZDY2Y2I2MTBjOTktMmU1_P0A1_6ccd2546-c63c-450b-af4a-372591ba0869"
SKILLS_FILE = "uccx_skills.csv"
API_URL = f"https://api.wxcc-us1.cisco.com/organization/{ORG_ID}/skill"
headers = {
"Authorization": TOKEN,
"Content-Type": "application/json",
"Accept": "*/*"
}
# ---------- BULK CREATION ----------
with open(SKILLS_FILE, "r") as file:
skills = [line.strip() for line in file if line.strip()]
for skill in skills:
payload = {
"organizationId": ORG_ID,
"version": 1,
"name": skill,
"description": f"Skill to speak fluent {skill.replace(' Speaking', '')}.",
"serviceLevelThreshold": 0,
"enumSkillValues": [],
"active": True,
"skillType": "BOOLEAN"
}
response = requests.post(API_URL, headers=headers, data=json.dumps(payload))
print(f"Creating Skill: {skill} -> Status {response.status_code}")
print(response.text)
print("-" * 60)
Rating
0
0
There are no comments for now.
Join this Course
to be the first to leave a comment.