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/

Creates a Schedule.

The isNextGen value should always be true as v6.5 schedule creation is currently not supported.

V10 Endpoint

This endpoint is only supported by v10 schedules. The schedule type can be identified by querying the /schedules/{scheduleId} endpoint.

Authentication

Requires Authorization header with valid Bearer token for scope itwin-platform.

For more documentation on authorization and how to get access token visit OAUTH2 Authorization page.

Rate limits

All iTwin Platform API operations have a rate limit. For more documentation on that visit Rate limits and quotas page.

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.

Request body

Schedule Create Request

Name
Type
Required?
Description
iModelId
String, null
No

The unique identifier of the iModel linked to the Schedule.

iTwinId
String
No

The unique identifier of the iTwin.

name
String
No

The name of the Schedule.

Example

json
{
    "iModelId": "047d77dd-e593-4099-9c5d-e5d6467336a4",
    "iTwinId": "bfe4d22d-027c-45d4-b3cc-50ecfa4b1bd7",
    "name": "My Schedule"
}

Response 201 Created

Created

json
{
    "schedule": {
        "iModelId": "047d77dd-e593-4099-9c5d-e5d6467336a4",
        "iTwinId": "bfe4d22d-027c-45d4-b3cc-50ecfa4b1bd7",
        "id": "a8ec5a39-595d-45dc-abf4-e6dc4e1ed707",
        "isNextGen": true,
        "name": "My Schedule",
        "type": "v10"
    }
}

Response headers

Name
Description
Location

A header that identifies the location of a specific resource. For more information see the official documentation.

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": "MissingRequiredProperty",
                "message": "A required property is missing or empty.",
                "target": "name"
            },
            {
                "code": "InvalidValue",
                "message": "Provided 'iTwinId' value is not valid. Requested iTwin is not available.",
                "target": "iTwinId"
            }
        ],
        "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 create a Schedule.

json
{
    "error": {
        "code": "InsufficientPermissions",
        "message": "The user has insufficient permissions for the requested operation."
    }
}

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.

Schedule

Representation of a Schedule

Name
Type
Description
iModelId
String, null

The unique identifier of the iModel.

iTwinId
String

The unique identifier of the iTwin.

id
String

The unique identifier of the Schedule.

isNextGen
Boolean

Specifies whether the schedule is of v10 type.

name
String

The name of the Schedule.

type

The type of the Schedule.

Schedule Create Request

Properties of the Schedule to be created.

Name
Type
Description
iModelId
String, null

The unique identifier of the iModel linked to the Schedule.

iTwinId
String

The unique identifier of the iTwin.

name
String

The name of the Schedule.

Schedule Response

Container for Schedule object.

Name
Type
Description
schedule

Schedule Properties.

Schedule Type

The type of Schedule. This value determines the type of functionality possible in the API. See the Schedule Types section for details.

Name
Type
Description
v6.5
String
v10
String
Unknown
String

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?