import os
from syllable_sdk import SyllableSDK, models
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.services.update(request={
"name": "Weather tools",
"description": "Service containing tools for fetching weather information",
"auth_type": models.ToolAuthType.BASIC,
"auth_values": {
"password": "my-password",
"username": "my-username",
},
"id": 1,
"last_updated_comments": "Updated description to correct typo",
})
# Handle response
print(res)
{
"id": 1,
"name": "Weather tools",
"description": "Service containing tools for fetching weather information",
"auth_type": "basic",
"auth_value_keys": [
"username",
"password"
],
"last_updated_comments": "Updated description to correct typo",
"last_updated": "2024-01-01T12:00:00Z",
"last_updated_by": "user@email.com",
"tools": [
"hangup",
"summary"
]
}
Update an existing service.
import os
from syllable_sdk import SyllableSDK, models
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.services.update(request={
"name": "Weather tools",
"description": "Service containing tools for fetching weather information",
"auth_type": models.ToolAuthType.BASIC,
"auth_values": {
"password": "my-password",
"username": "my-username",
},
"id": 1,
"last_updated_comments": "Updated description to correct typo",
})
# Handle response
print(res)
{
"id": 1,
"name": "Weather tools",
"description": "Service containing tools for fetching weather information",
"auth_type": "basic",
"auth_value_keys": [
"username",
"password"
],
"last_updated_comments": "Updated description to correct typo",
"last_updated": "2024-01-01T12:00:00Z",
"last_updated_by": "user@email.com",
"tools": [
"hangup",
"summary"
]
}
Request model to update an existing service.
Successful Response
Response model for service operations. A service is a collection of tools.