Table of contents
Schedules
Download API definition:
This API is a Technical Preview and is available for testing purposes only. Do not use in production.
POST https://dev-api.bentley.com/schedules/{scheduleId}/imports/primavera/synchronize

This endpoint is used to synchronize a file into the schedule that has already been uploaded using the files endpoints.

Request parameters

Name
Required?
Description
scheduleId
Yes

The unique identifier of the Schedule.

Request headers

Name
Required?
Description
Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.

Entity to post for primavera synchronization.

Request body

Primavera Synchronization Request

Name
Type
Required?
Description
fileId
String
No

Unique identifier of the file being uploaded.

filePath
String
No

Path of the file being uploaded.

options
No

Synchronization options.

projects
No

Information about projects that are present in the Primavera file that should be synchronized.

synchronizerId
String
No

Unique identifier of the Synchronizer to use.

Example

json
{
    "fileId": "ac241ce2-749b-4774-bf67-586c3c16a7be",
    "filePath": "/required/custom/path",
    "options": {
        "constrainExternalDates": true,
        "createProjectNodes": true,
        "syncActivityCodesAssignments": "Skip",
        "syncActivityCodes": "Skip",
        "syncCalendars": "Skip",
        "syncCostAccounts": "Skip",
        "syncCosts": "Skip",
        "syncLinks": "Consolidate",
        "syncNotebooks": "Skip",
        "syncResourceAssignments": "Skip",
        "syncResourceCodeAssignments": "Skip",
        "syncResourceCodes": "Skip",
        "syncResources": "Skip",
        "syncTaskActuals": "Skip",
        "syncTaskConstraints": "Integrate",
        "syncTasks": "Synchronize",
        "syncUserFieldValues": "Skip",
        "syncUserField": "Skip",
        "useActivityIds": false,
        "useWBSCodes": true
    },
    "projects": [{
        "id": "1",
        "name": "Structure Example 2025 - Civil"
    }],
    "synchronizerId": "534dd02a-2a5c-48c9-bf5a-cc8e77a59523"
}

Response 202 Accepted

This response indicates that the requested long-running operation was Accepted.

json
{
    "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)

json
{
    "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.

json
{
    "error": {
        "code": "HeaderNotFound",
        "message": "Header Authorization was not found in the request. Access denied."
    }
}

Response 403 Forbidden

User is not authorized to synchronize a file.

json
{
    "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.

json
{
    "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.

json
{
    "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.

json
{
    "error": {
        "code": "RateLimitExceeded",
        "message": "The client sent more requests than allowed by this API for the current tier of the client."
    }
}

Response headers

Name
Description
retry-after

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.

Name
Type
Description
operation

Contains properties of the created long-running operation.

synchronizer

Properties of the Synchronizer to be created.

_links

Contains the hyperlink to the Operations endpoint to check the operation information.

Synchronizer Create Response Properties

Contains properties of the Synchronizer that is queued for creation.

Name
Type
Description
id
String

The unique identifier of the Synchronizer.

Primavera Project Information

Properties regarding the projects being imported.

Name
Type
Description
id
String

Project id.

name
String

Project name.

userDefinedId
String, null

User defined project id.

Synchronization Option

The option on how to synchronize data. See the Synchronization Options section for details.

Name
Type
Description
Synchronize
String
Consolidate
String
Integrate
String
Skip
String
Unknown
String

Primavera Synchronization Options

Synchronization options for Primavera files.

Name
Type
Description
constrainExternalDates
Boolean, null

Boolean value, specifying whether External Dates should be constrained.

createProjectNodes
Boolean, null

Boolean value, specifying whether Project Nodes should be created.

syncActivityCodes

Synchronization option, specifying how Activity Codes should be synchronized.

syncActivityCodesAssignments

Synchronization option, specifying how Activity Code Assignments should be synchronized.

syncCalendars

Synchronization option, specifying how Calendars should be synchronized.

syncCostAccounts

Synchronization option, specifying how Cost Accounts should be synchronized.

syncCosts

Synchronization option, specifying how Costs should be synchronized.

syncLinks

Synchronization option, specifying how Links should be synchronized.

syncNotebooks

Synchronization option, specifying how Notebooks should be synchronized.

syncResourceAssignments

Synchronization option, specifying how Resource Assignments should be synchronized.

syncResourceCodeAssignments

Synchronization option, specifying how Resource Code Assignments should be synchronized.

syncResourceCodes

Synchronization option, specifying how Resource Codes should be synchronized.

syncResources

Synchronization option, specifying how Resources should be synchronized.

syncTaskActuals

Synchronization option, specifying how Task Actuals should be synchronized.

syncTaskConstraints

Synchronization option, specifying how Task Constraints should be synchronized.

syncTasks

Synchronization option, specifying how Tasks should be synchronized.

syncUserField

Synchronization option, specifying how User Fields should be synchronized.

syncUserFieldValues

Synchronization option, specifying how User Field Values should be synchronized.

useActivityIds
Boolean, null

Boolean value, specifying whether Activity Ids should be used.

useWBSCodes
Boolean, null

Boolean value, specifying whether WBS Codes should be used.

Primavera Synchronization Request

Properties used in Primavera synchronization.

Name
Type
Description
fileId
String

Unique identifier of the file being uploaded.

filePath
String

Path of the file being uploaded.

options

Synchronization options.

projects

Information about projects that are present in the Primavera file that should be synchronized.

synchronizerId
String

Unique identifier of the Synchronizer to use.

Link

Hyperlink container.

Name
Type
Description
href
String

Hyperlink to the specific entity.

Operation Create Response Properties

Contains the id of the created long-running operation.

Name
Type
Description
id
String, null

The unique identifier of the Operation.

Operation Location

Contains the URL to the Operations endpoint to check the information about a long-running operation.

Name
Type
Description
operationLocation

URL to the Operations endpoint with pre-entered Operation ID.

DetailedError

Contains error information and an array of more specific errors.

Name
Type
Description
code
String

One of a server-defined set of error codes.

message
String

A human-readable representation of the error.

target
String, null

The target of the error.

details

Optional array of more specific errors.

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.

Name
Type
Description
error

Error Detailed information.

Error

Contains error information.

Name
Type
Description
code
String

One of a server-defined set of error codes.

message
String

A human-readable representation of the error.

target
String, null

The target of the error.

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.

Name
Type
Description
error

Error information.

Was this page helpful?