Manage Notification Medium Metadata

Prev Next

1. Get All or Get by Name Notification Medium Metadata

This GET method returns a list of all notification medium metadata.

Note: To execute this API, the user should have permission assigned (through policy) with action as nm.notificationmetadata.list.

GET
{{url}}/api/v1/notification-service/notificationmedium/metadata?filter=name eq <notification medium name>

Request Parameters

The request parameters used in this method are shown in the following table:

ParameterDescriptionData TypeRequired
filterFilter the list of notification mediums based on the name of a notification medium, The supported operators are 'eq' and 'co'. 
For example: status eq Corporate_slack
StringOptional

Request Example

curl -X GET '{{url}}/api/v1/notification-service/notificationmediums/metadata' -H 'Authorization: Bearer <token>'

Response Example 

Status: 200 Ok
{
    "result": [
        {
            "tenantId": "preview",
            "mediumName": "email",
            "connectionParameters": []
        },
        {
            "tenantId": "preview",
            "mediumName": "slack",
            "connectionParameters": [
                {
                    "name": "URL",
                    "description": "Slack URL",
                    "dataType": "string",
                    "maxLength": 100,
                    "regEx": "^(https?|ftp|file|HTTP)://[A-Za-z0-9+&\\$_-]([a-z0-9+&\\\\$?_.-][A-Za-z0-9;:@&%=+$=#_.-/]*)*(\\|?)$",
                    "required": true
                },
                {
                    "name": "token",
                    "description": "token",
                    "dataType": "string",
                    "maxLength": 100,
                    "regEx": "([a-zA-Z0-9-])+",
                    "required": true
                },
                {
                    "name": "slackAttribute",
                    "description": "Slack Mapping Attribute for slack",
                    "dataType": "string",
                    "maxLength": 30,
                    "regEx": "([a-zA-Z0-9])+",
                    "required": true
                },
                {
                    "name": "tenantAttribute",
                    "description": "Tenant Mapping Attribute for slack",
                    "dataType": "string",
                    "maxLength": 30,
                    "regEx": "([a-zA-Z0-9])+",
                    "required": true
                }
            ]
        },
        {
            "tenantId": "preview",
            "mediumName": "teams",
            "connectionParameters": [
                {
                    "name": "Webhook URL",
                    "description": "URL to send data to teams",
                    "dataType": "string",
                    "maxLength": 500,
                    "regEx": "^(https?|HTTP)://[A-Za-z0-9+&\\$_-]([a-z0-9+&\\\\$?_.-][A-Za-z0-9;:@&%=+$=#_.-/]*)*(\\|?)$",
                    "required": true
                }
            ]
        },
        {
            "tenantId": "qa-preview",
            "mediumName": "email",
            "connectionParameters": [
                {
                    "name": "senderEmailAddress",
                    "description": "Sender Email address",
                    "dataType": "string",
                    "maxLength": 100,
                    "regEx": "^(?=.{1,64}@)^[A-Za-z0-9_]+(.[A-Za-z0-9_]+)[A-Za-z0-9]+(.[A-Za-z0-9]+)*(.[A-Za-z]{2,})$",
                    "required": true
                }
            ]
        },
        {
            "tenantId": "qa-preview",
            "mediumName": "slack",
            "connectionParameters": [
                {
                    "name": "URL",
                    "description": "Slack URL",
                    "dataType": "string",
                    "maxLength": 100,
                    "regEx": "^(https?|ftp|file|HTTP)://[A-Za-z0-9+&\\$_-]([a-z0-9+&\\\\$?_.-][A-Za-z0-9;:@&%=+$=#_.-/]*)*(\\|?)$",
                    "required": true
                },
                {
                    "name": "token",
                    "description": "token",
                    "dataType": "string",
                    "maxLength": 100,
                    "regEx": "([a-zA-Z0-9-])+",
                    "required": true
                },
                {
                    "name": "slackAttribute",
                    "description": "Slack Mapping Attribute for slack",
                    "dataType": "string",
                    "maxLength": 30,
                    "regEx": "([a-zA-Z0-9])+",
                    "required": true
                },
                {
                    "name": "tenantAttribute",
                    "description": "Tenant Mapping Attribute for slack",
                    "dataType": "string",
                    "maxLength": 30,
                    "regEx": "([a-zA-Z0-9])+",
                    "required": true
                }
            ]
        },
        {
            "tenantId": "qa-preview",
            "mediumName": "teams",
            "connectionParameters": [
                {
                    "name": "Webhook URL",
                    "description": "URL to send data to teams",
                    "dataType": "string",
                    "maxLength": 500,
                    "regEx": "^(https?|HTTP)://[A-Za-z0-9+&\\$_-]([a-z0-9+&\\\\$?_.-][A-Za-z0-9;:@&%=+$=#_.-/]*)*(\\|?)$",
                    "required": true
                }
            ]
        },
        {
            "tenantId": "az-test",
            "mediumName": "email",
            "connectionParameters": []
        },
        {
            "tenantId": "az-test",
            "mediumName": "slack",
            "connectionParameters": [
                {
                    "name": "URL",
                    "description": "Slack URL",
                    "dataType": "string",
                    "maxLength": 100,
                    "regEx": "^(https?|ftp|file|HTTP)://[A-Za-z0-9+&\\$_-]([a-z0-9+&\\\\$?_.-][A-Za-z0-9;:@&%=+$=#_.-/]*)*(\\|?)$",
                    "required": true
                },
                {
                    "name": "token",
                    "description": "token",
                    "dataType": "string",
                    "maxLength": 100,
                    "regEx": "([a-zA-Z0-9-])+",
                    "required": true
                },
                {
                    "name": "slackAttribute",
                    "description": "Slack Mapping Attribute for slack",
                    "dataType": "string",
                    "maxLength": 30,
                    "regEx": "([a-zA-Z0-9])+",
                    "required": true
                },
                {
                    "name": "tenantAttribute",
                    "description": "Tenant Mapping Attribute for slack",
                    "dataType": "string",
                    "maxLength": 30,
                    "regEx": "([a-zA-Z0-9])+",
                    "required": true
                }
            ]
        },
        {
            "tenantId": "az-test",
            "mediumName": "teams",
            "connectionParameters": [
                {
                    "name": "Webhook URL",
                    "description": "URL to send data to teams",
                    "dataType": "string",
                    "maxLength": 500,
                    "regEx": "^(https?|HTTP)://[A-Za-z0-9+&\\$_-]([a-z0-9+&\\\\$?_.-][A-Za-z0-9;:@&%=+$=#_.-/]*)*(\\|?)$",
                    "required": true
                }
            ]
        },
        {
            "tenantId": "qa1-migration",
            "mediumName": "email",
            "connectionParameters": []
        },
        {
            "tenantId": "qa1-migration",
            "mediumName": "slack",
            "connectionParameters": [
                {
                    "name": "URL",
                    "description": "Slack URL",
                    "dataType": "string",
                    "maxLength": 100,
                    "regEx": "^(https?|ftp|file|HTTP)://[A-Za-z0-9+&\\$_-]([a-z0-9+&\\\\$?_.-][A-Za-z0-9;:@&%=+$=#_.-/]*)*(\\|?)$",
                    "required": true
                },
                {
                    "name": "token",
                    "description": "token",
                    "dataType": "string",
                    "maxLength": 100,
                    "regEx": "([a-zA-Z0-9-])+",
                    "required": true
                },
                {
                    "name": "slackAttribute",
                    "description": "Slack Mapping Attribute for slack",
                    "dataType": "string",
                    "maxLength": 30,
                    "regEx": "([a-zA-Z0-9])+",
                    "required": true
                },
                {
                    "name": "tenantAttribute",
                    "description": "Tenant Mapping Attribute for slack",
                    "dataType": "string",
                    "maxLength": 30,
                    "regEx": "([a-zA-Z0-9])+",
                    "required": true
                }
            ]
        },
        {
            "tenantId": "qa1-migration",
            "mediumName": "teams",
            "connectionParameters": [
                {
                    "name": "Webhook URL",
                    "description": "URL to send data to teams",
                    "dataType": "string",
                    "maxLength": 500,
                    "regEx": "^(https?|HTTP)://[A-Za-z0-9+&\\$_-]([a-z0-9+&\\\\$?_.-][A-Za-z0-9;:@&%=+$=#_.-/]*)*(\\|?)$",
                    "required": true
                }
            ]
        },
        {
            "tenantId": "qa2",
            "mediumName": "email",
            "connectionParameters": []
        },
        {
            "tenantId": "qa2",
            "mediumName": "slack",
            "connectionParameters": [
                {
                    "name": "URL",
                    "description": "Slack URL",
                    "dataType": "string",
                    "maxLength": 100,
                    "regEx": "^(https?|ftp|file|HTTP)://[A-Za-z0-9+&\\$_-]([a-z0-9+&\\\\$?_.-][A-Za-z0-9;:@&%=+$=#_.-/]*)*(\\|?)$",
                    "required": true
                },
                {
                    "name": "token",
                    "description": "token",
                    "dataType": "string",
                    "maxLength": 100,
                    "regEx": "([a-zA-Z0-9-])+",
                    "required": true
                },
                {
                    "name": "slackAttribute",
                    "description": "Slack Mapping Attribute for slack",
                    "dataType": "string",
                    "maxLength": 30,
                    "regEx": "([a-zA-Z0-9])+",
                    "required": true
                },
                {
                    "name": "tenantAttribute",
                    "description": "Tenant Mapping Attribute for slack",
                    "dataType": "string",
                    "maxLength": 30,
                    "regEx": "([a-zA-Z0-9])+",
                    "required": true
                }
            ]
        },
        {
            "tenantId": "qa2",
            "mediumName": "teams",
            "connectionParameters": [
                {
                    "name": "Webhook URL",
                    "description": "URL to send data to teams",
                    "dataType": "string",
                    "maxLength": 500,
                    "regEx": "^(https?|HTTP)://[A-Za-z0-9+&\\$_-]([a-z0-9+&\\\\$?_.-][A-Za-z0-9;:@&%=+$=#_.-/]*)*(\\|?)$",
                    "required": true
                }
            ]
        },
        {
            "tenantId": "qa1",
            "mediumName": "email",
            "connectionParameters": []
        },
        {
            "tenantId": "qa1",
            "mediumName": "slack",
            "connectionParameters": [
                {
                    "name": "URL",
                    "description": "Slack URL",
                    "dataType": "string",
                    "maxLength": 100,
                    "regEx": "^(https?|ftp|file|HTTP)://[A-Za-z0-9+&\\$_-]([a-z0-9+&\\\\$?_.-][A-Za-z0-9;:@&%=+$=#_.-/]*)*(\\|?)$",
                    "required": true
                },
                {
                    "name": "token",
                    "description": "token",
                    "dataType": "string",
                    "maxLength": 100,
                    "regEx": "([a-zA-Z0-9-])+",
                    "required": true
                },
                {
                    "name": "slackAttribute",
                    "description": "Slack Mapping Attribute for slack",
                    "dataType": "string",
                    "maxLength": 30,
                    "regEx": "([a-zA-Z0-9])+",
                    "required": true
                },
                {
                    "name": "tenantAttribute",
                    "description": "Tenant Mapping Attribute for slack",
                    "dataType": "string",
                    "maxLength": 30,
                    "regEx": "([a-zA-Z0-9])+",
                    "required": true
                }
            ]
        },
        {
            "tenantId": "qa1",
            "mediumName": "teams",
            "connectionParameters": [
                {
                    "name": "Webhook URL",
                    "description": "URL to send data to teams",
                    "dataType": "string",
                    "maxLength": 500,
                    "regEx": "^(https?|HTTP)://[A-Za-z0-9+&\\$_-]([a-z0-9+&\\\\$?_.-][A-Za-z0-9;:@&%=+$=#_.-/]*)*(\\|?)$",
                    "required": true
                }
            ]
        }
    ]
}

2. Generate URL for Slack app or Download the manifest file for Teams app integration

This GET method generates the URL for either installing the Slack App or downloading the install file for Teams App

Note: To execute this API, the user should have permission assigned (through policy) with action as nm.notificationmetadata.list.

GET
{{url}}/api/v1/notificationmedium/metadata/install/{appType}

Request Example

curl -X GET '{{url}}/api/v1//notificationmedium/metadata/install/{appType}' -H 'Authorization: Bearer <token>'

Response Example

{
    "result": {
        "installUrl": "https://teams.3pdev.aws.britive-app.com/api/install/zip?tenant=eaxmple.com&token=M3J2bjBqdTAxdTRtaGc4bzoyZjVhYzY0NmI1NzAxN2Q5YTZhNjg2MzA2NzBmMTZhYWI0MmYwYjRiMzZmYTE0OWZmM2ViODVlZWJiM2E5NDc5"
    }
}