| Modifier and Type | Class and Description |
|---|---|
class |
ModuleWebhooks.Async
Async module.
|
| Constructor and Description |
|---|
ModuleWebhooks(retrofit2.Retrofit retrofit,
Executor callbackExecutor,
String spaceId,
String environmentId,
boolean environmentIdConfigured)
Create this module.
|
| Modifier and Type | Method and Description |
|---|---|
ModuleWebhooks.Async |
async()
Use this method if you require asynchronous requests through retrofit.
|
CMAWebhookCallDetail |
callDetails(CMAWebhookCall call)
Get more information about one specific call to one specific webhook, hosted by one specific
space.
|
CMAArray<CMAWebhookCall> |
calls(CMAWebhook webhook) |
CMAArray<CMAWebhookCall> |
calls(CMAWebhook webhook,
Map<String,String> query)
Get more information about a specific webhook.
|
CMAWebhook |
create(CMAWebhook webhook)
Create a new webhook.
|
CMAWebhook |
create(String spaceId,
CMAWebhook webhook)
Create a new webhook.
|
protected com.contentful.java.cma.ServiceWebhooks |
createService(retrofit2.Retrofit retrofit)
Internal method used for creating the service.
|
Integer |
delete(CMAWebhook webhook)
Delete a given Webhook.
|
CMAArray<CMAWebhook> |
fetchAll()
Retrieve all the webhooks defined the configured space.
|
CMAArray<CMAWebhook> |
fetchAll(Map<String,String> query)
Retrieve specific webhooks matching a query for this space.
|
CMAArray<CMAWebhook> |
fetchAll(String spaceId)
Retrieve all the webhooks defined for this space.
|
CMAArray<CMAWebhook> |
fetchAll(String spaceId,
Map<String,String> query)
Retrieve specific webhooks matching a query for this space.
|
CMAWebhook |
fetchOne(String webhookId)
Retrieve exactly one webhook, whose id you know.
|
CMAWebhook |
fetchOne(String spaceId,
String webhookId)
Retrieve exactly one webhook, whose id you know.
|
CMAWebhookHealth |
health(CMAWebhook webhook)
Return a general understanding of the health of the webhook.
|
CMAWebhook |
update(CMAWebhook webhook)
Change the content of a webhook.
|
public ModuleWebhooks(retrofit2.Retrofit retrofit,
Executor callbackExecutor,
String spaceId,
String environmentId,
boolean environmentIdConfigured)
retrofit - the retrofit instance to be used to create the service.callbackExecutor - to tell on which thread it should run.spaceId - the space to be used when not given.environmentId - the environment to be used when not given.environmentIdConfigured - internal helper to see if environment was set.protected com.contentful.java.cma.ServiceWebhooks createService(retrofit2.Retrofit retrofit)
retrofit - A Retrofit instance to create the service from.public ModuleWebhooks.Async async()
public CMAWebhook create(CMAWebhook webhook)
This will create a new ID and return the newly created webhook as a return value.
webhook - A representation of the Webhook to be used.IllegalArgumentException - if configured space id is null.IllegalArgumentException - if webhook is null.CMANotWithEnvironmentsException - if environmentId was set using
CMAClient.Builder.setEnvironmentId(String).CMAClient.Builder.setSpaceId(String)public CMAWebhook create(String spaceId, CMAWebhook webhook)
This will create a new ID and return the newly created webhook as a return value.
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and will ignore
CMAClient.Builder.setEnvironmentId(String).
spaceId - Which space should be used?webhook - A representation of the Webhook to be used.IllegalArgumentException - if space id is null.IllegalArgumentException - if webhook is null.public Integer delete(CMAWebhook webhook)
webhook - actual webhook to be deleted.IllegalArgumentException - if spaceId is null.IllegalArgumentException - if webhookId is null.public CMAArray<CMAWebhook> fetchAll()
CMAArray containing all found webhooks for this space.IllegalArgumentException - if configured spaceId is null.CMANotWithEnvironmentsException - if environmentId was set using
CMAClient.Builder.setEnvironmentId(String).CMAClient.Builder.setSpaceId(String)public CMAArray<CMAWebhook> fetchAll(Map<String,String> query)
query - Specifying the criteria on which webhooks to return.CMAArray containing all found webhooks for this space.IllegalArgumentException - if configured spaceId is null.CMANotWithEnvironmentsException - if environmentId was set using
CMAClient.Builder.setEnvironmentId(String).CMAClient.Builder.setSpaceId(String)public CMAArray<CMAWebhook> fetchAll(String spaceId)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and will ignore
CMAClient.Builder.setEnvironmentId(String).
spaceId - The id of the space to be asked for all of its spaces.CMAArray containing all found webhooks for this space.IllegalArgumentException - if spaceId is null.public CMAArray<CMAWebhook> fetchAll(String spaceId, Map<String,String> query)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and will ignore
CMAClient.Builder.setEnvironmentId(String).
spaceId - The id of the space to be asked for all of its spaces.query - Specifying the criteria on which webhooks to return.CMAArray containing all found webhooks for this space.IllegalArgumentException - if spaceId is null.public CMAWebhook fetchOne(String webhookId)
webhookId - The id of the webhook to be returned.IllegalArgumentException - if configured spaceId is null.IllegalArgumentException - if webhookId is null.CMANotWithEnvironmentsException - if environmentId was set using
CMAClient.Builder.setEnvironmentId(String).CMAClient.Builder.setSpaceId(String)public CMAWebhook fetchOne(String spaceId, String webhookId)
This method will override the configuration specified through
CMAClient.Builder.setSpaceId(String) and will ignore
CMAClient.Builder.setEnvironmentId(String).
spaceId - The id of the space to be hosting this webhook.webhookId - The id of the webhook to be returned.IllegalArgumentException - if spaceId is null.IllegalArgumentException - if webhookId is null.public CMAWebhook update(CMAWebhook webhook)
This will take the webhooks id and update it on the backend.
webhook - The webhook retrieved beforehand to be changed.IllegalArgumentException - if webhook is null.IllegalArgumentException - if webhookId is null.IllegalArgumentException - if spaceId is null.IllegalArgumentException - if version is null.public CMAArray<CMAWebhookCall> calls(CMAWebhook webhook)
public CMAArray<CMAWebhookCall> calls(CMAWebhook webhook, Map<String,String> query)
webhook - webhook to be asked for more detail.IllegalArgumentException - if spaceId is null.IllegalArgumentException - if webhook is null.CMAWebhookCallpublic CMAWebhookCallDetail callDetails(CMAWebhookCall call)
call - A call to be get more information about.IllegalArgumentException - if spaceId is null.IllegalArgumentException - if webhook is null.IllegalArgumentException - if callId is null.public CMAWebhookHealth health(CMAWebhook webhook)
webhook - Which webhook should be asked for its health?IllegalArgumentException - if spaceId is null.IllegalArgumentException - if webhook is null.Copyright © 2026 Contentful, GmbH.. All rights reserved.