Create new trigger with a specific id.
|
Automatic Naming While it is possible to assign a name manually, we suggest to let the name get assigned automatically, as described at Create a new trigger with automatic naming |
URL
https://my.<region>.fredhopperservices.com/{sin}/trigger/{tn}/{id}
Formats
text/plain
HTTP Method(s)
PUT
Requires Authentication
Yes
Parameters
| Parameter | Required | Description |
|---|---|---|
| {sin} | Yes | Name of the service instance, for example fas:live1 or fas:test1. |
| {tn} | Yes | Name of the trigger, for example load-data |
| {id} | Yes | ID of the trigger |
|
Trigger ID Requirements The trigger id MUST match the regular expression -_A-Za-z0-9+, in other words it must be a non-empty string of alphanumerical characters. The only special characters allowed are '-' (a dash) and '_' (an underscore). The trigger id is handled case-sensitive, i.e 'trigger1' and 'Trigger1' are distinct trigger ids. The trigger id MUST be unique, it is not possible to reuse ids. |
Response
HTTP "201 Created" response with empty body. The response contains a Location that points to the place where the trigger execution can be monitored. The location includes the selected trigger id.
Usage example
The following uses curl to create a trigger 'load-data' for the data id '2010-10-01_15-15-53' to the service instance 'fas:live1' in the 'eu1' region.
The command shows the headers returned by the server (-D - parameters) for illustration purposes as well.
Request:
$ curl -D - -u user:password -X PUT -H "Content-Type: text/plain" --data-binary "data-id=2010-10-01_15-15-53" https://my.eu1.fredhopperservices.com/fas:live1/trigger/load-data/2011-02-09_21-28-10 HTTP/1.1 201 Created Location: https://my.eu1.fredhopperservices.com/fas:live1/trigger/load-data/2011-02-09_21-28-10 Content-Length: 0 Server: Jetty(7.2.2.v20101205)
The trigger id in this example is '2011-02-09_21-28-10', and execution status can be monitored in https://my.eu1.fredhopperservices.com/fas:live1/trigger/load-data/2011-02-09_21-28-10/status.
Comments
0 comments
Please sign in to leave a comment.