Saltar al contenido principal
POST
/
v1
/
maintenance
/
preventiveSchedules
Create a preventive maintenance schedule
curl --request POST \
  --url https://api.bold-factory.com/v1/maintenance/preventiveSchedules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "workOrderTemplate": {
    "assetReference": "<string>",
    "causeReference": "<string>",
    "auxiliaryCauseReferences": [
      "<string>"
    ],
    "notes": "<string>"
  },
  "trigger": {
    "kind": "Periodic",
    "periodic": {
      "interval": 123,
      "timezone": "<string>",
      "times": [
        "<string>"
      ],
      "daysOfWeek": [],
      "daysOfMonth": [
        123
      ],
      "lastDayOfMonth": true,
      "monthlyPattern": {},
      "between": {
        "start": "<string>",
        "end": "<string>"
      },
      "startDate": "2023-12-25",
      "endDate": "2023-12-25",
      "skipDates": [
        "2023-12-25"
      ]
    }
  }
}
'
{
  "id": "<string>",
  "name": "<string>",
  "workOrderTemplate": {
    "assetId": "<string>",
    "causeId": "<string>",
    "auxiliaryCauseIds": [
      "<string>"
    ],
    "notes": "<string>"
  },
  "trigger": {
    "kind": "Periodic",
    "periodic": {
      "interval": 123,
      "timezone": "<string>",
      "times": [
        "<string>"
      ],
      "daysOfWeek": [],
      "daysOfMonth": [
        123
      ],
      "lastDayOfMonth": true,
      "monthlyPattern": {},
      "between": {
        "start": "<string>",
        "end": "<string>"
      },
      "startDate": "2023-12-25",
      "endDate": "2023-12-25",
      "skipDates": [
        "2023-12-25"
      ]
    }
  },
  "enabled": true,
  "nextRunAt": "2023-11-07T05:31:56Z",
  "lastRunAt": "2023-11-07T05:31:56Z",
  "runCount": 123,
  "skippedCount": 123,
  "createdAt": "2023-11-07T05:31:56Z",
  "createdBy": "<string>",
  "lastModifiedAt": "2023-11-07T05:31:56Z",
  "lastModifiedBy": "<string>"
}

Autorizaciones

Authorization
string
header
requerido

Use a valid JWT token in the Authorization header with the format 'Bearer {token}'

Cuerpo

application/json
name
string
requerido
workOrderTemplate
object
requerido
trigger
object
requerido
generationPolicy
enum<string>
requerido
Opciones disponibles:
AllowEachOccurrence,
SkipWhileOpen

Respuesta

Created

id
string
requerido
name
string
requerido
workOrderTemplate
object
requerido
trigger
object
requerido
generationPolicy
enum<string>
requerido
Opciones disponibles:
AllowEachOccurrence,
SkipWhileOpen
enabled
boolean
requerido
nextRunAt
null | string<date-time>
requerido
lastRunAt
null | string<date-time>
requerido
runCount
integer<int32>
requerido
skippedCount
integer<int32>
requerido
createdAt
string<date-time>
requerido
createdBy
string
requerido
lastModifiedAt
string<date-time>
requerido
lastModifiedBy
string
requerido