RM-4362 - removed update content

RM-4430 - documented file record
RM-4429 - documented declare record
This commit is contained in:
Ana Bozianu
2016-12-15 17:09:20 +02:00
parent 132612f5b4
commit cfc6510b37

View File

@@ -567,7 +567,6 @@ paths:
$ref: '#/definitions/Error' $ref: '#/definitions/Error'
'/records/{recordId}/content': '/records/{recordId}/content':
get: get:
x-alfresco-since: "5.2"
tags: tags:
- records - records
summary: Get record content summary: Get record content
@@ -586,75 +585,48 @@ paths:
description: Content has not been modified since the date provided in the If-Modified-Since header description: Content has not been modified since the date provided in the If-Modified-Since header
'400': '400':
description: | description: |
Invalid parameter: **nodeId** is not a valid format, or is not a file Invalid parameter: **recordId** is not a valid format, or is not a record
'401': '401':
description: Authentication failed description: Authentication failed
'404': '404':
description: | description: |
**nodeId** does not exist **recordId** does not exist
default: default:
description: Unexpected error description: Unexpected error
schema: schema:
$ref: '#/definitions/Error' $ref: '#/definitions/Error'
put: '/records/{recordId}/file':
x-alfresco-since: "5.2" post:
tags: tags:
- records - records
summary: Update record content summary: File a record
description: | description: |
Updates the content of the record with identifier **recordId**. Files the record **recordId** in the target record folder.
The request body for this endpoint can be any text or binary stream. You can specify the target record folder by providing its id **targetParentId**
or by providing the id of a parent container **targetParentId** and a relative path **relativePath**.
The **majorVersion** and **comment** parameters can be used to control versioning behaviour. If the content is versionable, The **relativePath** specifies the container structure relative to the node **targetParentId**.
a new minor version is created by default. If targetParentId is missing the path will be relative to the fileplan.
The relativePath is made of record containers and a record folder as the last element.
Containers that are missing from relativePath will be created before filing.
Optionally a new **name** parameter can also be specified that must be unique within the parent folder. If specified and valid then this If the record is already filed, a link to the target record folder is created.
will rename the node. If invalid then an error is returned and the content is not updated. operationId: fileRecord
**Note:** This API method accepts any content type, but for testing with this tool text based content can be provided.
This is because the OpenAPI Specification does not allow a wildcard to be provided or the ability for
tooling to accept an arbitrary file.
operationId: updateRecordContent
parameters: parameters:
- $ref: '#/parameters/recordIdParam' - $ref: '#/parameters/recordIdParam'
- name: majorVersion
in: query
description: |
If **true**, create a major version.
Setting this parameter also enables versioning of this node, if it is not already versioned.
required: false
type: boolean
default: false
- name: comment
in: query
description: |
Add a version comment which will appear in version history.
Setting this parameter also enables versioning of this node, if it is not already versioned.
required: false
type: string
- name: name
in: query
description: |
Optional new name. This should include the file extension.
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
The character `.` must not be used at the end of the name.
required: false
type: string
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
- $ref: '#/parameters/IGNodeEntryIncludeParam' - $ref: '#/parameters/IGNodeEntryIncludeParam'
- $ref: '#/parameters/fieldsParam' - $ref: '#/parameters/fieldsParam'
- in: body - in: body
name: contentBodyUpdate name: nodeBodyFile
description: The binary content description: The target record folder id
required: true required: true
schema: schema:
type: string $ref: '#/definitions/RequestBodyFile'
format: binary consumes:
- application/json
produces: produces:
- application/json - application/json
consumes:
- application/octet-stream
responses: responses:
'200': '200':
description: Successful response description: Successful response
@@ -662,22 +634,64 @@ paths:
$ref: '#/definitions/IGNodeEntry' $ref: '#/definitions/IGNodeEntry'
'400': '400':
description: | description: |
Invalid parameter: **recordId** is not a valid format, or is not a file Invalid parameter: **recordIdParam** or **targetParentId** is not a valid format,
**recordIdParam** is not a record, **targetParentId** is not a record container or **nodeBodyFile** is invalid
'401': '401':
description: Authentication failed description: Authentication failed
'403': '403':
description: Current user does not have permission to update **recordId** description: Current user does not have permission to create children of **nodeId**
'404': '404':
description: | description: |
**recordId** does not exist **recordIdParam** or **targetParentId** does not exist
'409':
description: Optional new name clashes with an existing node in the current parent folder
'413':
description: Content exceeds individual file size limit (configured for network/system)
'422': '422':
description: Model integrity exception including a file name containing invalid characters description: |
'507': Model integrity exception: the action breaks system's integrity restrictions
description: Content exceeds overall storage quota limit configured for the network/system default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
'/records/{nodeId}/declare':
post:
tags:
- records
summary: Declare a record
description: Declares the file **nodeId** in the unfiled record container.
operationId: declareRecord
parameters:
- name: nodeId
in: path
description: The identifier of a non-record file.
required: true
type: string
- name: hideRecord
in: query
description: Flag to indicate whether the record should be hiden from the curent parent folder.
type: boolean
default: false
- $ref: '#/parameters/IGNodeEntryIncludeParam'
- $ref: '#/parameters/fieldsParam'
consumes:
- application/json
produces:
- application/json
responses:
'200':
description: Successful response
schema:
$ref: '#/definitions/IGNodeEntry'
'400':
description: |
Invalid parameter: **nodeId** is not a valid format
'401':
description: Authentication failed
'403':
description: Current user does not have permission to declare a record
'404':
description: |
**nodeId** does not exist
'422':
description: |
Model integrity exception: the action breaks system's integrity restrictions
default: default:
description: Unexpected error description: Unexpected error
schema: schema:
@@ -961,6 +975,13 @@ definitions:
type: object type: object
additionalProperties: additionalProperties:
type: string type: string
RequestBodyFile:
type: object
properties:
targetParentId:
type: string
relativePath:
type: string
## Core definition ## Core definition
ChildAssociationInfo: ChildAssociationInfo:
type: object type: object