public class CMAWebhook extends CMAResource
A valid webhook needs to at least have called setName(String), setUrl(String),
addTopic(CMAWebhookTopic).
| Constructor and Description |
|---|
CMAWebhook()
Create a webhoook, setting up the system attribute for it.
|
| Modifier and Type | Method and Description |
|---|---|
CMAWebhook |
addHeader(String key,
String value)
Adds a custom http header to the call done by this webhook.
|
CMAWebhook |
addTopic(CMAWebhookTopic topic)
Add a topic this webhook should be triggered on.
|
List<CMAWebhookHeader> |
getHeaders() |
String |
getName() |
String |
getPassword() |
List<CMAWebhookTopic> |
getTopics() |
CMAWebhookTransformation |
getTransformation() |
String |
getUrl() |
String |
getUser() |
CMAWebhook |
setBasicAuthorization(String user,
String password)
Set authorization parameter for basic HTTP authorization on the url to be called by this
webhook.
|
CMAWebhook |
setId(String id)
Convenience: Update the id of this entry without going through
CMAResource.getSystem(). |
CMAWebhook |
setName(String name)
Set the name of this webhook.
|
CMAWebhook |
setSpaceId(String spaceId)
Convenience: Update the space id of this entry without going through
CMAResource.getSystem(). |
CMAWebhook |
setSystem(CMASystem system)
Sets the system field.
|
CMAWebhook |
setTransformation(CMAWebhookTransformation transformation)
Set the transformation of this webhook
|
CMAWebhook |
setUrl(String url)
Sets the url to be called when this webhook is triggered.
|
CMAWebhook |
setVersion(Integer version)
Convenience: Update the version of this entry without going through
CMAResource.getSystem(). |
String |
toString() |
getEnvironmentId, getId, getSpaceId, getSystem, getVersion, getVisibility, isArchived, isPublished, setEnvironmentId, setVisibilitypublic CMAWebhook()
public CMAWebhook setSystem(CMASystem system)
setSystem in class CMAResourcesystem - sets the system property.public CMAWebhook setId(String id)
CMAResource.getSystem().setId in class CMAResourceid - to be set.public CMAWebhook setVersion(Integer version)
CMAResource.getSystem().setVersion in class CMAResourceversion - to be set.public CMAWebhook setSpaceId(String spaceId)
CMAResource.getSystem().setSpaceId in class CMAResourcespaceId - to be set.public CMAWebhook addTopic(CMAWebhookTopic topic)
topic - a valid enum value for the trigger reason.public CMAWebhook addHeader(String key, String value)
key - HTTP header key to be used (aka 'X-My-Header-Name')value - HTTP header value to be used (aka 'this-is-my-name')public CMAWebhook setBasicAuthorization(String user, String password)
user - username to be usedpassword - password to be used (cannot be retrieved, only updated!)public String getName()
public CMAWebhook setName(String name)
name - to identify this webhookpublic String getUrl()
public CMAWebhook setUrl(String url)
url - complete, existing url to be usedpublic List<CMAWebhookTopic> getTopics()
public List<CMAWebhookHeader> getHeaders()
public CMAWebhookTransformation getTransformation()
public CMAWebhook setTransformation(CMAWebhookTransformation transformation)
transformation - transformation property.public String getUser()
setBasicAuthorization(String, String)public String getPassword()
setBasicAuthorization(String, String)public String toString()
toString in class CMAResourceCopyright © 2026 Contentful, GmbH.. All rights reserved.