Create Scheduled Task

Create a scheduled task to modify the bandwidth of an ELINE. The ELINE service UUID and endpoint UUIDs must be from an already existing service. The creation task must contain two subTasks. The first subTask is the modification that is to be applied to the service at the specified time. The second subTask is the modfication required to revert the service to it's original state. The URI in both subTasks is the API for ELINE modifcation. This URI should be modified to match the correct NSP server. Use the taskId returned as part of this request to retrieve the results of the task being executed.

POST https://<NSP Server>:8543/task-scheduler/api/v1/tasks

Request:

{
  "data": {
    "taskName": "Task",
    "subTasks": [
      {
        "interval": 0,
        "intervalTimeUnit": "MINUTES",
        "startDate": "2017-09-27",
        "startTime": "01:00:30.916",
        "name": "Bandwidth modification started",
        "taskRoleName": "BW Modification On",
        "method": "POST",
        "repeats": false,
        "payload": {
          "data": {
            "readOnly": false,
            "endpoints": [
              {
                "id": "2182-e4e12d40-47ac-4fee-9a9c-8836152b01b6",
                "outerTag": 77,
                "innerTag": -1,
                "siteServiceQosProfile": {
                  "qosProfile": 0,
                  "ingressOverrideQueues": [
                    {
                      "cir": 20000,
                      "pir": 20000,
                      "cbs": -2,
                      "mbs": -2,
                      "id": 1
                    }
                  ],
                  "egressOverrideQueues": [
                    {
                      "cir": -2,
                      "pir": -2,
                      "cbs": -2,
                      "mbs": -2,
                      "id": 1
                    }
                  ]
                }
              },
              {
                "id": "2685-a7665170-d578-4d92-9880-17d15c788ffa",
                "outerTag": 77,
                "innerTag": -1,
                "siteServiceQosProfile": {
                  "qosProfile": 0,
                  "ingressOverrideQueues": [
                    {
                      "cir": 20000,
                      "pir": 20000,
                      "cbs": -2,
                      "mbs": -2,
                      "id": 1
                    }
                  ],
                  "egressOverrideQueues": [
                    {
                      "cir": -2,
                      "pir": -2,
                      "cbs": -2,
                      "mbs": -2,
                      "id": 1
                    }
                  ]
                }
              }
            ],
            "serviceId": "4052-c8d6854f-e8b7-4f91-b086-c47c60f27f04",
            "name": "ELINETEST",
            "appId": null,
            "action": "UPDATE",
            "tenantId": "0",
            "bidirectional": "SYMMETRIC_LOOSE",
            "maxCost": 0,
            "maxLatency": 0,
            "maxHops": 0,
            "objective": "HOPS",
            "monitorBandwidth": false
          }
        },
        "uri": "https://135.121.156.109:8543/sdn/api/v4/services/elines",
        "recurrenceInfo": {
          "recurrenceType": "NEVER",
          "recurEvery": 0,
          "startDate": "2017-09-27",
          "endDate": null,
          "expiresOnType": "NO_END_DATE",
          "endAfterOccurrence": 0
        }
      },
      {
        "interval": 0,
        "intervalTimeUnit": "MINUTES",
        "startDate": "2017-09-27",
        "startTime": "02:00:30.927",
        "name": "Bandwidth modification stopped",
        "taskRoleName": "BW Modification Off",
        "method": "POST",
        "repeats": false,
        "payload": {
          "data": {
            "readOnly": false,
            "endpoints": [
              {
                "id": "2182-e4e12d40-47ac-4fee-9a9c-8836152b01b6",
                "outerTag": 77,
                "innerTag": -1,
                "siteServiceQosProfile": {
                  "egressOverrideQueues": null,
                  "egressParam": null,
                  "ingressOverrideQueues": [
                    {
                      "cbs": 2,
                      "cir": 10000,
                      "id": 1,
                      "mbs": 2,
                      "pir": 10000,
                      "queueType": "Queue",
                      "rateType": "kbps"
                    }
                  ],
                  "ingressParam": null,
                  "qosProfile": 0
                }
              },
              {
                "id": "2685-a7665170-d578-4d92-9880-17d15c788ffa",
                "outerTag": 77,
                "innerTag": -1,
                "siteServiceQosProfile": {
                  "egressOverrideQueues": null,
                  "egressParam": null,
                  "ingressOverrideQueues": [
                    {
                      "cbs": 2,
                      "cir": 10000,
                      "id": 1,
                      "mbs": 2,
                      "pir": 10000,
                      "queueType": "Queue",
                      "rateType": "kbps"
                    }
                  ],
                  "ingressParam": null,
                  "qosProfile": 0
                }
              }
            ],
            "serviceId": "4052-c8d6854f-e8b7-4f91-b086-c47c60f27f04",
            "name": "ELINETEST",
            "appId": null,
            "tenantId": "0",
            "action": "UPDATE",
            "bidirectional": "SYMMETRIC_LOOSE",
            "maxCost": 0,
            "maxLatency": 0,
            "maxHops": 0,
            "objective": "HOPS",
            "monitorBandwidth": false
          }
        },
        "uri": "https://135.121.156.109:8543/sdn/api/v4/services/elines",
        "recurrenceInfo": {
          "recurrenceType": "NEVER",
          "recurEvery": 0,
          "startDate": "2017-09-27",
          "endDate": null,
          "expiresOnType": "NO_END_DATE",
          "endAfterOccurrence": 0
        }
      }
    ]
  }
}

Response:

{
  "status": 0,
  "startRow": 0,
  "endRow": 0,
  "totalRows": 0,
  "data": {
    "version": 2,
    "creator": null,
    "lastUpdate": "Wed Sep 27 01:00:03 EDT 2017",
    "timeStamp": 1506488403340,
    "id": 3,
    "taskId": "b03fe69f-15c8-4154-8ec5-1d11078a6c5b",
    "taskName": "Task",
    "taskStatus": "SCHEDULED",
    "executionStatus": "NOT_EXECUTED",
    "appId": null,
    "runningSubtaskId": 0,
    "subtaskList": [
      {
        "id": 1,
        "name": "Bandwidth modification started",
        "operationRole": "BW Modification On",
        "executionDate": "2017-09-27",
        "executionTime": "01:00:30.916",
        "executionStatus": "NOT_EXECUTED",
        "recurrenceInfo": {
          "recurrenceType": "NEVER",
          "recurEvery": 0,
          "startDate": "2017-09-27",
          "endDate": null,
          "expiresOnType": "NO_END_DATE",
          "endAfterOccurrence": 0,
          "daysOfWeek": null,
          "dayOfMonth": null
        },
        "method": "POST",
        "uri": "https://135.121.156.109:8543/sdn/api/v4/services/elines",
        "payload": {
          "data": {
            "readOnly": false,
            "endpoints": [
              {
                "id": "2182-e4e12d40-47ac-4fee-9a9c-8836152b01b6",
                "outerTag": 77,
                "innerTag": -1,
                "siteServiceQosProfile": {
                  "qosProfile": 0,
                  "ingressOverrideQueues": [
                    {
                      "cir": 20000,
                      "pir": 20000,
                      "cbs": -2,
                      "mbs": -2,
                      "id": 1
                    }
                  ],
                  "egressOverrideQueues": [
                    {
                      "cir": -2,
                      "pir": -2,
                      "cbs": -2,
                      "mbs": -2,
                      "id": 1
                    }
                  ]
                }
              },
              {
                "id": "2685-a7665170-d578-4d92-9880-17d15c788ffa",
                "outerTag": 77,
                "innerTag": -1,
                "siteServiceQosProfile": {
                  "qosProfile": 0,
                  "ingressOverrideQueues": [
                    {
                      "cir": 20000,
                      "pir": 20000,
                      "cbs": -2,
                      "mbs": -2,
                      "id": 1
                    }
                  ],
                  "egressOverrideQueues": [
                    {
                      "cir": -2,
                      "pir": -2,
                      "cbs": -2,
                      "mbs": -2,
                      "id": 1
                    }
                  ]
                }
              }
            ],
            "serviceId": "4052-c8d6854f-e8b7-4f91-b086-c47c60f27f04",
            "name": "ELINETEST",
            "appId": null,
            "action": "UPDATE",
            "tenantId": "0",
            "bidirectional": "SYMMETRIC_LOOSE",
            "maxCost": 0,
            "maxLatency": 0,
            "maxHops": 0,
            "objective": "HOPS",
            "monitorBandwidth": false
          }
        }
      },
      {
        "id": 2,
        "name": "Bandwidth modification stopped",
        "operationRole": "BW Modification Off",
        "executionDate": "2017-09-27",
        "executionTime": "02:00:30.927",
        "executionStatus": "NOT_EXECUTED",
        "recurrenceInfo": {
          "recurrenceType": "NEVER",
          "recurEvery": 0,
          "startDate": "2017-09-27",
          "endDate": null,
          "expiresOnType": "NO_END_DATE",
          "endAfterOccurrence": 0,
          "daysOfWeek": null,
          "dayOfMonth": null
        },
        "method": "POST",
        "uri": "https://135.121.156.109:8543/sdn/api/v4/services/elines",
        "payload": {
          "data": {
            "readOnly": false,
            "endpoints": [
              {
                "id": "2182-e4e12d40-47ac-4fee-9a9c-8836152b01b6",
                "outerTag": 77,
                "innerTag": -1,
                "siteServiceQosProfile": {
                  "egressOverrideQueues": null,
                  "egressParam": null,
                  "ingressOverrideQueues": [
                    {
                      "cbs": 2,
                      "cir": 10000,
                      "id": 1,
                      "mbs": 2,
                      "pir": 10000,
                      "queueType": "Queue",
                      "rateType": "kbps"
                    }
                  ],
                  "ingressParam": null,
                  "qosProfile": 0
                }
              },
              {
                "id": "2685-a7665170-d578-4d92-9880-17d15c788ffa",
                "outerTag": 77,
                "innerTag": -1,
                "siteServiceQosProfile": {
                  "egressOverrideQueues": null,
                  "egressParam": null,
                  "ingressOverrideQueues": [
                    {
                      "cbs": 2,
                      "cir": 10000,
                      "id": 1,
                      "mbs": 2,
                      "pir": 10000,
                      "queueType": "Queue",
                      "rateType": "kbps"
                    }
                  ],
                  "ingressParam": null,
                  "qosProfile": 0
                }
              }
            ],
            "serviceId": "4052-c8d6854f-e8b7-4f91-b086-c47c60f27f04",
            "name": "ELINETEST",
            "appId": null,
            "tenantId": "0",
            "action": "UPDATE",
            "bidirectional": "SYMMETRIC_LOOSE",
            "maxCost": 0,
            "maxLatency": 0,
            "maxHops": 0,
            "objective": "HOPS",
            "monitorBandwidth": false
          }
        }
      }
    ]
  }
}