Create Notification Provider
Create a new notification provider
Create a new notification provider for the organization. The id of the organization is fetched from CSP token
Request
URI
POST
https://api.app-catalog.vmware.com/v1/notification-providers
COPY
Request Body
CreateNotificationProviderRequestBody
of type(s)
application/json
Required
OneOf
This class requires at least one of the following:
Show optional properties
{
"type": "string"
}
{
"name": "My Email Provider",
"type": "string"
}
string
type
Required
Type of notification provider
Possible values are :
EMAIL,
SLACK,
GOOGLE_CHAT,
Responses
201
The notification provider has been created
Operation doesn't return any data structure
Response Headers
string
Location
URL to request the notification provider that has been created
400
An error related to the notification provider
Returns
ConstraintsViolationsError
of type(s)
application/problem+json
This response body class contains all of the following:
Error
{
"type": "https://example.com/probs/validation-error",
"title": "Validation error",
"status": 400,
"detail": "There was an error validating the request",
"violations": [
{
"field": "amount",
"message": "It should be greater than zero"
}
]
}
403
The requesting user is not authorized to create a notification provider
Returns
Error403
of type(s)
application/problem+json
This response body class contains all of the following:
Error
{
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit.",
"status": 403,
"detail": "Your current balance is 30, but that costs 50",
"instance": "/account/2217eb9c-f042-11eb-9a03-0242ac130003/msgs/abc"
}
500
An internal server error object
Returns
Error500
of type(s)
application/problem+json
This response body class contains all of the following:
Error
{
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit.",
"status": 403,
"detail": "Your current balance is 30, but that costs 50",
"instance": "/account/2217eb9c-f042-11eb-9a03-0242ac130003/msgs/abc"
}
503
The server is temporarily unavailable
Returns
Error503
of type(s)
application/problem+json
This response body class contains all of the following:
Error
{
"type": "https://example.com/probs/out-of-credit",
"title": "You do not have enough credit.",
"status": 403,
"detail": "Your current balance is 30, but that costs 50",
"instance": "/account/2217eb9c-f042-11eb-9a03-0242ac130003/msgs/abc"
}
Code Samples
COPY
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"type":"string"}' https://{api_host}/v1/notification-providers