API: Configuration
The configuration endpoint allows to read certain configuration parameters of the OpenProject instance. Note that there is no 1:1 relationship between this endpoint and the settings an administrator has at hand to modify the behavior of the application via configuration.yml or ENV variables.
For now this endpoint will only allow access to settings deemed useful for a client to know in general.
As clients might rely on the combination of both, the system settings as well as the current user’s preferences, the resource embeds the current user’s preferences so client can fetch both with one request.
| Link | Description | Type | Nullable | Supported operations |
|---|---|---|---|---|
| self | The configuration | Configuration | READ | |
| userPreferences | The preferences of the current user | UserPreferences | READ |
Local Properties
| Property | Description | Type | Condition | Supported operations |
|---|---|---|---|---|
| maximumAttachmentFileSize | The maximum allowed size of an attachment in Bytes | Integer | READ | |
| perPageOptions | Page size steps to be offered in paginated list UI | Integer[] | READ | |
| hostName | The host name configured for the system | String | READ | |
| durationFormat | The format used to display Work, Remaining Work, and Spent time durations. | String | READ | |
| activeFeatureFlags | The list of all feature flags that are active | String[] | READ |
Methods
Get instance configuration
Returns an object containing information about the global configuration.
200
OK
{
"_type": "Configuration",
"maximumAttachmentFileSize": 1073741824,
"maximumAPIV3PageSize": 1000,
"perPageOptions": [
20,
100
],
"dateFormat": null,
"durationFormat": "hours_only",
"timeFormat": null,
"userDefaultTimezone": null,
"startOfWeek": null,
"hoursPerDay": 8,
"daysPerMonth": 20,
"hostName": "openproject.internal",
"activeFeatureFlags": [
"semanticSearch"
],
"availableFeatures": [
"scim_api",
"calculated_values",
"ldap_groups"
],
"triallingFeatures": [],
"allowedLinkProtocols": [
"http",
"https",
"mailto"
],
"wikisAvailable": true,
"_embedded": {
"userPreferences": {
"_type": "UserPreferences",
"_hint": "User preference resource shortened for brevity"
}
},
"_links": {
"self": {
"href": "/api/v3/configuration"
},
"userPreferences": {
"href": "/api/v3/users/4/preferences"
}
}
}
ConfigurationModel{
"type": "object",
"properties": {
"_type": {
"type": "string",
"enum": [
"Configuration"
]
},
"maximumAttachmentFileSize": {
"type": "integer",
"description": "The maximum allowed size of an attachment in Bytes"
},
"maximumAPIV3PageSize": {
"type": "integer",
"description": "The maximum allowed page size for API v3 collections"
},
"perPageOptions": {
"type": "array",
"description": "Page size steps to be offered in UI for paginated lists",
"items": {
"type": "integer"
}
},
"hostName": {
"type": "string",
"description": "The host name configured for the system"
},
"durationFormat": {
"type": [
"string",
"null"
],
"description": "The format used to display Work, Remaining Work, and Spent time durations",
"enum": [
null,
"days_and_hours",
"hours_only"
]
},
"dateFormat": {
"type": [
"string",
"null"
],
"description": "The format used to display dates in UI",
"enum": [
null,
"%Y-%m-%d",
"%d/%m/%Y",
"%d.%m.%Y",
"%d-%m-%Y",
"%m/%d/%Y",
"%d %b %Y",
"%d %B %Y",
"%b %d, %Y",
"%B %d, %Y"
]
},
"timeFormat": {
"type": [
"string",
"null"
],
"description": "The format used to display time values",
"enum": [
null,
"%H:%M",
"%I:%M %p"
]
},
"userDefaultTimezone": {
"type": [
"string",
"null"
],
"description": "The default timezone for users, who does not have a timezone set for themselves"
},
"startOfWeek": {
"type": [
"integer",
"null"
],
"description": "The first day of the week. Can be Monday (1), Saturday (6), or Sunday (7)",
"enum": [
null,
1,
6,
7
]
},
"hoursPerDay": {
"type": [
"integer",
"null"
],
"description": "The number of hours each working day"
},
"daysPerMonth": {
"type": [
"integer",
"null"
],
"description": "The number of days that are considered a month for a more natural way of displaying durations"
},
"activeFeatureFlags": {
"type": "array",
"description": "The list of all feature flags that are active",
"items": {
"type": "string"
}
},
"availableFeatures": {
"type": "array",
"description": "The list of features that are active due to the current subscription plan",
"items": {
"type": "string"
}
},
"triallingFeatures": {
"type": "array",
"description": "The list of features that are active due to the current trial phase",
"items": {
"type": "string"
}
},
"allowedLinkProtocols": {
"type": "array",
"description": "The list of allowed URL schemas for links",
"items": {
"type": "string"
}
},
"wikisAvailable": {
"type": "boolean",
"description": "True, if wiki functionality is enabled globally.\nFalse, if it is deactivated - e.g. because external wikis should be used."
},
"_embedded": {
"type": "object",
"properties": {
"userPreferences": {
"$ref": "#/components/schemas/UserPreferencesModel"
}
}
},
"_links": {
"type": "object",
"properties": {
"self": {
"allOf": [
{
"$ref": "#/components/schemas/Link"
},
{
"description": "This configuration resource."
}
]
},
"userPreferences": {
"allOf": [
{
"$ref": "#/components/schemas/Link"
},
{
"description": "The user preferences of the currently authenticated user."
}
]
},
"prepareAttachment": {
"allOf": [
{
"$ref": "#/components/schemas/Link"
},
{
"description": "Request an upload link.\n\n**Condition:** `direct_uploads` is enabled"
}
]
}
}
}
}
}
View project configuration
Returns the configuration scoped to a specific project, including all global configuration properties plus project-specific settings.
id
integer
required path
Project id
Example:1
200
404
Returned if the project does not exist or the user cannot view it.
{
"_type": "Error",
"errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",
"message": "The requested resource could not be found."
}
{
"_type": "Error",
"errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
"message": "Project can't be blank.",
"_embedded": {
"details": {
"attribute": "project"
}
}
}
ErrorResponse{
"type": "object",
"required": [
"_type",
"errorIdentifier",
"message"
],
"properties": {
"_embedded": {
"type": "object",
"properties": {
"details": {
"type": "object",
"properties": {
"attribute": {
"type": "string"
}
}
}
}
},
"_type": {
"type": "string",
"enum": [
"Error"
]
},
"errorIdentifier": {
"type": "string"
},
"message": {
"type": "string"
}
},
"examples": [
{
"_type": "Error",
"errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
"message": "Project can't be blank.",
"_embedded": {
"details": {
"attribute": "project"
}
}
}
]
}