Change custom field values for a single item

This commit is contained in:
Eike Kettner
2020-11-16 22:06:48 +01:00
parent 62313ab03a
commit 93295d63a5
9 changed files with 274 additions and 17 deletions

View File

@ -1914,6 +1914,50 @@ paths:
type: string
format: binary
/sec/item/{id}/customfield:
put:
tags: [ Item ]
summary: Set the value of a custom field.
description: |
Sets the value for a custom field to this item. If a value
already exists, it is overwritten.
security:
- authTokenHeader: []
parameters:
- $ref: "#/components/parameters/id"
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CustomFieldValue"
responses:
200:
description: Ok
content:
application/json:
schema:
$ref: "#/components/schemas/BasicResult"
/sec/item/{itemId}/customfield/{id}:
delete:
tags: [ Item ]
summary: Removes the value for a custom field
description: |
Removes the value for the given custom field. The `id` may be
the id of a custom field or its name.
security:
- authTokenHeader: []
parameters:
- $ref: "#/components/parameters/id"
- $ref: "#/components/parameters/itemId"
responses:
200:
description: Ok
content:
application/json:
schema:
$ref: "#/components/schemas/BasicResult"
/sec/item/{itemId}/reprocess:
post:
tags: [ Item ]
@ -3240,6 +3284,8 @@ paths:
$ref: "#/components/schemas/BasicResult"
/sec/customfields/{id}:
parameters:
- $ref: "#/components/parameters/id"
get:
tags: [ Custom Fields ]
summary: Get details about a custom field.
@ -3385,6 +3431,19 @@ components:
items:
$ref: "#/components/schemas/CustomField"
CustomFieldValue:
description: |
Data structure to update the value of a custom field.
required:
- field
- value
properties:
field:
type: string
format: ident
value:
type: string
NewCustomField:
description: |
Data for creating a custom field.