Create a batch job instance.

This is for Schedule job failure. This will allow schedule service to save a batch job instance to track the failure.

POST /batch/jobs/instance

Operation id: BatchService_SaveBatchJobInstance

Description

Permission Level: Read-Write

Tags: BatchService

Security

  • Authorization (apiKey)
    • Bearer token

Responses

200 — A successful response.

Content type: application/json

default — An unexpected error response.

Content type: application/json

Request body

Required: Yes

application/json

Schema

PropertyTypeRequiredDescription
tenantIdstringNo
instanceIdstringNo
jobNamestringNo
importTypestringNoThe type of data being imported. - LOCATIONS: The import file is forwarded directly to the zac-server locations API Constraints: - template_name, deviation, and dry_run are all ignored. - zac-server performs an upsert always, any errors in the file will fail the entire file
statusstringNo
errorsarrayNo
startTimestring (date-time)No
endTimestring (date-time)No
fssIdstringNo
recordsProcessedinteger (int32)No
totalErrorsinteger (int32)No
creationTimestring (date-time)No
createdBystringNo
createdinteger (int32)No
updatedinteger (int32)No
deletedinteger (int32)No
{
  "type": "object",
  "properties": {
    "tenantId": {
      "type": "string"
    },
    "instanceId": {
      "type": "string"
    },
    "jobName": {
      "type": "string"
    },
    "importType": {
      "type": "string",
      "description": "The type of data being imported.\n\n - LOCATIONS: The import file is forwarded directly to the zac-server locations API\nConstraints:\n  - template_name, deviation, and dry_run are all ignored.\n  - zac-server performs an upsert always, any errors in the file will fail the entire file",
      "enum": [
        "USERS",
        "ROLES",
        "WORKSPACES",
        "SITES",
        "DEPARTMENTS",
        "HIERARCHIES",
        "SITE_TEMPLATES",
        "PERMISSION_TEMPLATES",
        "GROUPS",
        "LOCATIONS"
      ],
      "default": "USERS"
    },
    "status": {
      "type": "string",
      "enum": [
        "UNKNOWN_STATUS",
        "PENDING",
        "IN_PROGRESS",
        "SUCCEEDED",
        "SUCCEEDED_WITH_ERRORS",
        "FAILED"
      ],
      "default": "UNKNOWN_STATUS"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "columnNumber": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          }
        }
      }
    },
    "startTime": {
      "type": "string",
      "format": "date-time"
    },
    "endTime": {
      "type": "string",
      "format": "date-time"
    },
    "fssId": {
      "type": "string"
    },
    "recordsProcessed": {
      "type": "integer",
      "format": "int32"
    },
    "totalErrors": {
      "type": "integer",
      "format": "int32"
    },
    "creationTime": {
      "type": "string",
      "format": "date-time"
    },
    "createdBy": {
      "type": "string"
    },
    "created": {
      "type": "integer",
      "format": "int32"
    },
    "updated": {
      "type": "integer",
      "format": "int32"
    },
    "deleted": {
      "type": "integer",
      "format": "int32"
    }
  }
}

Response models

200 — A successful response.

Content type: application/json

Schema

PropertyTypeRequiredDescription
tenantIdstringNo
instanceIdstringNo
jobNamestringNo
importTypestringNoThe type of data being imported. - LOCATIONS: The import file is forwarded directly to the zac-server locations API Constraints: - template_name, deviation, and dry_run are all ignored. - zac-server performs an upsert always, any errors in the file will fail the entire file
statusstringNo
errorsarrayNo
startTimestring (date-time)No
endTimestring (date-time)No
fssIdstringNo
recordsProcessedinteger (int32)No
totalErrorsinteger (int32)No
creationTimestring (date-time)No
createdBystringNo
createdinteger (int32)No
updatedinteger (int32)No
deletedinteger (int32)No
{
  "type": "object",
  "properties": {
    "tenantId": {
      "type": "string"
    },
    "instanceId": {
      "type": "string"
    },
    "jobName": {
      "type": "string"
    },
    "importType": {
      "type": "string",
      "description": "The type of data being imported.\n\n - LOCATIONS: The import file is forwarded directly to the zac-server locations API\nConstraints:\n  - template_name, deviation, and dry_run are all ignored.\n  - zac-server performs an upsert always, any errors in the file will fail the entire file",
      "enum": [
        "USERS",
        "ROLES",
        "WORKSPACES",
        "SITES",
        "DEPARTMENTS",
        "HIERARCHIES",
        "SITE_TEMPLATES",
        "PERMISSION_TEMPLATES",
        "GROUPS",
        "LOCATIONS"
      ],
      "default": "USERS"
    },
    "status": {
      "type": "string",
      "enum": [
        "UNKNOWN_STATUS",
        "PENDING",
        "IN_PROGRESS",
        "SUCCEEDED",
        "SUCCEEDED_WITH_ERRORS",
        "FAILED"
      ],
      "default": "UNKNOWN_STATUS"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "columnNumber": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          }
        }
      }
    },
    "startTime": {
      "type": "string",
      "format": "date-time"
    },
    "endTime": {
      "type": "string",
      "format": "date-time"
    },
    "fssId": {
      "type": "string"
    },
    "recordsProcessed": {
      "type": "integer",
      "format": "int32"
    },
    "totalErrors": {
      "type": "integer",
      "format": "int32"
    },
    "creationTime": {
      "type": "string",
      "format": "date-time"
    },
    "createdBy": {
      "type": "string"
    },
    "created": {
      "type": "integer",
      "format": "int32"
    },
    "updated": {
      "type": "integer",
      "format": "int32"
    },
    "deleted": {
      "type": "integer",
      "format": "int32"
    }
  }
}

default — An unexpected error response.

Content type: application/json

Schema

PropertyTypeRequiredDescription
codeinteger (int32)No
messagestringNo
detailsarrayNo
{
  "type": "object",
  "properties": {
    "code": {
      "type": "integer",
      "format": "int32"
    },
    "message": {
      "type": "string"
    },
    "details": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "@type": {
            "type": "string"
          }
        }
      }
    }
  }
}