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

Creates a User Field.

V10 Endpoint

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

User Field

A User Field is a customizable data field that allows users to attach additional information to Resources, Resource Groups, Tasks, or 3D Entities. They are used to store information that is not included in the standard fields. An assignment of a User Field to an object corresponds with a User Field Value record.

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 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 creation.

Request body

User Field Create Request

Name
Type
Required?
Description
category
No

The category of the User Field.

color
String, null
No

The color of the User Field in the User Field Graph.

id
String, null
No

The unique identifier of the User Field.

name
String
No

The name of the User Field.

type
No

The type of value that can be assigned to the User Field.

Example

json
{
    "category": "Resource",
    "color": "#FFFFAC",
    "id": "b923ee62-e02d-486b-81f2-2da14aa1ac3a",
    "name": "Crane manufacturer",
    "type": "String"
}

Response 201 Created

OK

json
{
    "userField": {
        "category": "Resource",
        "color": "#FFFFAC",
        "deleted": false,
        "id": "b923ee62-e02d-486b-81f2-2da14aa1ac3a",
        "name": "Crane manufacturer",
        "type": "String"
    }
}

Response headers

Name
Description
ETag

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

Location

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

Response 202 Accepted

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

json
{
    "operation": {
        "id": "1604789f-68c4-46ba-b20d-8a19f8319362"
    },
    "userField": {
        "id": "fc3673d9-e385-4031-abbe-663535a329f5"
    },
    "_links": {
        "operationLocation": {
            "href": "https://api.bentley.com/schedules/5e11b21e-cba2-48a8-a2c1-2977d2d373e0/operations/1604789f-68c4-46ba-b20d-8a19f8319362"
        }
    }
}

Response headers

Name
Description
Operation-Id

The unique identifier of the Operation.

Operation-Location

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

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": "InvalidSchema",
            "message": "Invalid JSON provided."
        }],
        "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 User Field.

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 409 Conflict

Indicates that the entity being created conflicts with an existing one.

json
{
    "error": {
        "code": "UserFieldExists",
        "message": "User Field with provided Id already exists."
    }
}

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.

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.

User Field

Name
Type
Description
category

The category of the User Field.

color
String

The color of the User Field in the User Field Graph.

deleted
Boolean, null

Is this User Field deleted.

id
String

The unique identifier of the User Field.

name
String

The name of the User Field.

type

The type of value that can be assigned to the User Field.

User Field Category

The category of a User Field describes, what type of object the User Field can be assigned to.

Name
Type
Description
Task
String
Entity3d
String
Resource
String
ResourceGroup
String
Unknown
String

User Field 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.

userField

Properties of the User Field to be created.

_links

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

User Field Create Response Properties

Contains properties of the User Field that is queued for creation.

Name
Type
Description
id
String

The unique identifier of the User field.

User Field Create Request

Properties of the user field to be created.

Name
Type
Description
category

The category of the User Field.

color
String, null

The color of the User Field in the User Field Graph.

id
String, null

The unique identifier of the User Field.

name
String

The name of the User Field.

type

The type of value that can be assigned to the User Field.

User Field Create Response

Contains properties of the created User Field.

Name
Type
Description
operation

Contains properties of the created long-running operation.

userField

Properties of the created User Field.

_links

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

User Field Type

The type of a User Field describes what type of value can be assigned to the User Field.

Name
Type
Description
Integer
String
String
String
StartDate
String
FinishDate
String
Boolean
String
Float
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.