create_event_subscription {EDIutils} | R Documentation |
Create event subscription
Description
Create event subscription
Usage
create_event_subscription(packageId, url, env = "production")
Arguments
packageId |
(character) Data package identifier |
url |
(character) Where the event notification will be sent |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
Value
(numeric) Event subscription identifier
Note
User authentication is required (see login()
)
The url
must have "http" as its scheme and must be able to receive
POST requests with MIME type text/plain. Additionally, because the
url
will be passed in an XML body, some characters must be escaped,
such as ampersands from & to &.
See Also
Other Event Notifications:
delete_event_subscription()
,
execute_event_subscription()
,
get_event_subscription_schema()
,
get_event_subscription()
,
query_event_subscriptions()
Examples
## Not run:
login()
# Create subscription
subscriptionId <- create_event_subscription(
packageId = "knb-lter-vcr.340.1",
url = "https://my.webserver.org/",
env = "staging"
)
subscriptionId
#> [1] 48
# Execute subscription
execute_event_subscription(subscriptionId, env = "staging")
#> [1] TRUE
# Delete subscription
delete_event_subscription(subscriptionId, env = "staging")
#> [1] TRUE
logout()
## End(Not run)
[Package EDIutils version 1.0.3 Index]