createTrigger

Prev Next

Available in VPC

Create a trigger.

Request

This section describes the request format. The method and URI are as follows:

Method URI
POST /api/v1/triggers

Request headers

For information about the headers common to all Data Flow APIs, see Data Flow request headers.

Request body

You can include the following data in the body of your request:

Field Type Required Description
name String Required Job name
  • Enter 3-100 characters by combining English letters, numbers, and special characters "_" and "-".
  • It must start with an English letter or "-".
type String Required Trigger type
  • SCHEDULED | EVENT | NONE
    • SCHEDULED: Run on a cycle or specific date
    • EVENT: Run when a specific event occurs (to be supported).
    • NONE: trigger not set (manual execution)
triggerRule Object Required Trigger execution option
triggerRule.type String Required Trigger execution option type
  • RECURRING | ONE_TIME | NONE
    • RECURRING: Run on a cycle.
    • ONE_TIME: Run on a specific date.
    • NONE: no execution option
triggerRule.interval String Conditional Trigger execution cycle
  • HOUR | DAY | WEEK | MONTH
    • HOUR: every hour
    • DAY: every day
    • WEEK: every week
    • MONTH: every month
  • Required if triggerRule.type is RECURRING
triggerRule.time String Conditional Trigger repeat execution time (minute or time)
  • Required if triggerRule.type is RECURRING
    • Enter the minutes to repeat in if triggerRule.interval is HOUR (00-59).
    • Enter the hours to repeat in if triggerRule.interval is DAY, WEEK, or MONTH.
triggerRule.dayOfWeek[] Array Conditional Trigger repeat execution day of the week
  • MONDAY | TUESDAY | WEDNESDAY | THURSDAY | FRIDAY | SATURDAY | SUNDAY
    • Required if triggerRule.interval is WEEK
triggerRule.dateOfMonth String Conditional Trigger repeat execution date
  • Date between 1 and 31; -1 (last date of every month)
    • Required if triggerRule.interval is MONTH
triggerRule.executionDate String Conditional Trigger execution date and time
  • Required if triggerRule.type is ONE_TIME

Request example

The request example is as follows:

curl --location --request POST 'https://dataflow.apigw.ntruss.com/api/v1/triggers' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--data '{
  "name": "trigger001",
  "type": "SCHEDULED",
  "triggerRule": {
    "type": "RECURRING",
    "interval": "DAY",
    "time": "10:00"
  }
}'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
triggerId String - Trigger ID
name String - Trigger name
type String - Trigger execution option type
  • SCHEDULED | NONE
    • SCHEDULED: Run on a cycle or specific date.
    • NONE: no execution option
triggerRule Object - Trigger execution option information
triggerRule.type String - Trigger execution option type
  • RECURRING | ONE_TIME | NONE
    • RECURRING: Run on a cycle.
    • ONE_TIME: Run on a specific date.
    • NONE: no execution option
triggerRule.interval String - Trigger execution cycle
  • HOUR | DAY | WEEK | MONTH
    • HOUR: every hour
    • DAY: every day
    • WEEK: every week
    • MONTH: every month
  • Displayed if triggerRule.type is RECURRING
triggerRule.time String - Trigger repeat execution time (minute or time)
  • Displayed if triggerRule.type is RECURRING
    • Display the minutes to repeat in if triggerRule.interval is HOUR (00-59).
    • Display the time to repeat in if triggerRule.interval is DAY, WEEK, or MONTH.
triggerRule.dayOfWeek[] Array - Trigger repeat execution day of the week
  • MONDAY | TUESDAY | WEDNESDAY | THURSDAY | FRIDAY | SATURDAY | SUNDAY
    • Displayed if triggerRule.interval is WEEK
triggerRule.dateOfMonth String - Trigger repeat execution date
  • Date between 1 and 31; -1 (last date of every month)
    • Displayed if triggerRule.interval is MONTH
triggerRule.executionDate String - Trigger execution date and time
  • Displayed if triggerRule.type is ONE_TIME
createdDate String - Trigger creation date and time
  • ISO 8601 format (including UTC+9)
updatedDate String - Trigger modification date and time
  • ISO 8601 format (including UTC+9)

Response status codes

For response status codes common to all Data Flow APIs, see Data Flow API response status codes.

Response example

The response example is as follows:

{
    "triggerId": "rWOjcW******",
    "name": "trigger1",
    "type": "SCHEDULED",
    "triggerRule": {
        "type": "RECURRING",
        "interval": "DAY",
        "time": "10:00"
    },
    "createdDate": "2025-03-21T15:26:51+09:00",
    "updatedDate": "2025-03-21T15:26:51+09:00"
}