ProRoster - Revert to snapshot

API Url

Use it to revert a snapshot

POST
http://localhost:16010/ProMarkREST/rest/ProRoster/plans/{planId}/snapshots/{snapshotId}

Permissions: user

Path parameters

FieldTypeDescription
planIdNumber

The plan's unique identifier.

snapshotIdNumber

The snapshot's unique identifier.

Query parameters

FieldTypeDescription
empIdString

List of employees

endDate

End date for reverting the snapshot

fromDate

Start date for reverting the snapshot

Parameter

FieldTypeDescription
      ignoreDayProfileoptionalObject[]
        isLockedBoolean

Is the attribute locked.

        valueBoolean

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    assignedDemandsoptionalObject[]

Collection of demands (only when expand=demands).

      acceptBeforeoptionalObject[]
        daysoptionalNumber

Accept days before shift takes place.

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

      approvalGroupoptionalObject[]
        descriptionoptionalString

Description of the approvalGroup.

        idoptionalString

Id of the approvalGroup.

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

      assignmentMethodoptionalObject[]
        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

        methodoptionalString

Assignment methode Automatic = "A" or Manual "M".

      backColorString

BackGround color in HEX without #.

      baseDemandIdNumber

The Id of the base demand from which the demand was created.

      categoryoptionalObject[]
        descriptionoptionalString

Description of the category.

        idoptionalString

Id of the category.

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

      dateDate

The date of the demand .

      dayProfileoptionalObject[]

The day profile object.

        backColoroptionalString

BackGround color.

        descriptionString

Description of the day profile.

        endTimeoptionalNumber

Normal time end of day profile.

        foreColoroptionalString

ForeGround color.

        idoptionalString

Day profile ID.

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

        isVariableBoolean

True if day profile is variable.

        startTimeoptionalNumber

Normal time start of day profile.

      departmentoptionalObject[]
        descriptionoptionalString

Description of the department.

        idoptionalString

Id of the department.

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

      descriptionString

Description of the demand.

      empIdString

The Id of the employee assigned to a demand.

      foreColorString

ForeGround color in HEX without #.

      groupoptionalObject[]
        descriptionoptionalString

Description of the group.

        idoptionalString

Id of the group.

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

      idNumber

The Id of the demand.

      isPublishedBoolean

False = the assigned demand is not published. True = the assigned demand is published.

      isTaskBoolean

True if demand is task, false if not.

      maximumBidsoptionalObject[]
        amountoptionalNumber

Number of employees to bid in.

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

      nameString

The name of the demand .

      normalTimeoptionalObject[]

Normal time interval for variable day profiles.

        endTimeoptionalNumber

End time of the interval in seconds.

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

        startTimeoptionalNumber

Start time of the interval in seconds.

      planIdNumber

The Id of the plan.

      qualificationSetupoptionalObject[]
        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

        qualificationoptionalObject[]
          descriptionoptionalString

Description of the qualification.

          empQualIdoptionalString

Id of the employee qualification.

          idoptionalNumber

Id of the demand qualification.

          orderoptionalNumber

Order of qualifications.

          primaryoptionalBoolean

true = This is a primary qualification.

      requiredEmployeesObject[]
        amountNumber

Number of employees

        isLockedBoolean

Is the attribute locked.

        isRequiredBoolean

Is the attribute required.

      versionNumber

Version number of the demand.

    fromDate

Starting date of the snapshot.

    isPrivateBoolean

If true then the snapshot is private to the user.

    nameString

The name of the snapshot.

    planIdNumber

The id of the plan.

    toDate

Ending date of the snapshot

    userString

The user who created the snapshot.

    versionNumber

The snapshot version.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"data": {
"planId": 2164573937,
"version": 133,
"from": "2020-04-13",
"to": "2020-04-19",
"name": "test",
"user": "test",
"isPrivate": true,
"assignedDemands": [
{
"id": 2164580306,
"empId": "1848",
"date": "2020-04-16",
"baseDemandId": 2163133262,
"demandId": 2164580121,
"planId": 2164573937,
"name": "Casino Host",
"description": "Casino Host",
"foreColor": "FFD500",
"backColor": "678DB6",
"version": 2,
"isPublished": false,
"snapshotVersion": 133,
"dayProfile": [
{
"id": "0600-1430",
"startTime": 21600,
"endTime": 52200,
"description": "Day Mon-Fri 8 hours",
"isVariable": false,
"foreColor": "000000",
"backColor": "FFFF00",
"isRequired": false,
"isLocked": false
}
],
"attendanceTime": [
{
"isRequired": false,
"isLocked": false
}
],
"department": [
{
"description": "",
"isRequired": false,
"isLocked": false,
"isStrict": false
}
],
"group": [
{
"description": "",
"isRequired": false,
"isLocked": false,
"isStrict": false
}
],
"approvalGroup": [
{
"description": "",
"isRequired": false,
"isLocked": false
}
],
"ignoreDayProfile": [
{
"value": false,
"isLocked": false
}
],
"category": [
{
"description": "",
"isRequired": false,
"isLocked": false
}
]
}
],
"planDemands": [
{
"id": 2164580301,
"baseDemandId": 2163133262,
"planId": 2164573937,
"counter": 0,
"date": "2020-04-16",
"name": "Casino Host",
"description": "Casino Host",
"foreColor": "FFD500",
"backColor": "678DB6",
"hoursPerDay": 21600,
"version": 4,
"isPublished": true,
"demandType": 0,
"snapshotVersion": 133,
"dayProfile": [
{
"id": "0600-1430",
"startTime": 21600,
"endTime": 52200,
"description": "Day Mon-Fri 8 hours",
"isVariable": false,
"foreColor": "000000",
"backColor": "FFFF00",
"isRequired": false,
"isLocked": false
}
],
"requiredEmployees": [
{
"amount": 4,
"planningValue": 0,
"usePlanningValue": false,
"isRequired": true,
"isLocked": false
}
],
"attendanceTime": [
{
"isRequired": false,
"isLocked": false
}
],
"department": [
{
"description": "",
"isRequired": false,
"isLocked": false,
"isStrict": false
}
],
"assignmentMethod": [
{
"method": "",
"isRequired": false,
"isLocked": false
}
],
"group": [
{
"description": "",
"isRequired": false,
"isLocked": false,
"isStrict": false
}
],
"approvalGroup": [
{
"description": "",
"isRequired": false,
"isLocked": false
}
],
"maximumBids": [
{
"isRequired": true,
"isLocked": false
}
],
"category": [
{
"description": "",
"isRequired": false,
"isLocked": false
}
],
"ignoreDayProfile": [
{
"value": false,
"isLocked": false
}
],
"acceptBefore": [
{
"isRequired": false,
"isLocked": false
}
],
"qualificationSetup": [
{
"isRequired": false,
"isLocked": false
}
]
}
]
},
"errorCode": 0,
"errorMessage": ""
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.