API: Values::Property
Values::Property
represents a single key - value pair. That pair typically is an excerpt of the properties of a resource. Values::Property
itself is not an independent resource. It will always be nested and as such will only exist as part of another resource.
It is currently used e.g. in the Notification resource.
Linked Properties
Property | Description | Type | Constraints | Supported operations | Condition |
---|---|---|---|---|---|
self | This value | Values::Property | not null | READ | |
schema | This value’s schema | Schema | not null | READ |
Local Properties
Property | Description | Type | Constraints | Supported operations | Condition |
---|---|---|---|---|---|
property | The pairs’ key name | String | not null | READ | |
value | The pairs’ value | Polymorphic | READ |
Methods
Get a notification detail
Returns an individual detail of a notification identified by the notification id and the id of the detail.
notification_id
integer
required path
notification id
Example:1
id
integer
required path
detail id
Example:0
200
OK
{
"_type": "Values::Property",
"property": "startDate",
"value": "2021-01-01",
"_links": {
"self": {
"href": "api/v3/notifications/123/details/0"
},
"schema": {
"href": "api/v3/values/schemas/startDate"
}
}
}
{
"_type": "Values::Property",
"property": "dueDate",
"value": "2021-01-01",
"_links": {
"self": {
"href": "api/v3/notifications/123/details/0"
},
"schema": {
"href": "api/v3/values/schemas/dueDate"
}
}
}
{
"_type": "Values::Property",
"property": "date",
"value": "2021-01-01",
"_links": {
"self": {
"href": "api/v3/notifications/123/details/0"
},
"schema": {
"href": "api/v3/values/schemas/date"
}
}
}
ValuesPropertyModel
{
"type": "object",
"required": [
"_type",
"property",
"value",
"_links"
],
"properties": {
"_type": {
"type": "string",
"enum": [
"Values::Property"
]
},
"property": {
"type": "string",
"description": "The key of the key - value pair represented by the Values::Property"
},
"value": {
"type": "string",
"description": "The value of the key - value pair represented by the Values::Property"
},
"_links": {
"type": "object",
"required": [
"self",
"schema"
],
"properties": {
"self": {
"allOf": [
{
"$ref": "#/components/schemas/Link"
},
{
"description": "This key - value pair.\n\n**Resource**: Storage"
}
]
},
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Link"
},
{
"description": "The schema describing the key - value pair.\n\n**Resource**: Schema"
}
]
}
}
}
}
}
404
Returned if the notification or the detail of it does not exist or if the user does not have permission to view it.
Required permission being recipient of the notification
{
"_type": "Error",
"errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",
"message": "The requested resource could not be found."
}
ErrorResponse
{
"type": "object",
"required": [
"_type",
"errorIdentifier",
"message"
],
"properties": {
"_embedded": {
"type": "object",
"properties": {
"details": {
"type": "object",
"properties": {
"attribute": {
"type": "string",
"example": "project"
}
}
}
}
},
"_type": {
"type": "string",
"enum": [
"Error"
]
},
"errorIdentifier": {
"type": "string",
"example": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation"
},
"message": {
"type": "string",
"example": "Project can't be blank."
}
}
}
View values schema
The schema of a Values
resource.
id
string
required path
The identifier of the value. This is typically the value of the property
property of the Values
resource. It should be in lower camelcase format.
Example:startDate
200
OK
{
"_type": "Schema",
"property": {
"name": "Property",
"type": "String"
},
"value": {
"name": "Start date",
"type": "Date"
},
"_links": {
"self": {
"href": "api/v3/values/schemas/startDate"
}
}
}
{
"_type": "Schema",
"property": {
"name": "Property",
"type": "String"
},
"value": {
"name": "Due date",
"type": "Date"
},
"_links": {
"self": {
"href": "api/v3/values/schemas/dueDate"
}
}
}
{
"_type": "Schema",
"property": {
"name": "Property",
"type": "String"
},
"value": {
"name": "Date",
"type": "Date"
},
"_links": {
"self": {
"href": "api/v3/values/schemas/date"
}
}
}
SchemaModel
{
"type": "object",
"required": [
"_type",
"_links"
],
"properties": {
"_type": {
"type": "string",
"enum": [
"Schema"
]
},
"_dependencies": {
"type": "array",
"description": "A list of dependencies between one property's value and another property",
"items": {
"type": "string"
}
},
"_links": {
"type": "object",
"properties": {
"self": {
"allOf": [
{
"$ref": "#/components/schemas/Link"
},
{
"description": "This schema\n\n**Resource**: Schema"
}
]
}
}
}
}
}
404
Returned if the schema does not exist.
{
"_type": "Error",
"errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",
"message": "The requested resource could not be found."
}
ErrorResponse
{
"type": "object",
"required": [
"_type",
"errorIdentifier",
"message"
],
"properties": {
"_embedded": {
"type": "object",
"properties": {
"details": {
"type": "object",
"properties": {
"attribute": {
"type": "string",
"example": "project"
}
}
}
}
},
"_type": {
"type": "string",
"enum": [
"Error"
]
},
"errorIdentifier": {
"type": "string",
"example": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation"
},
"message": {
"type": "string",
"example": "Project can't be blank."
}
}
}
400
Returned if the requested property id is not in a lower camel case format.
{
"_type": "Error",
"errorIdentifier": "urn:openproject-org:api:v3:errors:BadRequest",
"message": "Bad request: property is invalid"
}
ErrorResponse
{
"type": "object",
"required": [
"_type",
"errorIdentifier",
"message"
],
"properties": {
"_embedded": {
"type": "object",
"properties": {
"details": {
"type": "object",
"properties": {
"attribute": {
"type": "string",
"example": "project"
}
}
}
}
},
"_type": {
"type": "string",
"enum": [
"Error"
]
},
"errorIdentifier": {
"type": "string",
"example": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation"
},
"message": {
"type": "string",
"example": "Project can't be blank."
}
}
}