This endpoint is used to import a file into the schedule that has already been uploaded using the files endpoints.
Request parameters
The unique identifier of the Schedule.
Request headers
OAuth access token with itwin-platform scope
Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.
Entity to post for Microsoft Project import.
Request body
Microsoft Project Import Request
Unique identifier of the file being uploaded.
Path of the file being uploaded.
The unique identifier of the Synchronizer.
Example
{ "fileId": "50fc7599-ccb8-4a6e-84fd-c7efb7fdba77", "filePath": "/required/custom/path", "options": { "importActivityCodeAssignments": true, "importActivityCodes": true, "importCalendars": true, "importCosts": true, "importLinks": true, "importResourceAssignments": true, "importResourceCodeAssignments": true, "importResourceCodes": true, "importResources": true, "importTaskConstraints": true, "importTasks": true, "importUserFieldValues": true, "importUserFields": true } }
Response 202 Accepted
This response indicates that the requested long-running operation was Accepted.
{ "operation": { "id": "1604789f-68c4-46ba-b20d-8a19f8319362" }, "synchronizer": { "id": "ae73d684-2878-424e-bab2-025eafbf766b" }, "_links": { "operationLocation": { "href": "https://api.bentley.com/schedules/5e11b21e-cba2-48a8-a2c1-2977d2d373e0/operations/1604789f-68c4-46ba-b20d-8a19f8319362" } } }
Response 400 Bad Request
The 400 (Bad Request) status code indicates that the request cannot be processed by the server due to a client error (e.g. malformed request syntax)
{ "error": { "code": "InvalidSchedulesRequest", "details": [{ "code": "InvalidValue", "message": "Provided 'fileId' value is not valid. Requested File is not available.", "target": "fileId" }], "message": "The request contains invalid properties." } }
Response 401 Unauthorized
This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.
{ "error": { "code": "HeaderNotFound", "message": "Header Authorization was not found in the request. Access denied." } }
Response 403 Forbidden
User is not authorized to import a file.
{ "error": { "code": "InsufficientPermissions", "message": "The user has insufficient permissions for the requested operation." } }
Response 404 Not Found
This response indicates that the provided Schedule is not available.
{ "error": { "code": "ScheduleNotFound", "message": "Requested Schedule is not available.", "target": "scheduleId" } }
Response 415 Unsupported Media Type
This response indicates that the provided file is not supported.
{ "error": { "code": "UnsupportedMediaType", "message": "Media Type is not supported." } }
Response 429 Too many requests
This response indicates that the client sent more requests than allowed by this API for the current tier of the client.
{ "error": { "code": "RateLimitExceeded", "message": "The client sent more requests than allowed by this API for the current tier of the client." } }
Response headers
Number of seconds to wait until client is allowed to make more requests.
Synchronizer Create Response
Contains properties of the created long-running operation, and a link to this operation.
Contains properties of the created long-running operation.
Contains the hyperlink to the Operations endpoint to check the operation information.
{ "title": "Synchronizer Create Response", "type": "object", "properties": { "operation": { "$ref": "#/components/schemas/OperationCreateResponseProperties", "description": "Contains properties of the created long-running operation.", "nullable": true }, "synchronizer": { "$ref": "#/components/schemas/SynchronizerCreateResponseProperties", "description": "Properties of the Synchronizer to be created." }, "_links": { "$ref": "#/components/schemas/OperationLocationLink", "description": "Contains the hyperlink to the Operations endpoint to check the operation information.", "nullable": true } }, "additionalProperties": false, "description": "Contains properties of the created long-running operation, and a link to this operation.", "x-codegen-extends-class": "OperationCreateResponse" }
Synchronizer Create Response Properties
Contains properties of the Synchronizer that is queued for creation.
The unique identifier of the Synchronizer.
{ "title": "Synchronizer Create Response Properties", "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the Synchronizer." } }, "additionalProperties": false, "description": "Contains properties of the Synchronizer that is queued for creation." }
Link
Hyperlink container.
Hyperlink to the specific entity.
{ "type": "object", "properties": { "href": { "type": "string", "description": "Hyperlink to the specific entity." } }, "additionalProperties": false, "description": "Hyperlink container." }
Microsoft Project Import Options
Import options for Microsoft Project files.
Boolean value, specifying whether Activity Code Assignments should be imported.
Boolean value, specifying whether Activity Codes should be imported.
Boolean value, specifying whether Calendars should be imported.
Boolean value, specifying whether Costs should be imported.
Boolean value, specifying whether Links should be imported.
Boolean value, specifying whether Resource Assignments should be imported.
Boolean value, specifying whether Resource Code Assignments should be imported.
Boolean value, specifying whether Resource Codes should be imported.
Boolean value, specifying whether Resources should be imported.
Boolean value, specifying whether Task Constraints should be imported.
Boolean value, specifying whether Tasks should be imported.
Boolean value, specifying whether User Field Values should be imported.
Boolean value, specifying whether User Fields should be imported.
{ "title": "Microsoft Project Import Options", "type": "object", "properties": { "importActivityCodeAssignments": { "type": "boolean", "description": "Boolean value, specifying whether Activity Code Assignments should be imported.", "nullable": true }, "importActivityCodes": { "type": "boolean", "description": "Boolean value, specifying whether Activity Codes should be imported.", "nullable": true }, "importCalendars": { "type": "boolean", "description": "Boolean value, specifying whether Calendars should be imported.", "nullable": true }, "importCosts": { "type": "boolean", "description": "Boolean value, specifying whether Costs should be imported.", "nullable": true }, "importLinks": { "type": "boolean", "description": "Boolean value, specifying whether Links should be imported.", "nullable": true }, "importResourceAssignments": { "type": "boolean", "description": "Boolean value, specifying whether Resource Assignments should be imported.", "nullable": true }, "importResourceCodeAssignments": { "type": "boolean", "description": "Boolean value, specifying whether Resource Code Assignments should be imported.", "nullable": true }, "importResourceCodes": { "type": "boolean", "description": "Boolean value, specifying whether Resource Codes should be imported.", "nullable": true }, "importResources": { "type": "boolean", "description": "Boolean value, specifying whether Resources should be imported.", "nullable": true }, "importTaskConstraints": { "type": "boolean", "description": "Boolean value, specifying whether Task Constraints should be imported.", "nullable": true }, "importTasks": { "type": "boolean", "description": "Boolean value, specifying whether Tasks should be imported.", "nullable": true }, "importUserFieldValues": { "type": "boolean", "description": "Boolean value, specifying whether User Field Values should be imported.", "nullable": true }, "importUserFields": { "type": "boolean", "description": "Boolean value, specifying whether User Fields should be imported.", "nullable": true } }, "additionalProperties": false, "description": "Import options for Microsoft Project files." }
Microsoft Project Import Request
Properties used in Microsoft Project import.
Unique identifier of the file being uploaded.
Path of the file being uploaded.
The unique identifier of the Synchronizer.
{ "title": "Microsoft Project Import Request", "type": "object", "properties": { "fileId": { "type": "string", "description": "Unique identifier of the file being uploaded." }, "filePath": { "type": "string", "description": "Path of the file being uploaded." }, "options": { "$ref": "#/components/schemas/MicrosoftProjectImportOptions", "description": "Import options." }, "synchronizerId": { "type": "string", "description": "The unique identifier of the Synchronizer.", "nullable": true } }, "additionalProperties": false, "description": "Properties used in Microsoft Project import." }
Operation Create Response Properties
Contains the id of the created long-running operation.
The unique identifier of the Operation.
{ "title": "Operation Create Response Properties", "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the Operation.", "nullable": true } }, "additionalProperties": false, "description": "Contains the id of the created long-running operation." }
Operation Location
Contains the URL to the Operations endpoint to check the information about a long-running operation.
{ "title": "Operation Location", "type": "object", "properties": { "operationLocation": { "$ref": "#/components/schemas/Link", "description": "URL to the Operations endpoint with pre-entered Operation ID." } }, "additionalProperties": false, "description": "Contains the URL to the Operations endpoint to check the information about a long-running operation." }
DetailedError
Contains error information and an array of more specific errors.
One of a server-defined set of error codes.
A human-readable representation of the error.
The target of the error.
{ "type": "object", "description": "Contains error information and an array of more specific errors.", "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "message": { "type": "string", "description": "A human-readable representation of the error." }, "target": { "type": "string", "description": "The target of the error.", "nullable": true }, "details": { "type": "array", "description": "Optional array of more specific errors.", "items": { "$ref": "#/components/schemas/Error" } } }, "required": [ "code", "message", "details" ], "additionalProperties": true }
Detailed Error Response
Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.
{ "type": "object", "title": "Detailed Error Response", "description": "Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.", "properties": { "error": { "description": "Error Detailed information.", "$ref": "#/components/schemas/DetailedError" } }, "required": [ "error" ], "additionalProperties": false }
Error
Contains error information.
One of a server-defined set of error codes.
A human-readable representation of the error.
The target of the error.
{ "type": "object", "description": "Contains error information.", "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "message": { "type": "string", "description": "A human-readable representation of the error." }, "target": { "type": "string", "description": "The target of the error.", "nullable": true } }, "required": [ "code", "message" ], "additionalProperties": true }
Error Response
Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.
{ "type": "object", "title": "Error Response", "description": "Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.", "properties": { "error": { "description": "Error information.", "$ref": "#/components/schemas/Error" } }, "required": [ "error" ], "additionalProperties": false }
Was this page helpful?