Create Event Schedule
POSThttps://app.infodeck.io/api/organizations/:organizationId/event-schedules
Create new event rule
Request
Path Parameters
The ID of organization.
- application/json
Body
required
The name of event schedule.
The description of event schedule.
The stage of event schedule.
The target name of event schedule, when stage is edge.
The expression type of event schedule.
The one-time expression of event schedule.
cronExpression object
rateExpression object
The timezone of event schedule.
The start date of event schedule.
The end date of event schedule.
The actions of event schedule.
The hashtags of event rule.
The status of event schedule.
Responses
- 200
- 401
- 403
- 404
- 422
- application/json
- Schema
- Example (from schema)
- Example
Schema
data objectrequired
{
"data": {
"name": "string",
"description": "string",
"stage": "string",
"status": "string",
"targetName": "string",
"expressionType": "string",
"hashtags": [
"string"
],
"cronExpression": {
"atHours": 0,
"atMinutes": 0,
"dayOfMonth": [
0
]
},
"actions": [
{
"type": "string",
"parameters": {
"name": "string",
"assetId": "string",
"confirmed": true,
"fPort": 0,
"payload": "string",
"payloadDataType": "string"
}
}
],
"createdBy": "string",
"createdAtDateString": "string",
"createdAt": 0
}
}
{
"data": {
"name": "IDT-EventSchedule",
"description": "IDT-EventSchedule-Description",
"stage": "EventBridgeScheduler",
"status": "Enabled",
"targetName": "IoTCore-Target-Name",
"expressionType": "cron",
"hashtags": [
"Important"
],
"cronExpression": {
"atHours": 11,
"atMinutes": 47,
"dayOfMonth": [
7
]
},
"actions": [
{
"type": "EnqueueDevice",
"parameters": {
"name": "Power Off",
"assetId": "a-assetId",
"confirmed": true,
"fPort": 85,
"payload": "080000ff",
"payloadDataType": "string"
}
}
],
"createdBy": "d6b0e137-xxxx-xxxx-xxxx-c944cc12a5f4",
"createdAtDateString": "2024-01-01T00:00:00.000Z",
"createdAt": 1704067200000
}
}
The request has not permission.
- application/json
- Schema
- Example (from schema)
- Example
Schema
The request has not permission.
The request has not permission message.
{
"error": "string",
"message": "string"
}
{
"error": "Unauthenticated",
"message": "Authentication is required and has failed or has not yet been provided."
}
The request has not permission.
- application/json
- Schema
- Example (from schema)
- Example
Schema
The request has not permission.
The request has not permission message.
{
"error": "string",
"message": "string"
}
{
"error": "Forbidden",
"message": "Access to the requested resource is forbidden."
}
The resource hasn't found.
- application/json
- Schema
- Example (from schema)
- Example
Schema
The resource hasn't found.
The resource hasn't found message.
{
"error": "string",
"message": "string"
}
{
"error": "ResourceNotFound",
"message": "The requested resource could not be found."
}
The input data has invalid.
- application/json
- Schema
- Example (from schema)
- Example
Schema
The input data has invalid.
The input data has invalid message.
{
"error": "string",
"message": "string"
}
{
"error": "ValidationError",
"message": "Input data validation failed."
}
Authorization: http
name: usertype: httpscheme: bearerbearerFormat: JWTdescription: Get your API token via POST /authentications/tokens
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://app.infodeck.io/api/organizations/:organizationId/event-schedules' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"name": "string",
"description": "string",
"stage": "string",
"targetName": "string",
"expressionType": "string",
"oneTimeExpression": 0,
"cronExpression": {},
"rateExpression": {},
"timezone": 0,
"startDate": 0,
"endDate": 0,
"actions": [
"string"
],
"hashtags": [
"string"
],
"status": "string"
}'