Create a Microsoft Teams Endpoint

POST/zstack/v1/sns/application-endpoints/microsoft-teams

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "url": "http://teams-robot-url",
    "name": "Microsofo teams"
  },
  "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 POST -d '{"params":{"url":"http://teams-robot-url","name":"Microsoft teams"}}' http://localhost:8080/zstack/v1/sns/application-endpoints/microsoft-teams

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
urlStringbody (contained in the params structure)Connector URL 3.10.0
nameStringbody (contained in the params structure)Resource name 3.10.0
description (optional)Stringbody (contained in the params structure)Detailed description of the resource 3.10.0
platformUuid (optional)Stringbody (contained in the params structure)  3.10.0
resourceUuid (optional)Stringbody (contained in the params structure)Resource UUID 3.10.0
tagUuids (optional)Listbody (contained in the params structure)Tag UUID list 3.10.0
systemTags (optional)ListbodySystem tags 3.10.0
userTags (optional)ListbodyUser tags 3.10.0

API Response

Response Example

{
  "inventory": {
    "url": "http://teams-robot-url",
    "name": "example",
    "uuid": "917fe66f76b241f0843dfbd6be685fc1",
    "description": "description example",
    "type": "Email",
    "state": "Enabled",
    "platformUuid": "4eb0ceebf95b452585ebeacd647d9f35",
    "createDate": "Mar 26, 2024 2:44:53 AM",
    "lastOpDate": "Mar 26, 2024 2:44:53 AM"
  }
}
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 error3.10.0
inventorySNSMicrosoftTeamsEndpointInventoryFor details, see inventory3.10.0

error

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

inventory

NameTypeDescriptionStarting Version
urlStringConnector URL3.10.0
nameStringResource name3.10.0
uuidStringThe UUID of the resource. Uniquely identifies the resource.3.10.0
descriptionStringDetailed description of the resource3.10.0
typeString 3.10.0
stateString 3.10.0
platformUuidString 3.10.0
createDateTimestampCreation time3.10.0
lastOpDateTimestampLast modification time3.10.0

SDK Examples

Java SDK

CreateSNSMicrosoftTeamsEndpointAction action = new CreateSNSMicrosoftTeamsEndpointAction();
action.url = "http://teams-robot-url";
action.name = "Microsofo teams";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateSNSMicrosoftTeamsEndpointAction.Result res = action.call();

Python SDK

CreateSNSMicrosoftTeamsEndpointAction action = CreateSNSMicrosoftTeamsEndpointAction()
action.url = "http://teams-robot-url"
action.name = "Microsofo teams"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
CreateSNSMicrosoftTeamsEndpointAction.Result res = action.call()