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
OAuth access token with itwin-platform scope
Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.
Request body
Schedule Create Request
The unique identifier of the iModel linked to the Schedule.
The unique identifier of the iTwin.
The name of the Schedule.
Example
{ "iModelId": "047d77dd-e593-4099-9c5d-e5d6467336a4", "iTwinId": "bfe4d22d-027c-45d4-b3cc-50ecfa4b1bd7", "name": "My Schedule" }
Response 201 Created
Created
{ "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
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)
{ "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.
{ "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.
{ "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.
{ "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.
Schedule
Representation of a Schedule
The unique identifier of the iModel.
The unique identifier of the iTwin.
The unique identifier of the Schedule.
Specifies whether the schedule is of v10 type.
The name of the Schedule.
{ "type": "object", "properties": { "iModelId": { "type": "string", "description": "The unique identifier of the iModel.", "nullable": true }, "iTwinId": { "type": "string", "description": "The unique identifier of the iTwin." }, "id": { "type": "string", "description": "The unique identifier of the Schedule." }, "isNextGen": { "type": "boolean", "description": "Specifies whether the schedule is of v10 type." }, "name": { "type": "string", "description": "The name of the Schedule." }, "type": { "$ref": "#/components/schemas/ScheduleType", "description": "The type of the Schedule." } }, "additionalProperties": false, "description": "Representation of a Schedule" }
Schedule Create Request
Properties of the Schedule to be created.
The unique identifier of the iModel linked to the Schedule.
The unique identifier of the iTwin.
The name of the Schedule.
{ "title": "Schedule Create Request", "type": "object", "properties": { "iModelId": { "type": "string", "description": "The unique identifier of the iModel linked to the Schedule.", "nullable": true }, "iTwinId": { "type": "string", "description": "The unique identifier of the iTwin." }, "name": { "minLength": 1, "type": "string", "description": "The name of the Schedule." } }, "additionalProperties": false, "description": "Properties of the Schedule to be created." }
Schedule Response
Container for Schedule object.
{ "title": "Schedule Response", "type": "object", "properties": { "schedule": { "$ref": "#/components/schemas/Schedule", "description": "Schedule Properties." } }, "additionalProperties": false, "description": "Container for Schedule object." }
Schedule Type
The type of Schedule. This value determines the type of functionality possible in the API. See the Schedule Types section for details.
{ "title": "Schedule Type", "enum": [ "v6.5", "v10", "Unknown" ], "type": "string", "description": "The type of Schedule. This value determines the type of functionality possible in the API. See the [Schedule Types](#scheduletypes) section for details." }
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?