CreateSNSMicrosoftTeamsEndpoint
API Request
URLs
POST zstack/v1/sns/application-endpoints/microsoft-teamsHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"url": "http://teams-robot-url",
"name": "Microsoft teams"
},
"systemTags": [],
"userTags": []
}
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.Curl
Sample
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-teamsRequest Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| url | String | body (contained in the params structure) | The connector URL. | 3.10.0 | |
| name | String | body (contained in the params structure) | The resource name. | 3.10.0 | |
| description | String | body (contained in the params structure) | Optional. The detailed description of the resource. | 3.10.0 | |
| platformUuid | String | body (contained in the params structure) | Optional. The notification platform uuid. | 3.10.0 | |
| resourceUuid | String | body (contained in the params structure) | Optional. The resource UUID. | 3.10.0 | |
| tagUuids | List | body (contained in the params structure) | Optional. The tag UUID list. | 3.10.0 | |
| systemTags | List | body | Optional. The system tags. | 3.10.0 | |
| userTags | List | body | Optional. The user tags. | 3.10.0 |
API Response
Sample
Response
{
"inventory": {
"url": "http://teams-robot-url",
"name": "example",
"uuid": "917fe66f76b241f0843dfbd6be685fc1",
"description": "description example",
"type": "Email",
"state": "Enabled",
"platformUuid": "4eb0ceebf95b452585ebeacd647d9f35",
"createDate": "Dec 25, 2023 2:06:32 PM",
"lastOpDate": "Dec 25, 2023 2:06:32 PM"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 5.0.0 | |
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 3.10.0 |
| inventory | SNSSmsEndpointInventory | See inventory. | 3.10.0 |
#error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 3.10.0 |
| description | String | The brief description of the error. | 3.10.0 |
| details | String | The details about the error. | 3.10.0 |
| elaboration | String | The reserved field. Default value: null. | 3.10.0 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 3.10.0 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 3.10.0 |
#inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| url | String | The connector URL. | 3.10.0 |
| name | String | The resource name. | 3.10.0 |
| uuid | String | The resource UUID. | 3.10.0 |
| description | String | The detailed description of the resource. | 3.10.0 |
| type | String | 3.10.0 | |
| state | String | 3.10.0 | |
| platformUuid | String | 3.10.0 | |
| createDate | Timestamp | The creation date. | 3.10.0 |
| lastOpDate | Timestamp | The last operation date. | 3.10.0 |
SDK Sample
Java
SDK
CreateSNSMicrosoftTeamsEndpointAction action = new CreateSNSMicrosoftTeamsEndpointAction();
action.url = "http://teams-robot-url";
action.name = "Microsoft teams";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateSNSMicrosoftTeamsEndpointAction.Result res = action.call();Python
SDK
CreateSNSMicrosoftTeamsEndpointAction action = CreateSNSMicrosoftTeamsEndpointAction()
action.url = "http://teams-robot-url"
action.name = "Microsoft teams"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
CreateSNSMicrosoftTeamsEndpointAction.Result res = action.call()