Package org.azd.servicehooks
Class ServiceHooksApi
- All Implemented Interfaces:
ServiceHooksDetails
Service Hooks Api to manage service hooks service
-
Constructor Summary
ConstructorsConstructorDescriptionServiceHooksApi
(Connection connection) Pass the connection object to work with Service hooks Api -
Method Summary
Modifier and TypeMethodDescriptioncreateSubscription
(ServiceHooks serviceHooks) Create a subscription.deleteSubscription
(String subscriptionId) Delete a specific service hooks subscription.getSubscription
(String subscriptionId) Get a specific service hooks subscription.Get a list of subscriptions.getSubscriptions
(String consumerActionId, String consumerId, String eventType, String publisherId) Get a list of subscriptions.Methods inherited from class org.azd.utils.AzDAsyncApi
createAsync
-
Constructor Details
-
ServiceHooksApi
Pass the connection object to work with Service hooks Api- Parameters:
connection
- Connection object
-
-
Method Details
-
getSubscription
Get a specific service hooks subscription.- Specified by:
getSubscription
in interfaceServiceHooksDetails
- Parameters:
subscriptionId
- ID for a subscription.- Returns:
- ServiceHooksSubscription
ServiceHooksSubscription
- Throws:
AzDException
- Default Api Exception handler.
-
getSubscriptions
Get a list of subscriptions.- Specified by:
getSubscriptions
in interfaceServiceHooksDetails
- Returns:
- ServiceHooksSubscriptions
ServiceHooksSubscriptions
- Throws:
AzDException
- Default Api Exception handler.
-
getSubscriptions
public ServiceHooksSubscriptions getSubscriptions(String consumerActionId, String consumerId, String eventType, String publisherId) throws AzDException Get a list of subscriptions.- Specified by:
getSubscriptions
in interfaceServiceHooksDetails
- Parameters:
consumerActionId
- ID for a consumerActionId.consumerId
- ID for a consumer.eventType
- The event type to filter on (if any).publisherId
- ID for a subscription.- Returns:
- ServiceHooksSubscriptions
ServiceHooksSubscriptions
- Throws:
AzDException
- Default Api Exception handler.
-
deleteSubscription
Delete a specific service hooks subscription.- Specified by:
deleteSubscription
in interfaceServiceHooksDetails
- Parameters:
subscriptionId
- ID for a subscription.- Throws:
AzDException
- Default Api Exception handler.
-
createSubscription
Create a subscription.- Specified by:
createSubscription
in interfaceServiceHooksDetails
- Parameters:
serviceHooks
- service hooks objectServiceHooks
Reference: https://docs.microsoft.com/en-us/azure/devops/service-hooks/events?view=azure-devops#workitem.created- Returns:
- ServiceHooksSubscription
ServiceHooksSubscription
- Throws:
AzDException
- Default Api Exception handler.
-