Update a Microsoft Teams Endpoint

PUT/zstack/v1/sns/application-endpoints/microsoft-teams/{uuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateSNSMicrosoftTeamsEndpoint": {
    "url": "https://open.microsoft-teams.cn/open-apis/bot/v2/hook/006879a3-0898-4428-aad4-3221db3daf81",
    "name": "new name",
    "description": "desc"
  },
  "systemTags": [],
  "userTags": []
}

In the example above, the systemTags and userTags fields are optional. They are listed to indicate that these two fields can be included in the body.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateSNSMicrosoftTeamsEndpoint":{"url":"https://open.microsoft-teams.cn/open-apis/bot/v2/hook/006879a3-0898-4428-aad4-3221db3daf81","name":"new name","description":"desc"}}' \
http://localhost:8080/zstack/v1/sns/application-endpoints/microsoft-teams/74653e34090f3c6fbe9f45b693600dcf/actions

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
url (optional)Stringbody (contained in the updateSNSMicrosoftTeamsEndpoint structure)webhook url 5.0.0
uuidStringurlThe UUID of the resource. Uniquely identifies the resource. 5.0.0
name (optional)Stringbody (contained in the updateSNSMicrosoftTeamsEndpoint structure)Resource name 5.0.0
description (optional)Stringbody (contained in the updateSNSMicrosoftTeamsEndpoint structure)Detailed description of the resource 5.0.0
systemTags (optional)ListbodySystem tags 5.0.0
userTags (optional)ListbodyUser tags 5.0.0

API Response

Response Example

{
  "inventory": {
    "name": "example",
    "uuid": "917fe66f76b241f0843dfbd6be685fc1",
    "description": "description example",
    "type": "Email",
    "state": "Enabled",
    "platformUuid": "4eb0ceebf95b452585ebeacd647d9f35",
    "createDate": "Dec 25, 2023 2:04:12 PM",
    "lastOpDate": "Dec 25, 2023 2:04:12 PM"
  }
}
NameTypeDescriptionStarting Version
successboolean 5.0.0
errorErrorCodeThe error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error5.0.0
inventorySNSApplicationEndpointInventoryFor details, see inventory5.0.0

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001.5.0.0
descriptionStringA brief description of the error5.0.0
detailsStringDetailed information about the error5.0.0
elaborationStringReserved field. Default is null.5.0.0
opaqueLinkedHashMapReserved field. Default is null.5.0.0
causeErrorCodeThe root error. The source error that caused the current error. If there is no root error, this field is null.5.0.0

inventory

NameTypeDescriptionStarting Version
nameStringResource name5.0.0
uuidStringThe UUID of the resource. Uniquely identifies the resource.5.0.0
descriptionStringDetailed description of the resource5.0.0
typeStringType5.0.0
platformUuidStringApplication platform UUID5.0.0
createDateTimestampCreation time5.0.0
lastOpDateTimestampLast modification time5.0.0

SDK Examples

Java SDK

UpdateSNSMicrosoftTeamsEndpointAction action = new UpdateSNSMicrosoftTeamsEndpointAction();
action.url = "https://open.microsoft-teams.cn/open-apis/bot/v2/hook/006879a3-0898-4428-aad4-3221db3daf81";
action.uuid = "74653e34090f3c6fbe9f45b693600dcf";
action.name = "new name";
action.description = "desc";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateSNSMicrosoftTeamsEndpointAction.Result res = action.call();

Python SDK

UpdateSNSMicrosoftTeamsEndpointAction action = UpdateSNSMicrosoftTeamsEndpointAction()
action.url = "https://open.microsoft-teams.cn/open-apis/bot/v2/hook/006879a3-0898-4428-aad4-3221db3daf81"
action.uuid = "74653e34090f3c6fbe9f45b693600dcf"
action.name = "new name"
action.description = "desc"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateSNSMicrosoftTeamsEndpointAction.Result res = action.call()