swagger: '2.0'
info:
  description: |
    **Core API**

    Provides access to the core features of Alfresco Content Services.
  version: '1'
  title: Alfresco Content Services REST API
basePath: /alfresco/api/-default-/public/alfresco/versions/1
securityDefinitions:
  basicAuth:
    type: basic
    description: HTTP Basic Authentication
security:
  - basicAuth: []
consumes:
  - application/json
produces:
  - application/json
tags:
  - name: activities
    description: Retrieve and manage activities
  - name: comments
    description: Retrieve and manage comments
  - name: favorites
    description: Retrieve and manage favorites
  - name: networks
    description: Retrieve and manage networks
  - name: nodes
    description: Retrieve and manage nodes
  - name: people
    description: Retrieve and manage people
  - name: preferences
    description: Retrieve and manage preferences
  - name: queries
    description: Find nodes, sites, and people using a simple search term
  - name: ratings
    description: Retrieve and manage ratings
  - name: renditions
    description: Retrieve and manage file renditions
  - name: shared-links
    description: Retrieve and manage public shared links
  - name: sites
    description: Retrieve and manage sites
  - name: tags
    description: Retrieve and manage tags
  - name: trashcan
    description: Retrieve and manage deleted nodes
  - name: versions
    description: Retrieve and manage versions
parameters:
  nodeIdParam:
    name: nodeId
    in: path
    description: The identifier of a node.
    required: true
    type: string
  nodeIdWithAliasParam:
    name: nodeId
    in: path
    description: |
      The identifier of a node. You can also use one of these well-known aliases:
      * -my-
      * -shared-
      * -root-
    required: true
    type: string
  nodeParentIdParam:
    name: nodeId
    in: path
    description: The identifier of a parent node.
    required: true
    type: string
  nodeParentIdWithAliasParam:
    name: nodeId
    in: path
    description: |
      The identifier of a parent node. You can also use one of these well-known aliases:
      * -my-
      * -shared-
      * -root-
    required: true
    type: string
  nodeChildIdWithAliasParam:
    name: nodeId
    in: path
    description: |
      The identifier of a child node. You can also use one of these well-known aliases:
      * -my-
      * -shared-
      * -root-
    required: true
    type: string
  nodeSourceIdParam:
    name: nodeId
    in: path
    description: The identifier of a source node.
    required: true
    type: string
  nodeTargetIdParam:
    name: nodeId
    in: path
    description: The identifier of a target node.
    required: true
    type: string
  nodeMinimalEntryIncludeParam:
    name: include
    in: query
    description: |
      Returns additional information about the node. The following optional fields can be requested:
      * allowableOperations
      * aspectNames
      * association
      * isLink
      * isLocked
      * path
      * properties
      * permissions
    required: false
    type: array
    items:
      type: string
    collectionFormat: csv
  nodeAssocMinimalEntryIncludeParam:
    name: include
    in: query
    description: |
      Returns additional information about the node. The following optional fields can be requested:
      * allowableOperations
      * aspectNames
      * isLink
      * isLocked
      * path
      * properties
    required: false
    type: array
    items:
      type: string
    collectionFormat: csv
  nodeEntryIncludeParam:
    name: include
    in: query
    description: |
      Returns additional information about the node. The following optional fields can be requested:
      * allowableOperations
      * association
      * isLink
      * isLocked
      * path
      * permissions
    required: false
    type: array
    items:
      type: string
    collectionFormat: csv
  personMinimalEntryIncludeParam:
    name: include
    in: query
    description: |
      Returns additional information about the person. The following optional fields can be requested:
      * properties
      * aspectNames
    required: false
    type: array
    items:
      type: string
    collectionFormat: csv    
  sharedIdParam:
    name: sharedId
    in: path
    description: The identifier of a shared link to a file.
    required: true
    type: string
  sharedLinkEntryIncludeParam:
    name: include
    in: query
    description: |
      Returns additional information about the shared link, the following optional fields can be requested:
      * allowableOperations
    required: false
    type: array
    items:
      type: string
    collectionFormat: csv
  renditionIdParam:
    name: renditionId
    in: path
    description: The name of a thumbnail rendition, for example *doclib*, or *pdf*.
    required: true
    type: string
  versionIdParam:
    name: versionId
    in: path
    description: The identifier of a version, ie. version label, within the version history of a node.
    required: true
    type: string
  versionMinimalEntryIncludeParam:
    name: include
    in: query
    description: |
      Returns additional information about the version node. The following optional fields can be requested:
      * properties
      * aspectNames
    required: false
    type: array
    items:
      type: string
    collectionFormat: csv
  personIdParam:
    name: personId
    in: path
    description: The identifier of a person.
    required: true
    type: string
  siteIdParam:
    name: siteId
    in: path
    description: The identifier of a site.
    required: true
    type: string
  tagIdParam:
    name: tagId
    in: path
    description: The identifier of a tag.
    required: true
    type: string
  networkIdParam:
    name: networkId
    in: path
    description: The identifier of a network.
    required: true
    type: string
  commentIdParam:
    name: commentId
    in: path
    description: The identifier of a comment.
    required: true
    type: string
  ratingIdParam:
    name: ratingId
    in: path
    description: The identifier of a rating.
    required: true
    type: string
  favoriteIdParam:
    name: favoriteId
    in: path
    description: The identifier of a favorite.
    required: true
    type: string
  skipCountParam:
    name: skipCount
    in: query
    description: The number of entities that exist in the collection before those included in this list.
    required: false
    type: integer
    minimum: 0
  maxItemsParam:
    name: maxItems
    in: query
    description: The maximum number of items to return in the list.
    required: false
    type: integer
    minimum: 1
  fieldsParam:
    name: fields
    in: query
    description: |
      A list of field names.

      You can use this parameter to restrict the fields
      returned within a response if, for example, you want to save on overall bandwidth.

      The list applies to a returned individual
      entity or entries within a collection.

      If the API method also supports the **include**
      parameter, then the fields specified in the **include**
      parameter are returned in addition to those specified in the **fields** parameter.
    required: false
    type: array
    items:
      type: string
    collectionFormat: csv
  orderByParam:
    name: orderBy
    in: query
    description: |
      A string to control the order of the entities returned in a list. You can use the **orderBy** parameter to
      sort the list by one or more fields.

      Each field has a default sort order, which is normally ascending order. Read the API method implementation notes
      above to check if any fields used in this method have a descending default search order.

      To sort the entities in a specific order, you can use the **ASC** and **DESC** keywords for any field.
    required: false
    type: array
    items:
      type: string
    collectionFormat: csv
  whereParam:
    name: where
    in: query
    description: A string to restrict the returned objects by using a predicate.
    required: false
    type: string
  includeSourceParam:
    name: includeSource
    in: query
    description: Also include **source** (in addition to **entries**) with folder information on **nodeId**
    required: false
    type: boolean
  relationsParam:
    name: relations
    in: query
    description: Use the relations parameter to include one or more related entities in a single response.
    required: false
    type: array
    items:
      type: string
    collectionFormat: csv
  attachmentParam:
    name: attachment
    in: query
    description: |
       **true** enables a web browser to download the file as an attachment.
       **false** means a web browser may preview the file in a new tab or window, but not
       download the file.

       You can only set this parameter to **false** if the content type of the file is in the supported list;
       for example, certain image files and PDF files.

       If the content type is not supported for preview, then a value of **false**  is ignored, and
       the attachment will be returned in the response.
    required: false
    default: true
    type: boolean
  ifModifiedSinceHeader:
    name: If-Modified-Since
    in: header
    description: |
      Only returns the content if it has been modified since the date provided.
      Use the date format defined by HTTP. For example, `Wed, 09 Mar 2016 16:56:34 GMT`.
    required: false
    type: string
    format: date-time
paths:
  '/nodes/{nodeId}/comments':
    get:
      tags:
        - comments
      summary: List comments
      description: Gets a list of comments for the node **nodeId**, sorted chronologically with the newest comment first.
      operationId: listComments
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/CommentPaging'
        '400':
          description: |
            Invalid parameter: **nodeId** exists but does not identify a file or a folder, 
            or the value of **maxItems** is invalid, or the value of **skipCount** is invalid
        '401':
          description: Authentication failed
        '403':
          description: User does not have permission read comments on the node
        '404':
          description: |
            **nodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    post:
      tags:
        - comments
      summary: Create a comment
      description: |
        Creates a comment on node **nodeId**. You specify the comment in a JSON body like this:
        
        ```JSON
        {
          "content": "This is a comment"
        }
        ```
        
        **Note:** You can create more than one comment by 
        specifying a list of comments in the JSON body like this:
        
        ```JSON
        [
          {
            "content": "This is a comment"
          },
          {
            "content": "This is another comment"
          }
        ]
        ```
        If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example:
        
        ```JSON
        {
          "list": {
            "pagination": {
              "count": 2,
              "hasMoreItems": false,
              "totalItems": 2,
              "skipCount": 0,
              "maxItems": 100
            },
            "entries": [
              {
                "entry": {
                  ...
                }
              },
              {
                "entry": {
                  ...
                }
              }
            ]
          }
        }
        ```
      operationId: createComment
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: commentBodyCreate
          description: The comment text. Note that you can also provide a list of comments.
          required: true
          schema:
            $ref: '#/definitions/CommentBody'
      responses:
        '201':
          description: Successful response
          schema:
            $ref: '#/definitions/CommentEntry'
        '400':
          description: |
            Invalid parameter: **commentBodyCreate** is invalid
        '401':
          description: Authentication failed
        '403':
          description: User does not have permission to create a comment           
        '404':
          description: |
            **nodeId** does not exist
        '405':
          description: Cannot comment on a node of this type
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/comments/{commentId}':
    put:
      tags:
        - comments
      summary: Update a comment
      description: Updates an existing comment **commentId** on node **nodeId**.
      operationId: updateComment
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/commentIdParam'
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: commentBodyUpdate
          description: The JSON representing the comment to be updated.
          required: true
          schema:
            $ref: '#/definitions/CommentBody'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/CommentEntry'
        '400':
          description: |
            Invalid parameter: **commentBodyUpdate** is invalid
        '401':
          description: Authentication failed
        '403':
          description: User does not have permission to update a comment
        '404':
          description: |
            **nodeId** or **commentId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    delete:
      tags:
        - comments
      summary: Delete a comment
      description: Deletes the comment **commentId** from node **nodeId**.
      operationId: deleteComment
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/commentIdParam'
      responses:
        '204':
          description: Successful response
        '401':
          description: Authentication failed
        '403':
          description: User does not have permission to delete a comment
        '404':
          description: |
            **nodeId** or **commentId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/ratings':
    get:
      tags:
        - ratings
      summary: List ratings
      description: Gets a list of ratings for node **nodeId**.
      operationId: listRatings
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/RatingPaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems** or **skipCount** is invalid
        '401':
          description: Authentication failed
        '404':
          description: |
            **nodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    post:
      tags:
        - ratings
      summary: Create a rating
      description: Create a rating for the node with identifier **nodeId**
      operationId: createRating
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: ratingBodyCreate
          description: |
            For "myRating" the type is specific to the rating scheme, boolean for the likes and an integer for the fiveStar.

            For example, to "like" a file the following body would be used:

            ```JSON
              {
                "id": "likes",
                "myRating": true
              }
            ```
          required: true
          schema:
            $ref: '#/definitions/RatingBody'
      responses:
        '201':
          description: Successful response
          schema:
            $ref: '#/definitions/RatingEntry'
        '400':
          description: |
            Invalid parameter: **ratingBodyCreate** is invalid
        '401':
          description: Authentication failed
        '404':
          description: |
            **nodeId** does not exist
        '405':
          description: Cannot rate a node of this type
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/ratings/{ratingId}':
    get:
      tags:
        - ratings
      summary: Get a rating
      description: Get the specific rating **ratingId** on node **nodeId**.
      produces:
        - application/json
      operationId: getRating
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/ratingIdParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/RatingEntry'
        '400':
          description: |
            Invalid parameter: unknown rating scheme specified
        '401':
          description: Authentication failed
        '404':
          description: |
            **nodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    delete:
      tags:
        - ratings
      summary: Delete a rating
      description: Deletes rating **ratingId** from node **nodeId**.
      operationId: deleteRating
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/ratingIdParam'
      responses:
        '204':
          description: Successful response
        '400':
          description: |
            Invalid parameter: unknown rating scheme specified
        '401':
          description: Authentication failed
        '404':
          description: |
            **nodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/tags':
    get:
      tags:
        - tags
      summary: List tags for a node
      description: Gets a list of tags for node **nodeId**.
      operationId: listTagsForNode
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/TagPaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems** or **skipCount** is invalid
        '401':
          description: Authentication failed
        '403':
          description: User does not have permission to read tags on the node            
        '404':
          description: |
            **nodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    post:
      tags:
        - tags
      summary: Create a tag for a node
      description: |
        Creates a tag on the node **nodeId**. You specify the tag in a JSON body like this:
        
        ```JSON
        {
          "tag":"test-tag-1"
        }
        ```
        
        **Note:** You can create more than one tag by 
        specifying a list of tags in the JSON body like this:
        
        ```JSON
        [
          {
            "tag":"test-tag-1"
          },
          {
            "tag":"test-tag-2"
          }
        ]
        ```
        If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example:
        
        ```JSON
        {
          "list": {
            "pagination": {
              "count": 2,
              "hasMoreItems": false,
              "totalItems": 2,
              "skipCount": 0,
              "maxItems": 100
            },
            "entries": [
              {
                "entry": {
                  ...
                }
              },
              {
                "entry": {
                 ...
                }
              }
            ]
          }
        }
        ```
      operationId: createTagForNode
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: tagBodyCreate
          description: The new tag
          required: true
          schema:
            $ref: '#/definitions/TagBody'
      responses:
        '201':
          description: Successful response
          schema:
            $ref: '#/definitions/TagEntry'
        '400':
          description: |
            Invalid parameter: **tagBodyCreate** is invalid
        '401':
          description: Authentication failed
        '403':
          description: User does not have permission to create tags on the node                      
        '404':
          description: |
            **nodeId** does not exist       
        '405':
          description: Cannot tag a node of this type 
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/tags/{tagId}':
    delete:
      tags:
        - tags
      summary: Delete a tag from a node
      description: Deletes tag **tagId** from node **nodeId**.
      operationId: deleteTagFromNode
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/tagIdParam'
      responses:
        '204':
          description: Successful response
        '401':
          description: Authentication failed
        '403':
          description: User does not have permission to delete the tag
        '404':
          description: |
            **nodeId** or **tagId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}':
    get:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: Get a node
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Get information for node **nodeId**.
        
        You can use the **include** parameter to return additional information.
      operationId: getNode
      parameters:
        - $ref: '#/parameters/nodeIdWithAliasParam'
        - $ref: '#/parameters/nodeEntryIncludeParam'
        - name: relativePath
          in: query
          description: |
            A path relative to the **nodeId**. If you set this, 
            information is returned on the node resolved by this path.
          required: false
          type: string
        - $ref: '#/parameters/fieldsParam'
      produces:
        - application/json
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/NodeEntry'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format
        '401':
          description: Authentication failed          
        '403':
          description: Current user does not have permission to retrieve **nodeId**
        '404':
          description: |
            **nodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    put:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: Update a node
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Updates the node **nodeId**. For example, you can rename a file or folder:
        ```JSON
        {
          "name":"My new name"
        }
        ```
        You can also set or update one or more properties:
        ```JSON
        {
          "properties":
          {
            "cm:title":"Folder title"
          }
        }
        ```
        **Note:** setting properties of type d:content and d:category are not supported.

        **Note:** if you want to add or remove aspects, then you must use **GET /nodes/{nodeId}** first to get the complete set of *aspectNames*.

        You can add (or remove) *locallySet* permissions, if any, in addition to any inherited permissions.
        You can also optionally disable (or re-enable) inherited permissions via *isInheritanceEnabled* flag:
        ```JSON
        {
          "permissions":
            {
              "isInheritanceEnabled": false,
              "locallySet":
                [
                  {"authorityId": "GROUP_special", "name": "Read", "accessStatus":"DENIED"},
                  {"authorityId": "testuser", "name": "Contributor", "accessStatus":"ALLOWED"}
                ]
            }
        }
        ```
        **Note:** if you want to add or remove locally set permissions then you must use **GET /nodes/{nodeId}** first to get the complete set of *locallySet* permissions.

        **Note:** Currently there is no optimistic locking for updates, so they are applied in "last one wins" order.
      operationId: updateNode
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/nodeEntryIncludeParam'
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: nodeBodyUpdate
          description: The node information to update.
          required: true
          schema:
            $ref: '#/definitions/NodeBodyUpdate'
      produces:
        - application/json
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/NodeEntry'
        '400':
          description: |
            Invalid parameter: the update request is invalid or **nodeId** is not a valid format or **nodeBodyUpdate** is invalid
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission to update **nodeId**
        '404':
          description: |
            **nodeId** does not exist
        '409':
          description: Updated name clashes with an existing node in the current parent folder
        '422':
          description: Model integrity exception including a file name containing invalid characters
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    delete:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: Delete a node
      description: |
         **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

         Deletes the node **nodeId**.

         If **nodeId** is a folder, then its children are also deleted.

         Deleted nodes move to the trashcan unless the **permanent** query parameter is **true** and the current user is the owner of the node or an admin.
         
         Deleting a node deletes it from its primary parent and also from any secondary parents. Peer associations are also deleted, where the deleted 
         node is either a source or target of an association. This applies recursively to any hierarchy of primary children of the deleted node. 
         
         **Note:** If the node is not permanently deleted, and is later successfully restored to its former primary parent, then the primary 
         child association is restored. This applies recursively for any primary children. No other secondary child associations or 
         peer associations are restored for any of the nodes in the primary parent-child hierarchy of restored nodes, regardless of whether the original 
         associations were to nodes inside or outside the restored hierarchy.
      operationId: deleteNode
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - name: permanent
          in: query
          description: |
            If **true** then the node is deleted permanently, without moving to the trashcan.
            Only the owner of the node or an admin can permanently delete the node.
          required: false
          type: boolean
          default: false
      produces:
        - application/json
      responses:
        '204':
          description: Successful response
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission to delete **nodeId**
        '404':
          description: |
            **nodeId** does not exist
        '409':
          description: |
            **nodeId** is locked and cannot be deleted
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/children':
    get:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: List node children
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets a list of children of the parent node **nodeId**.

        Minimal information for each child is returned by default.

        You can use the **include** parameter to return additional information.
        
        The list of child nodes includes primary children and secondary children, if there are any.
        
        You can use the **include** parameter (include=association) to return child association details 
        for each child, including the **assocTyp**e and the **isPrimary** flag.
        
        The default sort order for the returned list is for folders to be sorted before files, and by ascending name

        You can override the default using **orderBy** to specify one or more fields to sort by. The default order is always ascending, but
        you can use an optional *ASC** or **DESC** modifier to specify an ascending or descending sort order. 
            
        For example, specifying ```orderBy=name DESC``` returns a mixed folder/file list in descending **name** order.

        You can use any of the following fields to order the results:
        * isFolder
        * name
        * mimeType
        * nodeType
        * sizeInBytes
        * modifiedAt
        * createdAt
        * modifiedByUser
        * createdByUser
      operationId: listNodeChildren
      parameters:
        - $ref: '#/parameters/nodeIdWithAliasParam'
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/orderByParam'
        - name: where
          in: query
          description: |
            Optionally filter the list. Here are some examples:

            *   ```where=(isFolder=true)```

            *   ```where=(isFile=true)```

            *   ```where=(nodeType='my:specialNodeType')```

            *   ```where=(nodeType='my:specialNodeType' INCLUDESUBTYPES)```
            
            *   ```where=(isPrimary=true)```
            
            *   ```where=(assocType='my:specialAssocType')```

            *   ```where=(isPrimary=false and assocType='my:specialAssocType')```
          required: false
          type: string
        - $ref: '#/parameters/nodeMinimalEntryIncludeParam'
        - name: relativePath
          in: query
          description: Return information on children in the folder resolved by this path. The path is relative to **nodeId**.
          required: false
          type: string
        - name: includeSource
          in: query
          description: Also include **source** in addition to **entries** with folder information on the parent node – either the specified parent **nodeId**, or as resolved by **relativePath**.
          required: false
          type: boolean
        - $ref: '#/parameters/fieldsParam'
      produces:
        - application/json
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/NodeChildAssociationPaging'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format, **nodeId** is not a folder or **orderBy** is invalid
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission to retrieve children of **nodeId**
        '404':
          description: |
            **nodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    post:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: Create a node
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Create a node and add it as a primary child of node **nodeId**.
        
        This endpoint supports both JSON and multipart/form-data (file upload).

        **Using multipart/form-data**

        Use the **filedata** field to represent the content to upload, for example, the following curl command will
        create a node with the contents of test.txt in the test user's home folder.

        ```curl -utest:test -X POST host:port/alfresco/api/-default-/public/alfresco/versions/1/nodes/-my-/children -F filedata=@test.txt```

        You can use the **name** field to give an alternative name for the new file.

        You can use the **nodeType** field to create a specific type. The default is cm:content.

        You can use the **renditions** field to create renditions (e.g. doclib) asynchronously upon upload.
        Note that currently only one rendition can be requested. Also, as requesting rendition is a background process,
        any rendition failure (e.g. No transformer is currently available) will not fail the whole upload and has the potential to silently fail.

        Use **overwrite** to overwrite an existing file, matched by name. If the file is versionable,
        the existing content is replaced.

        When you overwrite existing content, you can set the **majorVersion** boolean field to **true** to indicate a major version
        should be created. The default for **majorVersion** is **false**.
        Setting  **majorVersion** enables versioning of the node, if it is not already versioned.

        When you overwrite existing content, you can use the **comment** field to add a version comment that appears in the
        version history. This also enables versioning of this node, if it is not already versioned.

        You can set the **autoRename** boolean field to automatically resolve name clashes. If there is a name clash, then
        the API method tries to create a unique name using an integer suffix.

        You can use the **relativePath** field to specify the folder structure to create relative to the node **nodeId**.
        Folders in the **relativePath** that do not exist are created before the node is created.

        Any other field provided will be treated as a property to set on the newly created node.

        **Note:** setting properties of type d:content and d:category are not supported.

        **Using JSON**

        You must specify at least a **name** and **nodeType**. For example, to create a folder:
        ```JSON
        {
          "name":"My Folder",
          "nodeType":"cm:folder"
        }
        ```

        You can create an empty file like this:
        ```JSON
        {
          "name":"My text file.txt",
          "nodeType":"cm:content"
        }
        ```
        You can update binary content using the ```PUT /nodes/{nodeId}``` API method.

        You can create a folder, or other node, inside a folder hierarchy:
        ```JSON
        {
          "name":"My Special Folder",
          "nodeType":"cm:folder",
          "relativePath":"X/Y/Z"
        }
        ```
        The **relativePath** specifies the folder structure to create relative to the node **nodeId**. Folders in the
        **relativePath** that do not exist are created before the node is created.

        You can set properties when you create a new node:
        ```JSON
        {
          "name":"My Other Folder",
          "nodeType":"cm:folder",
          "properties":
          {
            "cm:title":"Folder title",
            "cm:description":"This is an important folder"
          }
        }
        ```
        Any missing aspects are applied automatically. For example, **cm:titled** in the JSON shown above. You can set aspects
        explicitly, if needed, using an **aspectNames** field.

        **Note:** setting properties of type d:content and d:category are not supported.
        
        Typically, for files and folders, the primary children are created within the parent folder using the default "cm:contains" assocType. 
        If the content model allows then it is also possible to create primary children with a different assoc type. For example:
        ```JSON
        {
          "name":"My Node",
          "nodeType":"my:specialNodeType",
          "association":
          {
            "assocType":"my:specialAssocType"
          }
        }
        ``` 
        
        Additional associations can be added after creating a node. You can also add associations at the time the node is created. This is 
        required, for example, if the content model specifies that a node has mandatory associations to one or more existing nodes. You can optionally 
        specify an array of **secondaryChildren** to create one or more secondary child associations, such that the newly created node acts as a parent node. 
        You can optionally specify an array of **targets** to create one or more peer associations such that the newly created node acts as a source node. 
        For example, to associate one or more secondary children at time of creation:
        ```JSON
        {
          "name":"My Folder",
          "nodeType":"cm:folder",
          "secondaryChildren":
            [ {"childId":"abcde-01234-...", "assocType":"my:specialChildAssocType"} ]
        }
        ``` 
        For example, to associate one or more targets at time of creation:
        ```JSON
        {
          "name":"My Folder",
          "nodeType":"cm:folder",
          "targets":
            [ {"targetId":"abcde-01234-...", "assocType":"my:specialPeerAssocType"} ]
        }
        ```
        
        **Note:** You can create more than one child by 
        specifying a list of nodes in the JSON body. For example, the following JSON
        body creates two folders inside the specified **nodeId**, if the **nodeId** identifies
        a folder:
        
        ```JSON
        [
          {
            "name":"My Folder 1",
            "nodeType":"cm:folder"
          },
          {
            "name":"My Folder 2",
            "nodeType":"cm:folder"
          }
        ]
        ```
        If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example:
        
        ```JSON
        {
          "list": {
            "pagination": {
              "count": 2,
              "hasMoreItems": false,
              "totalItems": 2,
              "skipCount": 0,
              "maxItems": 100
            },
            "entries": [
              {
                "entry": {
                  ...
                }
              },
              {
                "entry": {
                  ...
                }
              }
            ]
          }
        }
        ```
      operationId: createNode
      parameters:
        - $ref: '#/parameters/nodeIdWithAliasParam'
        - name: autoRename
          in: query
          description: If true, then  a name clash will cause an attempt to auto rename by finding a unique name using an integer suffix.
          required: false
          type: boolean
        - $ref: '#/parameters/nodeEntryIncludeParam'
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: nodeBodyCreate
          description: The node information to create.
          required: true
          schema:
            $ref: '#/definitions/NodeBodyCreate'
      consumes:
        - application/json
        - multipart/form-data
      produces:
        - application/json
      responses:
        '201':
          description: Successful response
          schema:
            $ref: '#/definitions/NodeEntry'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format or **nodeBodyCreate** is invalid
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission to create children of **nodeId**
        '404':
          description: |
            **nodeId** does not exist
        '409':
          description: New name clashes with an existing node in the current parent folder
        '413':
          description: Content exceeds individual file size limit configured for the network or system
        '422':
          description: Model integrity exception including a file name containing invalid characters
        '507':
          description: Content exceeds overall storage quota limit configured for the network or system
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/copy':
    post:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: Copy a node
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Copies the node **nodeId** to the parent folder node **targetParentId**. You specify the **targetParentId** in the request body.

        The new node has the same name as the source node unless you specify a new **name** in the request body.

        If the source **nodeId** is a folder, then all of its children are also copied.

        If the source **nodeId** is a file, it's properties, aspects and tags are copied, it's ratings, comments and locks are not.
      operationId: copyNode
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/nodeEntryIncludeParam'
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: nodeBodyCopy
          description: The targetParentId and, optionally, a new name which should include the file extension.
          required: true
          schema:
            $ref: '#/definitions/NodeBodyCopy'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '201':
          description: Successful response
          schema:
            $ref: '#/definitions/NodeEntry'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format or **nodeBodyCopy** is invalid
        '401':
          description: Authentication failed          
        '403':
          description: Current user does not have permission to copy **nodeId**
        '404':
          description: |
            **nodeId** does not exist
        '409':
          description: New name clashes with an existing node in the destination parent folder
        '422':
          description: Model integrity exception including a file name containing invalid characters
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/lock':
    post:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: Lock a node
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Places a lock on node **nodeId**.
        
        **Note:** you can only lock files. More specifically, a node can only be locked if it is
        of type `cm:content` or a subtype of `cm:content`.

        The lock is owned by the current user, and prevents other users or processes from making updates to the node until the lock is released.
          
        If the **timeToExpire** is not set or is zero, then the lock never expires.  Otherwise, the **timeToExpire** is the number of seconds before the lock expires.  

        When a lock expires, the lock is released.

        If the node is already locked, and the user is the lock owner, then the lock is renewed with the new **timeToExpire**.        

        By default, a lock is applied that allows the owner to update or delete the node.
        You can use **type** to change the lock type to one of the following: 
        * **ALLOW_OWNER_CHANGES** (default) changes to the node can be made only by the lock owner. This enum is the same value as the deprecated WRITE_LOCK described in `org.alfresco.service.cmr.lock.LockType` in the Alfresco Public Java API. This is the default value.
        * **FULL** no changes by any user are allowed. This enum is the same value as the deprecated READ_ONLY_LOCK described in `org.alfresco.service.cmr.lock.LockType` in the Alfresco Public Java API.

        By default, a lock is persisted in the database. You can create a volatile in-memory lock by setting the **lifetime** property to EPHEMERAL.
        You might choose use EPHEMERAL locks, for example, if you are taking frequent short-term locks that you don't need 
        to be kept over a restart of the repository. In this case you don't need the 
        overhead of writing the locks to the database.
        
        If a lock on the node cannot be taken, then an error is returned.
                
      operationId: lockNode
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/nodeEntryIncludeParam'
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: nodeBodyLock
          description: Lock details.
          required: true
          schema:
            $ref: '#/definitions/NodeBodyLock'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/NodeEntry'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format, or **nodeBodyLock** is invalid,
            or a lock was attempted on a node that is not a file
        '401':
          description: Authentication failed          
        '403':
          description: |
            Current user does not have permission to lock **nodeId**
        '404':
          description: |
            **nodeId** does not exist
        '422':
          description: |
            **nodeId** could not be locked
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/unlock':
    post:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary:  Unlock a node
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Deletes a lock on node **nodeId**.

        The current user must be the owner of the locks or have admin rights, otherwise an error is returned.

        If a lock on the node cannot be released, then an error is returned.

      operationId: unlockNode
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/nodeEntryIncludeParam'
        - $ref: '#/parameters/fieldsParam'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/NodeEntry'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format
        '401':
          description: Authentication failed         
        '403':
          description: |
            Current user does not have permission to unlock **nodeId**
        '404':
          description: |
            **nodeId** does not exist
        '422':
          description: |
            **nodeId** could not be unlocked
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/move':
    post:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: Move a node
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Move the node **nodeId** to the parent folder node **targetParentId**.

        The **targetParentId** is specified in the in request body.

        The moved node retains its name unless you specify a new **name** in the request body.

        If the source **nodeId** is a folder, then its children are also moved.
        
        The move will effectively change the primary parent.
      operationId: moveNode
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/nodeEntryIncludeParam'
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: nodeBodyMove
          description: The targetParentId and, optionally, a new name which should include the file extension.
          required: true
          schema:
            $ref: '#/definitions/NodeBodyMove'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/NodeEntry'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format, or **targetParentId** is not a folder,
            or **nodeBodyMove** is invalid
        '401':
          description: Authentication failed          
        '403':
          description: Current user does not have permission to move **nodeId**
        '404':
          description: |
            **nodeId** does not exist
        '409':
          description: New name clashes with an existing node in the destination parent folder
        '422':
          description: Model integrity exception including a file name containing invalid characters
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/content':
    get:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: Get node content
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets the content of the node with identifier **nodeId**.
      operationId: getNodeContent
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/attachmentParam'
        - $ref: '#/parameters/ifModifiedSinceHeader'
      responses:
        '200':
          description: Successful response
        '304':
          description: Content has not been modified since the date provided in the If-Modified-Since header
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format, or is not a file
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission to retrieve content of **nodeId**
        '404':
          description: |
            **nodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    put:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: Update node content
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Updates the content of the node with identifier **nodeId**.

        The request body for this endpoint can be any text or binary stream.

        The **majorVersion** and **comment** parameters can be used to control versioning behaviour. If the content is versionable,
        a new minor version is created by default.
        
        Optionally a new **name** parameter can also be specified that must be unique within the parent folder. If specified and valid then this 
        will rename the node. If invalid then an error is returned and the content is not updated.

        **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: updateNodeContent
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - 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/nodeEntryIncludeParam'
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: contentBodyUpdate
          description: The binary content
          required: true
          schema:
            type: string
            format: binary
      produces:
        - application/json
      consumes:
        - application/octet-stream
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/NodeEntry'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format, or is not a file
        '401':
          description: Authentication failed          
        '403':
          description: Current user does not have permission to update **nodeId**
        '404':
          description: |
            **nodeId** 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':
          description: Model integrity exception including a file name containing invalid characters
        '507':
          description: Content exceeds overall storage quota limit configured for the network/system
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/renditions':
    post:
      x-alfresco-since: "5.2"
      tags:
        - renditions
      summary: Create rendition
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        An asynchronous request to create a rendition for file **nodeId**.

        The rendition is specified by name **id** in the request body:
        ```JSON
        {
          "id":"doclib"
        }
        ```
      operationId: createRendition
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - in: body
          name: renditionBodyCreate
          description: The rendition "id".
          required: true
          schema:
            $ref: '#/definitions/RenditionBodyCreate'
      consumes:
        - application/json
      responses:
        '202':
          description: Request accepted
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format or is not a file
            or **renditionBodyCreate** is invalid
        '401':
          description: Authentication failed          
        '403':
          description: Current user does not have permission for **nodeId**
        '404':
          description: |
            **nodeId** does not exist
        '409':
          description: Rendition already exists
        '501':
          description: Renditions/thumbnails are disabled for the system
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    get:
      x-alfresco-since: "5.2"
      tags:
        - renditions
      summary: List renditions
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets a list of the rendition information for each rendition of the the file **nodeId**, including the rendition id.
      
        Each rendition returned has a **status**: CREATED means it is available to view or download, NOT_CREATED means the rendition can be requested.
      
        You can use the **where** parameter to filter the returned renditions by **status**. For example, the following **where** 
        clause will return just the CREATED renditions:
          
        ```
        (status='CREATED')
        ```
        
      operationId: listRenditions
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/whereParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/RenditionPaging'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format or is not a file
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission for **nodeId**
        '404':
          description: |
            **nodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/renditions/{renditionId}':
    get:
      x-alfresco-since: "5.2"
      tags:
        - renditions
      summary: Get rendition information
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets the rendition information for **renditionId** of file **nodeId**.
      operationId: getRendition
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/renditionIdParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/RenditionEntry'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format, or is not a file, or **renditionId** is invalid
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission for **nodeId**
        '404':
          description: |
            **nodeId** or **renditionId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/renditions/{renditionId}/content':
    get:
      x-alfresco-since: "5.2"
      tags:
        - renditions
      summary: Get rendition content
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets the rendition content for **renditionId** of file **nodeId**.
      operationId: getRenditionContent
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/renditionIdParam'
        - $ref: '#/parameters/attachmentParam'
        - $ref: '#/parameters/ifModifiedSinceHeader'
        - name: placeholder
          in: query
          description: |
            If **true** and there is no rendition for this **nodeId** and **renditionId**, 
            then the placeholder image for the mime type of this rendition is returned, rather 
            than a 404 response.
          required: false
          type: boolean
          default: false
      responses:
        '200':
          description: Successful response
        '304':
          description: Content has not been modified since the date provided in the If-Modified-Since header
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format, or is not a file, or **renditionId** is invalid
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission for **nodeId**
        '404':
          description: |
            **nodeId** or **renditionId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/secondary-children':
    post:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: Create secondary child
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Create a secondary child association, with the given association type, between the parent **nodeId** and a child node.
        
        **Note:** You can create more than one secondary child association by 
        specifying a list of associations in the JSON body like this:
        
        ```JSON
        [
          {
            "childId": "string",
            "assocType": "string"
          },
          {
            "childId": "string",
            "assocType": "string"
          }
        ]
        ```
        If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example:
        
        ```JSON
        {
          "list": {
            "pagination": {
              "count": 2,
              "hasMoreItems": false,
              "totalItems": 2,
              "skipCount": 0,
              "maxItems": 100
            },
            "entries": [
              {
                "entry": {
                  ...
                }
              },
              {
                "entry": {
                  ...
                }
              }
            ]
          }
        }
        ```
      operationId: createSecondaryChildAssocation
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeParentIdParam'
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: secondaryChildAssociationBodyCreate
          description: The child node id and assoc type.
          required: true
          schema:
            $ref: '#/definitions/ChildAssociationBody'
      responses:
        '201':
          description: Successful response
          schema:
            $ref: '#/definitions/ChildAssociationEntry'
        '400':
          description: |
            Invalid parameter: **assocType** is unknown, or the **nodeId** is not a valid format,
            or **secondaryChildAssociationBodyCreate** invalid
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission to create secondary children of **nodeId**
        '404':
          description: Parent **nodeId** or **childId** does not exist
        '409':
          description: An association of this assoc type already exists between these two nodes
        '422':
          description: Model integrity exception
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    get:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: List secondary children
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets a list of secondary child nodes that are associated with the current parent **nodeId**, via a secondary child association.
      operationId: listSecondaryChildren
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeParentIdWithAliasParam'
        - name: where
          in: query
          description: |
            Optionally filter the list by assocType. Here's an example:

            *   where=(assocType='my:specialAssocType')
          required: false
          type: string          
        - $ref: '#/parameters/nodeAssocMinimalEntryIncludeParam'
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/includeSourceParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/NodeChildAssociationPaging'
        '400':
          description: |
            Invalid parameter: **assocType** is unknown or the **nodeId** is not a valid format
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission for **nodeId**
        '404':
          description: Parent **nodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/secondary-children/{childId}':
    delete:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: Delete secondary child or children
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Delete secondary child associations between the parent **nodeId** and child nodes for the given association type.
        
        If the association type is **not** specified, then all secondary child associations, of any type in the direction 
        from parent to secondary child, will be deleted. The child will still have a primary parent and may still be
        associated as a secondary child with other secondary parents.
      operationId: deleteSecondaryChildAssocation
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeParentIdParam'
        - name: childId
          in: path
          description: The identifier of a child node.
          required: true
          type: string
        - name: assocType
          in: query
          description: Only delete associations of this type.
          type: string
          required: false 
      responses:
        '204':
          description: Successful response
        '400':
          description: |
            Invalid parameter: **assocType** is unknown or you are trying to delete a primary **assocType**. 
            Use delete node instead
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission for **nodeId**
        '404':
          description: Parent **nodeId** or **childId** does not exist (with given assocType, if specified)
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'              
  '/nodes/{nodeId}/parents':
    get:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: List parents
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets a list of parent nodes that are associated with the current child **nodeId**.
        
        The list includes both the primary parent and any secondary parents.
      operationId: listParents
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeChildIdWithAliasParam'
        - name: where
          in: query
          description: |
            Optionally filter the list by **assocType** and/or **isPrimary**. Here are some example filters:

            *   ```where=(assocType='my:specialAssocType')```
            
            *   ```where=(isPrimary=true)```
            
            *   ```where=(isPrimary=false and assocType='my:specialAssocType')```
          required: false
          type: string 
        - $ref: '#/parameters/nodeAssocMinimalEntryIncludeParam'
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/includeSourceParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/NodeAssociationPaging'
        '400':
          description: |
            Invalid parameter: **assocType** is unknown or the **nodeId** is not a valid format
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission for **nodeId**
        '404':
          description: Child **nodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'     
  '/nodes/{nodeId}/targets':
    post:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: Create node association
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Create an association, with the given association type, between the source **nodeId** and a target node.
        
        **Note:** You can create more than one association by
        specifying a list of associations in the JSON body like this:
        
        ```JSON
        [
          {
             "targetId": "string",
             "assocType": "string"
          },
          {
            "targetId": "string",
            "assocType": "string"
          }
        ]
        ```
        If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example:
        
        ```JSON
        {
          "list": {
            "pagination": {
              "count": 2,
              "hasMoreItems": false,
              "totalItems": 2,
              "skipCount": 0,
              "maxItems": 100
            },
            "entries": [
              {
                "entry": {
                  ...
                }
              },
              {
                "entry": {
                  ...
                }
              }
            ]
          }
        }
        ```
      operationId: createAssocation
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeSourceIdParam'
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: associationBodyCreate
          description: The target node id and assoc type.
          required: true
          schema:
            $ref: '#/definitions/AssociationBody'
      responses:
        '201':
          description: Successful response
          schema:
            $ref: '#/definitions/AssociationEntry'
        '400':
          description: |
            Invalid parameter: **assocType** is unknown, or the **nodeId** is not a valid format,
            or **associationBodyCreate** invalid
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission for **nodeId**
        '404':
          description: Source **nodeId** or **targetId** does not exist
        '409':
          description: An association of this assoc type already exists between these two nodes
        '422':
          description: Model integrity exception
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    get:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: List target associations
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets a list of target nodes that are associated with the current source **nodeId**.
      operationId: listTargetAssociations
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeSourceIdParam'
        - name: where
          in: query
          description: |
            Optionally filter the list by **assocType**. Here's an example:

            *   ```where=(assocType='my:specialAssocType')```
          required: false
          type: string 
        - $ref: '#/parameters/nodeAssocMinimalEntryIncludeParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/NodeAssociationPaging'
        '400':
          description: |
            Invalid parameter: **assocType** is unknown or the **nodeId** is not a valid format
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission for **nodeId**
        '404':
          description: Source **nodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'            
  '/nodes/{nodeId}/targets/{targetId}':
    delete:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: Delete node association(s)
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Delete an association, or associations, from the source **nodeId* to a target node for the given association type.
        
        If the association type is **not** specified, then all peer associations, of any type, in the direction 
        from source to target, are deleted.
        
        **Note:** After removal of the peer association, or associations, from source to target, the two nodes may still have peer associations
        in the other direction.
      operationId: deleteAssocation
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeSourceIdParam'
        - name: targetId
          in: path
          description: The identifier of a target node.
          required: true
          type: string
        - name: assocType
          in: query
          description: Only delete associations of this type.
          type: string
          required: false 
      responses:
        '204':
          description: Successful response
        '400':
          description: |
            Invalid parameter: **assocType** is unknown, or the **nodeId** is not a valid format, or **targetId** is invalid
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission for **nodeId**
        '404':
          description: Source **nodeId** or **targetId** does not exist (with given assocType, if specified)
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/sources':
    get:
      x-alfresco-since: "5.2"
      tags:
        - nodes
      summary: List source associations
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets a list of source nodes that are associated with the current target **nodeId**.
      operationId: listSourceAssociations
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeTargetIdParam'
        - name: where
          in: query
          description: |
            Optionally filter the list by **assocType**. Here's an example:

            *   ```where=(assocType='my:specialAssocType')```
          required: false
          type: string
        - $ref: '#/parameters/nodeAssocMinimalEntryIncludeParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/NodeAssociationPaging'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format or **assocType** is unknown
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission for **nodeId**
        '404':
          description: Target **nodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/versions':
    get:
      x-alfresco-since: "5.2"
      tags:
        - versions
      summary: List version history
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets the version history as an ordered list of versions for the specified **nodeId**.
        
        The list is ordered in descending modified order. So the most recent version is first and 
        the original version is last in the list. 
      operationId: listVersionHistory
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/versionMinimalEntryIncludeParam'
        - $ref: '#/parameters/fieldsParam'
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/VersionPaging'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format            
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission for **nodeId**
        '404':
          description: Target **nodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'  
  '/nodes/{nodeId}/versions/{versionId}':
    get:
      x-alfresco-since: "5.2"
      tags:
        - versions
      summary: Get version information
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets the version information for **versionId** of file node **nodeId**.
      operationId: getVersion
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/versionIdParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/VersionEntry'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format, or it exists but does not identify a file, or **versionId** is invalid
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission for **nodeId**
        '404':
          description: |
            **nodeId** or **versionId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'     
    delete:
      x-alfresco-since: "5.2"
      tags:
        - versions
      summary: Delete a version
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Delete the version identified by **versionId** and **nodeId*.
        
        If the version is successfully deleted then the content and metadata for that versioned node
        will be deleted and will no longer appear in the version history. This operation cannot be undone.
        
        If the most recent version is deleted the live node will revert to the next most recent version.
        
        We currently do not allow the last version to be deleted. If you wish to clear the history then you
        can remove the "cm:versionable" aspect (via update node) which will also disable versioning. In this
        case, you can re-enable versioning by adding back the "cm:versionable" aspect or using the version 
        params (majorVersion and comment) on a subsequent file content update.
      operationId: deleteVersion
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/versionIdParam'
      responses:
        '204':
          description: Successful response
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format, or exists but does not identify a file, or **versionId** is invalid     
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission to delete the versioned node
        '404':
          description: |
            **nodeId** or **versionId** does not exist
        '422':
          description: Cannot delete the last remaining version  
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'        
  '/nodes/{nodeId}/versions/{versionId}/content':
    get:
      x-alfresco-since: "5.2"
      tags:
        - versions
      summary: Get version content
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets the version content for **versionId** of file node **nodeId**.
      operationId: getVersionContent
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/versionIdParam'
        - $ref: '#/parameters/attachmentParam'
        - $ref: '#/parameters/ifModifiedSinceHeader'
      responses:
        '200':
          description: Successful response
        '304':
          description: Content has not been modified since the date provided in the If-Modified-Since header
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format, or is not a file, or **versionId** is invalid
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission for **nodeId**
        '404':
          description: |
            **nodeId** or **versionId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/nodes/{nodeId}/versions/{versionId}/revert':
    post:
      x-alfresco-since: "5.2"
      tags:
        - versions
      summary: Revert a version
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Attempts to revert the version identified by **versionId** and **nodeId** to the live node.
        
        If the node is successfully reverted then the content and metadata for that versioned node
        will be promoted to the live node and a new version will appear in the version history.
      operationId: revertVersion
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/versionIdParam'
        - $ref: '#/parameters/fieldsParam'        
        - in: body
          name: revertBody
          description: Optionally, specify a version comment and whether this should be a major version, or not.
          required: true
          schema:
            $ref: '#/definitions/RevertBody'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/VersionEntry'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format, or it exists 
            but does not identify a file, or **versionId** is invalid,
            or **revertBody** invalid          
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission to revert the versioned node
        '404':
          description: |
            **nodeId** or **versionId** does not exist
        '422':
          description: Model integrity exception trying to revert the node
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'                                           
  '/deleted-nodes':
    get:
      x-alfresco-since: "5.2"
      tags:
        - trashcan
      summary: List deleted nodes
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets a list of deleted nodes for the current user.

        If the current user is an administrator deleted nodes for all users will be returned.

        The list of deleted nodes will be ordered with the most recently deleted node at the top of the list.
      operationId: listDeletedNodes
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/nodeMinimalEntryIncludeParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/DeletedNodesPaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems** or **skipCount** is invalid
        '401':
          description: Authentication failed            
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/deleted-nodes/{nodeId}':
    get:
      x-alfresco-since: "5.2"
      tags:
        - trashcan
      summary: Get a deleted node
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets the specific deleted node **nodeId**.
      operationId: getDeletedNode
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/nodeEntryIncludeParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/DeletedNodeEntry'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format
        '401':
          description: Authentication failed
        '403':
          description: User does not have permission to view the deleted node
        '404':
          description: |
            **nodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    delete:
      x-alfresco-since: "5.2"
      tags:
        - trashcan
      summary: Permanently delete a deleted node
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Permanently deletes the deleted node **nodeId**.
      operationId: deleteDeletedNode
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeIdParam'
      responses:
        '204':
          description: Successful response
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format          
        '401':
          description: Authentication failed
        '403':
          description: User does not have permission to permanently delete the deleted node
        '404':
          description: |
            **nodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/deleted-nodes/{nodeId}/restore':
    post:
      x-alfresco-since: "5.2"
      tags:
        - trashcan
      summary: Restore a deleted node
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Attempts to restore the deleted node **nodeId** to its original location.
        
        If the node is successfully restored to its former primary parent, then only the 
        primary child association will be restored, including recursively for any primary 
        children. It should be noted that no other secondary child associations or peer 
        associations will be restored, for any of the nodes within the primary parent-child 
        hierarchy of restored nodes, irrespective of whether these associations were to 
        nodes within or outside of the restored hierarchy. 
        
        Also, any previously shared link will not be restored since it is deleted at the time 
        of delete of each node.
      operationId: restoreDeletedNode
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/nodeIdParam'
        - $ref: '#/parameters/fieldsParam'        
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/NodeEntry'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format             
        '401':
          description: Authentication failed
        '403':
          description: User does not have permission to restore the deleted node
        '404':
          description: |
            **nodeId** does not exist or the restore destination parent node no longer exists
        '409':
          description: Node name already exists in the restore destination
        '422':
          description: Model integrity exception trying to restore the node
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/people':
    post:
      x-alfresco-since: "5.2"
      tags:
        - people
      summary: Create person
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Create a person.
        
        If applicable, the given person's login access can also be optionally disabled.
        
        You must have admin rights to create a person.

        You can set custom properties when you create a person:
        ```JSON
        {
          "id": "abeecher",
          "firstName": "Alice",
          "lastName": "Beecher",
          "email": "abeecher@example.com",
          "password": "secret",
          "properties":
          {
            "my:property": "The value"
          }
        }
        ```
        **Note:** setting properties of type d:content and d:category are not supported.
      operationId: createPerson
      parameters:
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: personBodyCreate
          description: The person details.
          required: true
          schema:
            $ref: '#/definitions/PersonBodyCreate'
      consumes:
        - application/json
      responses:
        '201':
          description: Successful response
          schema:
            $ref: '#/definitions/PersonEntry'
        '400':
          description: |
            Invalid parameter: **personBodyCreate** is invalid
        '401':
          description: Authentication failed          
        '403':
          description: Current user does not have permission to create a person
        '409':
          description: Person within given *id* already exists
        '422':
          description: Model integrity exception          
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    get:
      x-alfresco-since: "5.2"
      tags:
        - people
      summary: List people
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.
        
        List people.
        
        You can use the **include** parameter to return any additional information.

        The default sort order for the returned list is for people to be sorted by ascending id.
        You can override the default by using the **orderBy** parameter.

        You can use any of the following fields to order the results:
        * id
        * firstName
        * lastName
      operationId: listPeople
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/orderByParam'
        - $ref: '#/parameters/personMinimalEntryIncludeParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/PersonPaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems**, **skipCount** or **orderBy** is invalid
        '401':
          description: Authentication failed
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/people/{personId}':
    get:
      tags:
        - people
      summary: Get a person
      description: |
        Gets information for the person **personId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: getPerson
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/PersonEntry'
        '401':
          description: Authentication failed
        '404':
          description: |
            **personId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    put:
      x-alfresco-since: "5.2"
      tags:
        - people
      summary: Update person
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Update the given person's details.
        
        If applicable, the given person's login access can also be optionally disabled or re-enabled.
        
        You must have admin rights to update a person — unless updating your own details.
        
        If you are changing your password, as a non-admin user, then the existing password must also
        be supplied (using the oldPassword field in addition to the new password value).
        
        Admin users cannot be disabled by setting enabled to false.
        
        Non-admin users may not disable themselves.

        You can set custom properties when you update a person:
        ```JSON
        {
          "firstName": "Alice",
          "properties":
          {
            "my:property": "The value"
          }
        }
        ```
        **Note:** setting properties of type d:content and d:category are not supported.
      operationId: updatePerson
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: personBodyUpdate
          description: The person details.
          required: true
          schema:
            $ref: '#/definitions/PersonBodyUpdate'
      consumes:
        - application/json
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/PersonEntry'
        '400':
          description: |
            Invalid parameter: the update request is invalid or **personId** is not a valid format or **personBodyUpdate** is invalid
        '401':
          description: Authentication failed          
        '403':
          description: Current user does not have permission to update a person
        '404':
          description: |
            **personId** does not exist
        '422':
          description: Model integrity exception            
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'            
  '/people/{personId}/activities':
    get:
      tags:
        - activities
      summary: List activities
      description: |
        Gets a list of activities for person **personId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: listActivitiesForPerson
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - name: who
          in: query
          description: |
            A filter to include the user's activities only `me`, other user's activities only `others`'
          required: false
          type: string
        - name: siteId
          in: query
          description: Include only activity feed entries relating to this site.
          required: false
          type: string
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/ActivityPaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems**, **skipCount**, or **who** is invalid
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have access to the activities for **personId**
        '404':
          description: |
            **personId** or **siteId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/people/{personId}/favorite-sites':
    get:
      deprecated: true
      tags:
        - favorites
      summary: List favorite sites
      description: |
        **Note:** this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future.
        Use `/people/{personId}/favorites` instead.

        Gets a list of a person's favorite sites.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: listFavoriteSitesForPerson
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SitePaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems** or **skipCount** is invalid
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have access to the favorite sites for **personId**
        '404':
          description: |
            **personId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    post:
      deprecated: true
      tags:
        - favorites
      summary: Create a site favorite
      description: |
        **Note:** this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future.
        Use `/people/{personId}/favorites` instead.

        Create a site favorite for person **personId**.

        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
        
         **Note:** You can favorite more than one site by 
        specifying a list of sites in the JSON body like this:
        
        ```JSON
        [
          {
            "id": "test-site-1"
          },
          {
            "id": "test-site-2"
          }
        ]
        ```
        If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example:
        
        ```JSON
        {
          "list": {
            "pagination": {
              "count": 2,
              "hasMoreItems": false,
              "totalItems": 2,
              "skipCount": 0,
              "maxItems": 100
            },
            "entries": [
              {
                "entry": {
                  ...
                }
              },
              {
                "entry": {
                  ...
                }
              }
            ]
          }
        }
        ```
      operationId: createSiteFavorite
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/fieldsParam'        
        - in: body
          name: favoriteSiteBodyCreate
          description: The id of the site to favorite.
          required: true
          schema:
            $ref: '#/definitions/FavoriteSiteBodyCreate'
      responses:
        '201':
          description: Successful response
          schema:
            $ref: '#/definitions/FavoriteSiteEntry'
        '400':
          description: |
            Invalid parameter: **favoriteSiteBodyCreate** is invalid
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have access to the favorite sites for **personId**
        '404':
          description: |
            **personId** does not exist
        '409':
          description: |
            **id** is already a site favorite
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/people/{personId}/favorite-sites/{siteId}':
    get:
      deprecated: true
      tags:
        - favorites
      summary: Get a favorite site
      description: |
        **Note:** this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future.
        Use `/people/{personId}/favorites/{favoriteId}` instead.

        Gets information on favorite site **siteId** of person **personId**.

        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: getFavoriteSite
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/siteIdParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SiteEntry'
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have access to the favorite sites for **personId**
        '404':
          description: |
            **personId** or **siteId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    delete:
      deprecated: true
      tags:
        - favorites
      summary: Delete a site favorite
      description: |
        **Note:** this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future.
        Use `/people/{personId}/favorites/{favoriteId}` instead.

        Deletes site **siteId** from the favorite site list of person **personId**.

        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: deleteSiteFavorite
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/siteIdParam'
      responses:
        '204':
          description: Successful response
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have access to the favorite sites for **personId**
        '404':
          description: |
            **personId** or **siteId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/people/{personId}/favorites':
    get:
      tags:
        - favorites
      summary: List favorites
      description: |
        Gets a list of favorites for person **personId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
        
        You can use the **where** parameter to restrict the list in the response
        to entries of a specific kind. The **where** parameter takes a value.
        The value is a single predicate that can include one or more **EXISTS**
        conditions. The **EXISTS** condition uses a single operand to limit the
        list to include entries that include that one property. The property values are:

        *   `target/file`
        *   `target/folder`
        *   `target/site`

        For example, the following **where** parameter restricts the returned list to the file favorites for a person:

        ```SQL
        (EXISTS(target/file))
        ```
        You can specify more than one condition using **OR**. The predicate must be enclosed in parentheses.


        For example, the following **where** parameter restricts the returned list to the file and folder favorites for a person:

        ```SQL
        (EXISTS(target/file) OR EXISTS(target/folder))
        ```
      operationId: listFavorites
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/whereParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/FavoritePaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems**, **skipCount**, or **where** is invalid
        '401':
          description: Authentication failed
        '404':
          description: |
            **personId** does not exist or the current user does not have permission to access the favorites of **personId**
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    post:
      tags:
        - favorites
      summary: Create a favorite
      description: |
        Favorite a **site**, **file**, or **folder** in the repository.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
        
        **Note:** You can favorite more than one entity by 
        specifying a list of objects in the JSON body like this:
        
        ```JSON
        [
          {
               "target": {
                  "file": {
                     "guid": "abcde-01234-...."
                  }
               }
           },
           {
               "target": {
                  "file": {
                     "guid": "abcde-09863-...."
                  }
               }
           },
        ]
        ```
        If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example:
        
        ```JSON
        {
          "list": {
            "pagination": {
              "count": 2,
              "hasMoreItems": false,
              "totalItems": 2,
              "skipCount": 0,
              "maxItems": 100
            },
            "entries": [
              {
                "entry": {
                  ...
                }
              },
              {
                "entry": {
                  ...
                }
              }
            ]
          }
        }
        ```
      operationId: createFavorite
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/fieldsParam'        
        - in: body
          name: favoriteBodyCreate
          description: |      
            An object identifying the entity to be favorited. 
            
            The object consists of a single property which is an object with the name `site`, `file`, or `folder`. 
            The content of that object is the `guid` of the target entity.
            
            For example, to favorite a file the following body would be used:
            
            ```JSON
            {
               "target": {
                  "file": {
                     "guid": "abcde-01234-...."
                  }
               }
            }
            ```
          required: true
          schema:
            $ref: '#/definitions/FavoriteBodyCreate'
      responses:
        '201':
          description: Successful response
          schema:
            $ref: '#/definitions/FavoriteEntry'
        '400':
          description: |
            Invalid parameter: **favoriteBodyCreate** invalid
        '401':
          description: Authentication failed
        '404':
          description: |
            **personId** does not exist, or the target entity does not exist,
            or a favorite already exists with the specified id, or an
            entity exists with the id of the posted object
            but is not of the same type of the posted object
        '409':
          description: The target **guid** has already been favorited            
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/people/{personId}/favorites/{favoriteId}':
    get:
      tags:
        - favorites
      summary: Get a favorite
      description: |
        Gets favorite **favoriteId** for person **personId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: getFavorite
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/favoriteIdParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/FavoriteEntry'
        '401':
          description: Authentication failed
        '404':
          description: |
            **personId** or **favoriteId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    delete:
      tags:
        - favorites
      summary: Delete a favorite
      description: |
        Deletes **favoriteId** as a favorite of person **personId**.

        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: deleteFavorite
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/favoriteIdParam'
      responses:
        '204':
          description: Successful response
        '401':
          description: Authentication failed
        '404':
          description: |
            **personId** or **favoriteId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/people/{personId}/networks':
    get:
      tags:
        - networks
      summary: List network membership
      description: |
        Gets a list of network memberships for person **personId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: listNetworksForPerson
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/PersonNetworkPaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems** or **skipCount** is invalid
        '401':
          description: Authentication failed
        '404':
          description: |
            **personId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/people/{personId}/networks/{networkId}':
    get:
      tags:
        - networks
      summary: Get network information
      description: |
        Gets network information on a single network specified by **networkId** for **personId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: getNetworkForPerson
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/networkIdParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/PersonNetworkEntry'
        '401':
          description: Authentication failed
        '404':
          description: |
            **personId** or **networkId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/people/{personId}/preferences':
    get:
      tags:
        - preferences
      summary: List preferences
      description: |
        Gets a list of preferences for person **personId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
        Note that each preference consists of an **id** and a **value**. 

        The **value** can be of any JSON type.
      operationId: listPreferences
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/PreferencePaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems** or **skipCount** is invalid
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have access to the preferences for **personId**
        '404':
          description: |
            **personId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/people/{personId}/preferences/{preferenceName}':
    get:
      tags:
        - preferences
      summary: Get a preference
      description: |
        Gets a specific preference for person **personId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: getPreference
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - name: preferenceName
          in: path
          description: The name of the preference.
          required: true
          type: string
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/PreferenceEntry'
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have access to the preferences for **personId**
        '404':
          description: |
            **personId** or **preferenceName** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/people/{personId}/site-membership-requests':
    get:
      tags:
        - sites
      summary: List site membership requests
      description: |
        Gets a list of the current site membership requests for person **personId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: listSiteMembershipRequestsForPerson
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SiteMembershipRequestPaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems** or **skipCount** is invalid
        '401':
          description: Authentication failed
        '404':
          description: |
            **personId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    post:
      tags:
        - sites
      summary: Create a site membership request
      description: |
        Create a site membership request for yourself on the site with the identifier of **id**, specified in the JSON body. 
        The result of the request differs depending on the type of site.
        
        * For a **public** site, you join the site immediately as a SiteConsumer.
        * For a **moderated** site, your request is added to the site membership request list. The request waits for approval from the Site Manager.
        * You cannot request membership of a **private** site. Members are invited by the site administrator.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
        
         **Note:** You can create site membership requests for more than one site by 
        specifying a list of sites in the JSON body like this:
        
        ```JSON
        [
          {
            "message": "Please can you add me",
            "id": "test-site-1",
            "title": "Request for test site 1",
          },
          {
            "message": "Please can you add me",
            "id": "test-site-2",
            "title": "Request for test site 2",
          }
        ]
        ```
        If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example:
        
        ```JSON
        {
          "list": {
            "pagination": {
              "count": 2,
              "hasMoreItems": false,
              "totalItems": 2,
              "skipCount": 0,
              "maxItems": 100
            },
            "entries": [
              {
                "entry": {
                  ...
                }
              },
              {
                "entry": {
                  ...
                }
              }
            ]
          }
        }
        ```
      operationId: createSiteMembershipRequestForPerson
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/fieldsParam'        
        - in: body
          name: siteMembershipRequestBodyCreate
          description: Site membership request details
          required: true
          schema:
            $ref: '#/definitions/SiteMembershipRequestBodyCreate'
      responses:
        '201':
          description: Successful response
          schema:
            $ref: '#/definitions/SiteMembershipRequestEntry'
        '400':
          description: |
            Invalid parameter: **id** is invalid, or the user is already invited,
            or **siteMembershipRequestBodyCreate** invalid
        '401':
          description: Authentication failed
        '404':
          description: |
            **personId** or **id** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/people/{personId}/site-membership-requests/{siteId}':
    get:
      tags:
        - sites
      summary: Get a site membership request
      description: |
        Gets the site membership request for site **siteId** for person **personId**, if one exists.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: getSiteMembershipRequestForPerson
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/siteIdParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SiteMembershipRequestEntry'
        '401':
          description: Authentication failed
        '404':
          description: |
            **personId** or **siteId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    put:
      tags:
        - sites
      summary: Update a site membership request
      description: |
        Updates the message for the site membership request to site **siteId** for person **personId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: updateSiteMembershipRequestForPerson
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/siteIdParam'
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: siteMembershipRequestBodyUpdate
          description: The new message to display
          required: true
          schema:
            $ref: '#/definitions/SiteMembershipRequestBodyUpdate'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SiteMembershipRequestEntry'
        '400':
          description: |
            Invalid parameter: **id** is invalid
            or **siteMembershipRequestBodyUpdate** invalid
        '401':
          description: Authentication failed
        '404':
          description: |
            **personId** or **siteId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    delete:
      tags:
        - sites
      summary: Delete a site membership request
      description: |
        Deletes the site membership request to site **siteId** for person **personId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: deleteSiteMembershipRequestForPerson
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/siteIdParam'
      responses:
        '204':
          description: Successful response
        '401':
          description: Authentication failed
        '404':
          description: |
            **personId** or **siteId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/people/{personId}/sites':
    get:
      tags:
        - sites
      summary: List site memberships
      description: |
        Gets a list of site membership information for person **personId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
        
        You can use the **where** parameter to filter the returned sites by **visibility** or site **preset**.

        Example to filter by **visibility**, use any one of:

        ```
        (visibility='PRIVATE')
        (visibility='PUBLIC')
        (visibility='MODERATED')
        ```

        Example to filter by site **preset**:

        ```
        (preset='site-dashboard')
        ```

        The default sort order for the returned list is for sites to be sorted by ascending title.
        You can override the default by using the **orderBy** parameter. You can specify one or more of the following fields in the **orderBy** parameter:
        * id
        * title
        * role
      operationId: listSiteMembershipsForPerson
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/orderByParam'
        - $ref: '#/parameters/relationsParam'
        - $ref: '#/parameters/fieldsParam'
        - $ref: '#/parameters/whereParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SiteRolePaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems**, **skipCount**, **orderBy**, or **where** is invalid
        '401':
          description: Authentication failed
        '404':
          description: |
            **personId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/people/{personId}/sites/{siteId}':
    get:
      tags:
        - sites
      summary: Get a site membership
      description: |
        Gets site membership information for person **personId** on site **siteId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: getSiteMembershipForPerson
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/siteIdParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SiteRoleEntry'
        '401':
          description: Authentication failed
        '404':
          description: |
            **personId** or **siteId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    delete:
      tags:
        - sites
      summary: Delete a site membership
      description: |
        Deletes person **personId** as a member of site **siteId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: deleteSiteMembershipForPerson
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/siteIdParam'
      responses:
        '204':
          description: Successful response
        '401':
          description: Authentication failed
        '404':
          description: |
            **personId** or **siteId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  /sites:
    get:
      tags:
        - sites
      summary: List sites
      description: |
        Gets a list of sites in this repository.

        You can use the **where** parameter to filter the returned sites by **visibility** or site **preset**.

        Example to filter by **visibility**, use any one of:

        ```
        (visibility='PRIVATE')
        (visibility='PUBLIC')
        (visibility='MODERATED')
        ```

        Example to filter by site **preset**:

        ```
        (preset='site-dashboard')
        ```

        The default sort order for the returned list is for sites to be sorted by ascending title.
        You can override the default by using the **orderBy** parameter. You can specify one or more of the following fields in the **orderBy** parameter:
        * id
        * title
        * description

        You can use the **relations** parameter to include one or more related
        entities in a single response and so reduce network traffic.

        The entity types in Alfresco are organized in a tree structure.
        The **sites** entity has two children, **containers** and **members**.
        The following relations parameter returns all the container and member
        objects related to each site:

        ```
        containers,members
        ```
      operationId: listSites
      parameters:
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/orderByParam'
        - $ref: '#/parameters/relationsParam'
        - $ref: '#/parameters/fieldsParam'
        - $ref: '#/parameters/whereParam'
      produces:
        - application/json
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SitePaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems**, **skipCount**, **orderBy**, or **where** is invalid
        '401':
          description: Authentication failed
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    post:
      x-alfresco-since: "5.2"
      tags:
        - sites
      summary: Create a site
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Creates a default site with the given details.  Unless explicitly specified, the site id will be generated
        from the site title. The site id must be unique and only contain alphanumeric and/or dash characters.
        
        Note: the id of a site cannot be updated once the site has been created.

        For example, to create a public site called "Marketing" the following body could be used:
        ```JSON
        {
          "title": "Marketing",
          "visibility": "PUBLIC"
        }
        ```

        The creation of the (surf) configuration files required by Share can be skipped via the **skipConfiguration** query parameter.

        **Note:** if skipped then such a site will **not** work within Share.

        The addition of the site to the user's site favorites can be skipped via the **skipAddToFavorites** query parameter.

        The creator will be added as a member with Site Manager role.
        
        When you create a site, a container called **documentLibrary** is created for you in the new site. 
        This container is the root folder for content stored in the site.

      operationId: createSite
      produces:
        - application/json
      parameters:
        - name: skipConfiguration
          in: query
          description: Flag to indicate whether the Share-specific (surf) configuration files for the site should not be created.
          type: boolean
          default: false
        - name: skipAddToFavorites
          in: query
          description: Flag to indicate whether the site should not be added to the user's site favorites.
          type: boolean
          default: false
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: siteBodyCreate
          description: The site details
          required: true
          schema:
            $ref: '#/definitions/SiteBodyCreate'
      responses:
        '201':
          description: Successful response
          schema:
            $ref: '#/definitions/SiteEntry'
        '400':
          description: |
            Invalid parameter: **id**, **title**, or **description** exceed the maximum length; 
            or **id** contains invalid characters; or **siteBodyCreate** invalid
        '401':
          description: Authentication failed
        '409':
          description: Site with the given identifier already exists
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/sites/{siteId}':
    get:
      tags:
        - sites
      summary: Get a site
      description: |
        Gets information for site **siteId**.

        You can use the **relations** parameter to include one or more related
        entities in a single response and so reduce network traffic.

        The entity types in Alfresco are organized in a tree structure.
        The **sites** entity has two children, **containers** and **members**.
        The following relations parameter returns all the container and member
        objects related to the site **siteId**:

        ```
        containers,members
        ```
      operationId: getSite
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/siteIdParam'
        - $ref: '#/parameters/relationsParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SiteEntry'
        '401':
          description: Authentication failed
        '404':
          description: |
            **siteId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    put:
      x-alfresco-since: "5.2"
      tags:
        - sites
      summary: Update a site
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Update the details for the given site **siteId**. Site Manager or otherwise a 
        (site) admin can update title, description or visibility.
        
        Note: the id of a site cannot be updated once the site has been created.

      operationId: updateSite
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/siteIdParam'
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: siteBodyUpdate
          description: The site information to update.
          required: true
          schema:
            $ref: '#/definitions/SiteBodyUpdate'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SiteEntry'
        '400':
          description: |
            Invalid parameter: **siteBodyUpdate** invalid
        '401':
          description: Authentication failed
        '403':
          description: Current user does not have permission to update the site that is visible to them.
        '404':
          description: |
            **siteId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    delete:
      x-alfresco-since: "5.2"
      tags:
        - sites
      summary: Delete a site
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Deletes the site with **siteId**.
      operationId: deleteSite
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/siteIdParam'
        - name: permanent
          in: query
          description: Flag to indicate whether the site should be permanently deleted i.e. bypass the trashcan.
          type: boolean
          default: false
      responses:
        '204':
          description: Successful response
        '401':
          description: Authentication failed          
        '403':
          description: Current user does not have permission to delete the site that is visible to them.
        '404':
          description: |
            **siteId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'            
  '/sites/{siteId}/containers':
    get:
      tags:
        - sites
      summary: List site containers
      description: Gets a list of containers for the site **siteId**.
      operationId: listSiteContainers
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/siteIdParam'
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SiteContainerPaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems** or **skipCount** is invalid
        '401':
          description: Authentication failed
        '404':
          description: |
            **siteId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/sites/{siteId}/containers/{containerId}':
    get:
      tags:
        - sites
      summary: Get a site container
      description: Gets information on the container **containerId** in site **siteId**.
      operationId: getSiteContainer
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/siteIdParam'
        - name: containerId
          in: path
          description: The unique identifier of a site container.
          required: true
          type: string
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SiteContainerEntry'
        '401':
          description: Authentication failed
        '404':
          description: |
            **siteId** or **containerId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/sites/{siteId}/members':
    get:
      tags:
        - sites
      summary: List site memberships
      description: Gets a list of site memberships for site **siteId**.
      operationId: listSiteMemberships
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/siteIdParam'
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SiteMemberPaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems** or **skipCount** is invalid
        '401':
          description: Authentication failed
        '404':
          description: |
            **siteId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    post:
      tags:
        - sites
      summary: Create a site membership
      description: |
        Creates a site membership for person **personId** on site **siteId**.

        You can set the **role** to one of four types:

        * SiteConsumer
        * SiteCollaborator
        * SiteContributor
        * SiteManager
        
        **Note:** You can create more than one site membership by 
        specifying a list of people in the JSON body like this:
        
        ```JSON
        [
          {
            "role": "SiteConsumer",
            "id": "joe"
          },
          {
            "role": "SiteConsumer",
            "id": "fred"
          }
        ]
        ```
        If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example:
        
        ```JSON
        {
          "list": {
            "pagination": {
              "count": 2,
              "hasMoreItems": false,
              "totalItems": 2,
              "skipCount": 0,
              "maxItems": 100
            },
            "entries": [
              {
                "entry": {
                  ...
                }
              },
              {
                "entry": {
                  ...
                }
              }
            ]
          }
        }
        ```
      operationId: createSiteMembership
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/siteIdParam'
        - $ref: '#/parameters/fieldsParam'        
        - in: body
          name: siteMembershipBodyCreate
          description: The person to add and their role
          required: true
          schema:
            $ref: '#/definitions/SiteMembershipBodyCreate'
      responses:
        '201':
          description: Successful response
          schema:
            $ref: '#/definitions/SiteMemberEntry'
        '400':
          description: |
            Invalid parameter: value of **role** or **id** is invalid
            or **siteMembershipBodyCreate** invalid
        '401':
          description: Authentication failed
        '403':
          description: User does not have permission to invite a person
        '404':
          description: |
            **siteId** or **personId** does not exist
        '409':
          description: Person with this **id** is already a member
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/sites/{siteId}/members/{personId}':
    get:
      tags:
        - sites
      summary: Get a site membership
      description: |
        Gets site membership information for person **personId** on site **siteId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: getSiteMembership
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/siteIdParam'
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SiteMemberEntry'
        '401':
          description: Authentication failed
        '404':
          description: |
            **siteId** or **personId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    put:
      tags:
        - sites
      summary: Update a site membership
      description: |
        Update the membership of person **personId** in site **siteId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
        
        You can set the **role** to one of four types:

        * SiteConsumer
        * SiteCollaborator
        * SiteContributor
        * SiteManager
      operationId: updateSiteMembership
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/siteIdParam'
        - $ref: '#/parameters/personIdParam'
        - $ref: '#/parameters/fieldsParam'        
        - in: body
          name: siteMembershipBodyUpdate
          description: The persons new role
          required: true
          schema:
            $ref: '#/definitions/SiteMembershipBodyUpdate'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SiteMemberEntry'
        '400':
          description: |
            Invalid parameter: **role** does not exist
            or **siteMembershipBodyUpdate** invalid
        '401':
          description: Authentication failed
        '404':
          description: |
            **siteId** or **personId** does not exist
        '422':
          description: Integrity exception (eg. last site member must be a site manager) or not allowed to update member          
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    delete:
      tags:
        - sites
      summary: Delete a site membership
      description: |
        Deletes person **personId** as a member of site **siteId**.
        
        You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
      operationId: deleteSiteMembership
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/siteIdParam'
        - $ref: '#/parameters/personIdParam'
      responses:
        '204':
          description: Successful response
        '401':
          description: Authentication failed
        '404':
          description: |
            **siteId** or **personId** does not exist
        '422':
          description: Integrity exception (eg. last site member must be a site manager) or not allowed to delete member
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  /tags:
    get:
      tags:
        - tags
      summary: List tags
      description: Gets a list of tags in this repository.
      operationId: listTags
      parameters:
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/fieldsParam'
      produces:
        - application/json
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/TagPaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems** or **skipCount** is invalid
        '401':
          description: Authentication failed
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/tags/{tagId}':
    get:
      tags:
        - tags
      summary: Get a tag
      description: Get a specific tag with **tagId**.
      produces:
        - application/json
      operationId: getTag
      parameters:
        - $ref: '#/parameters/tagIdParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/TagEntry'
          examples:
            application/json:
              id: ed2444b5-d0c1-440b-b5b8-34a53e578091
              tag: test tag 1
        '401':
          description: Authentication failed
        '404':
          description: |
            **tagId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    put:
      tags:
        - tags
      summary: Update a tag
      description: Updates the tag **tagId**.
      operationId: updateTag
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/tagIdParam'
        - $ref: '#/parameters/fieldsParam'        
        - in: body
          name: tagBodyUpdate
          description: The updated tag
          required: true
          schema:
            $ref: '#/definitions/TagBody'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/TagEntry'
        '400':
          description: |
            Invalid parameter: **tagBodyUpdate** is invalid
        '401':
          description: Authentication failed         
        '404':
          description: |
            **tagId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/networks/{networkId}':
    get:
      tags:
        - networks
      summary: Get a network
      description: Gets information for a network **networkId**.
      operationId: getNetwork
      parameters:
        - $ref: '#/parameters/networkIdParam'
        - $ref: '#/parameters/fieldsParam'
      produces:
        - application/json
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/PersonNetworkEntry'
        '401':
          description: Authentication failed
        '404':
          description: |
            **networkId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/shared-links':
    post:
      x-alfresco-since: "5.2"
      tags:
        - shared-links
      summary: Create a shared link to a file
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Create a shared link to the file **nodeId** in the request body. Also, an optional expiry date could be set,
        so the shared link would become invalid when the expiry date is reached. For example:

        ```JSON
          {
            "nodeId": "1ff9da1a-ee2f-4b9c-8c34-3333333333",
            "expiresAt": "2017-03-23T23:00:00.000+0000"
          }
        ```

        **Note:** You can create shared links to more than one file 
        specifying a list of **nodeId**s in the JSON body like this:
        
        ```JSON
        [
          {
            "nodeId": "1ff9da1a-ee2f-4b9c-8c34-4444444444"
          },
          {            
            "nodeId": "1ff9da1a-ee2f-4b9c-8c34-5555555555"
          }
        ]
        ```
        If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example:
        
        ```JSON
        {
          "list": {
            "pagination": {
              "count": 2,
              "hasMoreItems": false,
              "totalItems": 2,
              "skipCount": 0,
              "maxItems": 100
            },
            "entries": [
              {
                "entry": {
                  ...
                }
              },
              {
                "entry": {
                  ...
                }
              }
            ]
          }
        }
        ```
      operationId: createSharedLink
      parameters:
        - $ref: '#/parameters/sharedLinkEntryIncludeParam'
        - $ref: '#/parameters/fieldsParam'
        - in: body
          name: sharedLinkBodyCreate
          description: The nodeId to create a shared link for.
          required: true
          schema:
            $ref: '#/definitions/SharedLinkBodyCreate'
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SharedLinkEntry'
        '400':
          description: |
            Invalid parameter: **nodeId** is not a valid format, or does not identify a file,
            or **sharedLinkBodyCreate** invalid, or the specified expiry date is invalid. E.g. the expiry date
            has already passed
        '401':
          description: Authentication failed          
        '403':
          description: Current user does not have permission to create **sharedId** (for example, no read permission)
        '404':
          description: |
            **nodeId** does not exist
        '409':
          description: Shared link already exists for **nodeId**
        '501':
          description: Shared links are disabled for the system
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    get:
      x-alfresco-since: "5.2"
      tags:
        - shared-links
      summary: List shared links
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Get a list of links that the current user has read permission on source node.

        **Note:** The list of links is eventually consistent so newly created shared links may not appear immediately.
      operationId: listSharedLinks
      parameters:
        - name: where
          in: query
          description: Optionally filter the list by "sharedByUser" userid of person who shared the link (can also use -me-)

            *   where=(sharedByUser='jbloggs')

            *   where=(sharedByUser='-me-')

          required: false
          type: string
        - $ref: '#/parameters/sharedLinkEntryIncludeParam'
        - $ref: '#/parameters/fieldsParam'
      produces:
        - application/json
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SharedLinkPaging'
        '401':
          description: Authentication failed            
        '501':
          description: Shared links are disabled for the system
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/shared-links/{sharedId}':
    get:
      x-alfresco-since: "5.2"
      tags:
        - shared-links
      summary: Get a shared link
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets minimal information for the file with shared link identifier **sharedId**.

        **Note:** No authentication is required to call this endpoint.
      operationId: getSharedLink
      parameters:
        - $ref: '#/parameters/sharedIdParam'
        - $ref: '#/parameters/sharedLinkEntryIncludeParam'
        - $ref: '#/parameters/fieldsParam'
      produces:
        - application/json
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SharedLinkEntry'
        '400':
          description: |
            Invalid parameter: **sharedId** is not a valid format
        '404':
          description: |
            **sharedId** does not exist
        '501':
          description: Shared links are disabled for the system
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
    delete:
      x-alfresco-since: "5.2"
      tags:
        - shared-links
      summary: Deletes a shared link
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Deletes the shared link with identifier **sharedId**.
      operationId: deleteSharedLink
      parameters:
        - $ref: '#/parameters/sharedIdParam'
      produces:
        - application/json
      responses:
        '204':
          description: Successful response
        '400':
          description: |
            Invalid parameter: **sharedId** is not a valid format
        '401':
          description: Authentication failed          
        '403':
          description: Current user does not have permission to delete **sharedId**
        '404':
          description: |
            **sharedId** does not exist
        '501':
          description: Shared links are disabled for the system
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/shared-links/{sharedId}/content':
    get:
      x-alfresco-since: "5.2"
      tags:
        - shared-links
      summary: Get shared link content
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets the content of the file with shared link identifier **sharedId**.

        **Note:** No authentication is required to call this endpoint.
      operationId: getSharedLinkContent
      parameters:
        - $ref: '#/parameters/sharedIdParam'
        - $ref: '#/parameters/attachmentParam'
        - $ref: '#/parameters/ifModifiedSinceHeader'
      responses:
        '200':
          description: Successful response
        '304':
          description: Content has not been modified since the date provided in the If-Modified-Since header
        '400':
          description: |
            Invalid parameter: **sharedId** is not a valid format
        '404':
          description: |
            **sharedId** does not exist
        '501':
          description: Shared links are disabled for the system
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/shared-links/{sharedId}/renditions':
    get:
      x-alfresco-since: "5.2"
      tags:
        - shared-links
      summary: List renditions for a shared link
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets a list of the rendition information for the file with shared link identifier **sharedId**.
        
        This API method returns rendition information, including the rendition id, for each rendition
        where the rendition status is CREATED, which means the rendition is available to view/download.
        
        **Note:** No authentication is required to call this endpoint.      
      operationId: listSharedLinkRenditions
      parameters:
        - $ref: '#/parameters/sharedIdParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/RenditionPaging'
        '400':
          description: |
            Invalid parameter: **sharedId** is not a valid format
        '404':
          description: |
            **sharedId** does not exist
        '501':
          description: Shared links are disabled for the system          
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/shared-links/{sharedId}/renditions/{renditionId}':
    get:
      x-alfresco-since: "5.2"
      tags:
        - shared-links
      summary: Get shared link rendition information
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets rendition information for the file with shared link identifier **sharedId**.
        
        This API method returns rendition information where the rendition status is CREATED, 
        which means the rendition is available to view/download.
        
        **Note:** No authentication is required to call this endpoint.      
      operationId: getSharedLinkRendition
      parameters:
        - $ref: '#/parameters/sharedIdParam'
        - $ref: '#/parameters/renditionIdParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/RenditionEntry'
        '400':
          description: |
            Invalid parameter: **sharedId** is not a valid format, or **renditionId** is invalid
        '404':
          description: |
            **sharedId**  or **renditionId** does not exist (ie. not CREATED)
        '501':
          description: Shared links are disabled for the system
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'        
  '/shared-links/{sharedId}/renditions/{renditionId}/content':
    get:
      x-alfresco-since: "5.2"
      tags:
        - shared-links
      summary: Get shared link rendition content
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets the rendition content for file with shared link identifier **sharedId**.

        **Note:** No authentication is required to call this endpoint.
      operationId: getSharedLinkRenditionContent
      parameters:
        - $ref: '#/parameters/sharedIdParam'
        - $ref: '#/parameters/renditionIdParam'
        - $ref: '#/parameters/attachmentParam'
        - $ref: '#/parameters/ifModifiedSinceHeader'
      responses:
        '200':
          description: Successful response
        '304':
          description: Content has not been modified since the date provided in the If-Modified-Since header
        '400':
          description: |
            Invalid parameter: **sharedId** is not a valid format, or **renditionId** is invalid
        '404':
          description: |
            **sharedId** does not exist
        '501':
          description: Shared links are disabled for the system
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/shared-links/{sharedId}/email':
    post:
      x-alfresco-since: "5.2"
      tags:
        - shared-links
      summary: Email shared link
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Sends email with app-specific url including identifier **sharedId**.

        The client and recipientEmails properties are mandatory in the request body. For example, to email a shared link with minimum info:
        ```JSON
        {
            "client": "myClient",
            "recipientEmails": ["john.doe@acme.com", joe.bloggs@acme.com]
        }
        ```
        A plain text message property can be optionally provided in the request body to customise the sent email.
        Also, a locale property can be optionally provided in the request body to send the emails in a particular language.
        For example, to email a shared link with a messages and a locale:
        ```JSON
        {
            "client": "myClient",
            "recipientEmails": ["john.doe@acme.com", joe.bloggs@acme.com],
            "message": "myMessage",
            "locale":"en-GB"
        }
        ```
        **Note:** The client must be registered before you can send a shared link email. See [server documentation]
      operationId: emailSharedLink
      parameters:
        - $ref: '#/parameters/sharedIdParam'
        - in: body
          name: sharedLinkBodyEmail
          description: The shared link email to send.
          required: true
          schema:
            $ref: '#/definitions/SharedLinkBodyEmail'
      consumes:
        - application/json
      responses:
        '202':
          description: Successful response
        '400':
          description: |
            Invalid parameter: **sharedId** is not a valid format
            or **sharedLinkBodyEmail** invalid
        '401':
          description: Authentication failed          
        '404':
          description: |
            **sharedId** does not exist
        '501':
          description: Shared links are disabled for the system
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/queries/nodes':
    get:
      x-alfresco-since: "5.2"
      tags:
        - queries
      summary: Find nodes
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets a list of nodes that match the given search criteria.

        The search term is used to look for nodes that match against name, title, description, full text content or tags.

        The search term:
        - must contain a minimum of 3 alphanumeric characters
        - allows "quoted term"
        - can optionally use '*' for wildcard matching

        By default, file and folder types will be searched unless a specific type is provided as a query parameter.

        By default, the search will be across the repository unless a specific root node id is provided to start the search from.
        
        You can sort the result list using the **orderBy** parameter. You can specify one or more of the following fields in the **orderBy** parameter:
        * name
        * modifiedAt
        * createdAt
      operationId: findNodes
      produces:
        - application/json
      parameters:
        - name: term
          in: query
          description: The term to search for.
          type: string
          required: true
        - name: rootNodeId
          in: query
          description: |
            The id of the node to start the search from.

            Supports the aliases -my-, -root- and -shared-.
          type: string
          required: false
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - name: nodeType
          in: query
          description: |
            Restrict the returned results to only those of the given node type and its sub-types
          type: string
          required: false
        - $ref: '#/parameters/nodeAssocMinimalEntryIncludeParam'
        - $ref: '#/parameters/orderByParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/NodePaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems** or **skipCount** is invalid, or search **term** too short, or **nodeType** unknown, or **orderBy** invalid
        '401':
          description: Authentication failed          
        '404':
          description: |
            **rootNodeId** does not exist
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
  '/queries/sites':
    get:
      x-alfresco-since: "5.2"
      tags:
        - queries
      summary: Find sites
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets a list of sites that match the given search criteria.

        The search term is used to look for sites that match against site id, title or description.

        The search term:
        - must contain a minimum of 2 alphanumeric characters
        - can optionally use '*' for wildcard matching within the term
        
        The default sort order for the returned list is for sites to be sorted by ascending id. 
        You can override the default by using the **orderBy** parameter. You can specify one or more of the following fields in the **orderBy** parameter:
        * id
        * title
        * description
      operationId: findSites
      produces:
        - application/json
      parameters:
        - name: term
          in: query
          description: The term to search for.
          type: string
          required: true
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/orderByParam'
        - $ref: '#/parameters/fieldsParam'
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/SitePaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems** or **skipCount** is invalid, or search **term** too short, or **orderBy** invalid
        '401':
          description: Authentication failed          
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'            
  '/queries/people':
    get:
      x-alfresco-since: "5.2"
      tags:
        - queries
      summary: Find people
      description: |
        **Note:** this endpoint is available in Alfresco 5.2 and newer versions.

        Gets a list of people that match the given search criteria.
        
        The search term is used to look for matches against person id, firstname and lastname.

        The search term:
        - must contain a minimum of 2 alphanumeric characters
        - can optionally use '*' for wildcard matching within the term
        
        You can sort the result list using the **orderBy** parameter. You can specify one or more of the following fields in the **orderBy** parameter:
        * id
        * firstName
        * lastName       
      operationId: findPeople
      produces:
        - application/json
      parameters:
        - name: term
          in: query
          description: | 
            The term to search for.
          type: string
          required: true
        - $ref: '#/parameters/skipCountParam'
        - $ref: '#/parameters/maxItemsParam'
        - $ref: '#/parameters/fieldsParam'
        - $ref: '#/parameters/orderByParam'        
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/PersonPaging'
        '400':
          description: |
            Invalid parameter: value of **maxItems** or **skipCount** is invalid, or search **term** too short, or **orderBy** invalid
        '401':
          description: Authentication failed          
        default:
          description: Unexpected error
          schema:
            $ref: '#/definitions/Error'
definitions:
  Error:
    type: object
    required:
      - error
    properties:
      error:
        type: object
        required:
          - statusCode
          - briefSummary
          - stackTrace
          - descriptionURL
        properties:
          errorKey:
            type: string
          statusCode:
            type: integer
            format: int32
          briefSummary:
            type: string
          stackTrace:
            type: string
          descriptionURL:
            type: string
          logId:
            type: string
  Pagination:
    type: object
    required:
      - count
      - hasMoreItems
      - skipCount
      - maxItems
    properties:
      count:
        type: integer
        format: int64
        description: |
          The number of objects in the entries array.
      hasMoreItems:
        type: boolean
        description: |
          A boolean value which is **true** if there are more entities in the collection
          beyond those in this response. A true value means a request with a larger value
          for the **skipCount** or the **maxItems** parameter will return more entities.
      totalItems:
        type: integer
        format: int64
        description: |
          An integer describing the total number of entities in the collection.
          The API might not be able to determine this value,
          in which case this property will not be present.
      skipCount:
        type: integer
        format: int64
        description: |
          An integer describing how many entities exist in the collection before
          those included in this list.
      maxItems:
        type: integer
        format: int64
        description: |
          The value of the **maxItems** parameter used to generate this list,
          or if there was no **maxItems** parameter the default value is 100
  SiteBodyCreate:
    type: object
    required:
      - title
      - visibility
    properties:
      id:
        type: string
      title:
        type: string
      description:
        type: string
      visibility:
        type: string
        default: PUBLIC
        enum:
          - PUBLIC
          - PRIVATE
          - MODERATED
  SitePaging:
    type: object
    required:
      - list
    properties:
      list:
        type: object
        required:
          - pagination
          - entries
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/SiteEntry'
  SiteEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/Site'
  Site:
    type: object
    required:
      - id
      - guid
      - title
      - visibility
    properties:
      id:
        type: string
      guid:
        type: string
      title:
        type: string
      description:
        type: string
      visibility:
        type: string
        enum:
          - PRIVATE
          - MODERATED
          - PUBLIC
      preset:
        type: string
      role:
        type: string
        enum:
          - SiteConsumer
          - SiteCollaborator
          - SiteContributor
          - SiteManager
  SiteBodyUpdate:
    type: object
    properties:
      title:
        type: string
      description:
        type: string
      visibility:
        type: string
        enum:
          - PRIVATE
          - MODERATED
          - PUBLIC
  SiteContainerPaging:
    type: object
    required:
     - list
    properties:
      list:
        type: object
        required:
          - pagination
          - entries
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/SiteContainerEntry'
  SiteContainerEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/SiteContainer'
  SiteContainer:
    type: object
    required:
      - id
      - folderId
    properties:
      id:
        type: string
      folderId:
        type: string
  SiteMembershipBodyCreate:
    type: object
    required:
      - role
      - id
    properties:
      role:
        type: string
        enum:
        - SiteConsumer
        - SiteCollaborator
        - SiteContributor
        - SiteManager
      id:
        type: string
  SiteMembershipBodyUpdate:
    type: object
    required:
      - role
    properties:
      role:
        type: string
        enum:
        - SiteConsumer
        - SiteCollaborator
        - SiteContributor
        - SiteManager
  SiteMemberPaging:
    type: object
    required:
      - list
    properties:
      list:
        type: object
        required:
          - pagination
          - entries
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/SiteMemberEntry'
  SiteMemberEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/SiteMember'
  SiteMember:
    type: object
    required:
      - id
      - person
      - role
    properties:
      id:
        type: string
      person:
        $ref: '#/definitions/Person'
      role:
        type: string
        enum:
          - SiteConsumer
          - SiteCollaborator
          - SiteContributor
          - SiteManager
  SiteRolePaging:
    type: object
    required:
      - list
    properties:
      list:
        type: object
        required:
          - pagination
          - entries
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/SiteRoleEntry'
  SiteRoleEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/SiteRole'
  SiteRole:
    type: object
    required:
      - site
      - id
      - guid
      - role
    properties:
      site:
        $ref: '#/definitions/Site'
      id:
        type: string
      guid:
        type: string
      role:
        type: string
        enum:
          - SiteConsumer
          - SiteCollaborator
          - SiteContributor
          - SiteManager
  PersonBodyCreate:
    type: object
    required:
      - id
      - firstName
      - email
      - password
    properties:
      id:
        type: string
      firstName:
        type: string
      lastName:
        type: string
      description:
        type: string
      email:
        type: string
      skypeId:
        type: string
      googleId:
        type: string
      instantMessageId:
        type: string
      jobTitle:
        type: string
      location:
        type: string
      company:
        $ref: '#/definitions/Company'
      mobile:
        type: string
      telephone:
        type: string
      userStatus:
        type: string
      enabled:
        type: boolean
        default: true
      emailNotificationsEnabled:
        type: boolean
        default: true                
      password:
        type: string
      aspectNames:
        type: array
        items:
          type: string
      properties:
        type: object
        additionalProperties:
          type: string
  PersonBodyUpdate:
    type: object
    properties:
      firstName:
        type: string
      lastName:
        type: string
      description:
        type: string
      email:
        type: string
      skypeId:
        type: string
      googleId:
        type: string
      instantMessageId:
        type: string
      jobTitle:
        type: string
      location:
        type: string
      company:
        $ref: '#/definitions/Company'
      mobile:
        type: string
      telephone:
        type: string
      userStatus:
        type: string
      enabled:
        type: boolean
      emailNotificationsEnabled:
        type: boolean
      password:
        type: string
      oldPassword:
        type: string
      aspectNames:
        type: array
        items:
          type: string
      properties:
        type: object
        additionalProperties:
          type: string
  PersonPaging:
    type: object
    properties:
      list:
        type: object
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/PersonEntry'
  PersonEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/Person'
  Person:
    type: object
    required:
      - id
      - firstName
      - email
      - enabled
    properties:
      id:
        type: string
      firstName:
        type: string
      lastName:
        type: string
      description:
        type: string
      avatarId:
        type: string
      email:
        type: string
      skypeId:
        type: string
      googleId:
        type: string
      instantMessageId:
        type: string
      jobTitle:
        type: string
      location:
        type: string
      company:
        $ref: '#/definitions/Company'
      mobile:
        type: string
      telephone:
        type: string
      statusUpdatedAt:
        type: string
        format: date-time
      userStatus:
        type: string
      enabled:
        type: boolean
        default: true
      emailNotificationsEnabled:
        type: boolean
        default: true        
      aspectNames:
        type: array
        items:
          type: string
      properties:
        type: object
        additionalProperties:
          type: string
  Company:
    type: object
    properties:
      organization:
        type: string
      address1:
        type: string
      address2:
        type: string
      address3:
        type: string
      postcode:
        type: string
      telephone:
        type: string
      fax:
        type: string
      email:
        type: string
  CommentBody:
    type: object
    required:
      - content
    properties:
      content:
        type: string
  CommentPaging:
    type: object
    required:
      - list
    properties:
      list:
        type: object
        required:
         - pagination
         - entries
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/CommentEntry'
  CommentEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/Comment'
  Comment:
    type: object
    required:
      - id
      - content
      - createdBy
      - createdAt
      - edited
      - modifiedBy
      - modifiedAt
      - canEdit
      - canDelete
    properties:
      id:
        type: string
      content:
        type: string
      createdBy:
        $ref: '#/definitions/Person'
      createdAt:
        type: string
        format: date-time
      edited:
        type: boolean
      modifiedBy:
        $ref: '#/definitions/Person'
      modifiedAt:
        type: string
        format: date-time
      canEdit:
        type: boolean
      canDelete:
        type: boolean
  TagBody:
    type: object
    required:
      - tag
    properties:
      tag:
        type: string
  TagPaging:
    type: object
    required:
      - list
    properties:
      list:
        type: object
        required:
          - pagination
          - entries
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/TagEntry'
  TagEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/Tag'
  Tag:
    type: object
    required:
      - id
      - tag
    properties:
      id:
        type: string
      tag:
        type: string
  PersonNetworkPaging:
    type: object
    required:
      - list
    properties:
      list:
        type: object
        required:
          - pagination
          - entries
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/PersonNetworkEntry'
  PersonNetworkEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/PersonNetwork'
  PersonNetwork:
    type: object
    description: |
      A network is the group of users and sites that belong to an organization.
      Networks are organized by email domain. When a user signs up for an
      Alfresco account , their email domain becomes their Home Network.
    required:
      - id
      - isEnabled
    properties:
      id:
        type: string
        description: This network's unique id
      homeNetwork:
        type: boolean
        description: Is this the home network?
      isEnabled:
        type: boolean
      createdAt:
        type: string
        format: date-time
      paidNetwork:
        type: boolean
      subscriptionLevel:
        type: string
        enum:
          - Free
          - Standard
          - Enterprise
      quotas:
        type: array
        items:
          $ref: '#/definitions/NetworkQuota'
  NetworkQuota:
    type: object
    description: |
      Limits and usage of each quota. A network will have quotas for File space,
      the number of sites in the network, the number of people in the network,
      and the number of network administrators
    required:
      - id
      - limit
      - usage
    properties:
      id:
        type: string
      limit:
        type: integer
        format: int64
      usage:
        type: integer
        format: int64
  RatingBody:
    type: object
    required:
      - id
      - myRating
    properties:
      id:
        type: string
        description: The rating scheme type. Possible values are likes and fiveStar.
        default: likes
        enum:
          - likes
          - fiveStar
      myRating:
        type: string
        description: The rating. The type is specific to the rating scheme, boolean for the likes and an integer for the fiveStar
  RatingPaging:
    type: object
    required:
      - list
    properties:
      list:
        type: object
        required:
          - pagination
          - entries
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/RatingEntry'
  RatingEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/Rating'
  Rating:
    type: object
    description: |
      A person can rate an item of content by liking it. They can also remove
      their like of an item of content. API methods exist to get a list of
      ratings and to add a new rating.
    required:
      - id
      - aggregate
    properties:
      id:
        type: string
      aggregate:
        type: object
        required:
          - numberOfRatings
        properties:
          numberOfRatings:
            type: integer
          average:
            type: integer
      ratedAt:
        type: string
        format: date-time
      myRating:
        type: string
        description: The rating. The type is specific to the rating scheme, boolean for the likes and an integer for the fiveStar.
  FavoriteBodyCreate:
    type: object
    required:
      - target
    properties:
       target:
          type: object
  FavoritePaging:
    type: object
    required:
      - list
    properties:
      list:
        type: object
        required:
          - pagination
          - entries
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/FavoriteEntry'
  FavoriteEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/Favorite'
  Favorite:
    type: object
    description: |
      A favorite describes an Alfresco entity that a person has marked as a favorite.
      The target can be a site, file or folder.
    required:
      - targetGuid
      - target
    properties:
      targetGuid:
        type: string
        description: The guid of the object that is a favorite.
      createdAt:
        type: string
        format: date-time
        description: The time the object was made a favorite.
      target:
        type: object
  FavoriteSiteBodyCreate:
    type: object
    required:
      - id
    properties:
      id:
        type: string
  FavoriteSiteEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/FavoriteSite'
  FavoriteSite:
    type: object
    required:
      - id
    properties:
      id:
        type: string
  ActivityPaging:
    type: object
    required:
      - list
    properties:
      list:
        type: object
        required:
          - pagination
          - entries
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/ActivityEntry'
  ActivityEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/Activity'
  Activity:
    type: object
    description: |
      Activities describe any past activity in a site,
      for example creating an item of content, commenting on a node,
      liking an item of content.
    required:
      - postPersonId
      - id
      - feedPersonId
      - activityType
    properties:
      postPersonId:
        type: string
        description: The id of the person who performed the activity
      id:
        type: integer
        format: int64
        description: The unique id of the activity
      siteId:
        type: string
        description: The unique id of the site on which the activity was performed
      postedAt:
        type: string
        format: date-time
        description: The date time at which the activity was performed
      feedPersonId:
        type: string
        description: The feed on which this activity was posted
      activitySummary:
        type: object
        description: An object summarizing the activity
        additionalProperties:
          type: string
      activityType:
        description: The type of the activity posted
        type: string
  PreferencePaging:
    type: object
    required:
      - list
    properties:
      list:
        type: object
        required:
          - pagination
          - entries
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/PreferenceEntry'
  PreferenceEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/Preference'
  Preference:
    type: object
    description: |
      A specific preference.
    required:
      - id
    properties:
      id:
        type: string
        description: The unique id of the preference
      value:
        type: string        
        description: The value of the preference. Note that this can be of any JSON type.
  SiteMembershipRequestBodyCreate:
    type: object
    required:
      - id
    properties:
      message:
        type: string
      id:
        type: string
      title:
        type: string
  SiteMembershipRequestBodyUpdate:
    type: object
    properties:
      message:
        type: string
  SiteMembershipRequestPaging:
    type: object
    required:
      - list
    properties:
      list:
        type: object
        required:
          - pagination
          - entries
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/SiteMembershipRequestEntry'
  SiteMembershipRequestEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/SiteMembershipRequest'
  SiteMembershipRequest:
    type: object
    required:
      - id
      - createdAt
      - site
    properties:
      id:
        type: string
      createdAt:
        type: string
        format: date-time
      site:
        $ref: '#/definitions/Site'
      message:
        type: string
  UserInfo:
    type: object
    required:
      - displayName
      - id
    properties:
      displayName:
        type: string
      id:
        type: string
  ContentInfo:
    type: object
    required:
      - mimeType
      - mimeTypeName
      - sizeInBytes
    properties:
      mimeType:
        type: string
      mimeTypeName:
        type: string
      sizeInBytes:
        type: integer
      encoding:
        type: string
  AssociationInfo:
    type: object
    required:
      - assocType
    properties:
      assocType:
        type: string
  AssociationBody:
    type: object
    required:
    - targetId
    - assocType
    properties:
      targetId:
        type: string
      assocType:
        type: string
  ChildAssociationInfo:
    type: object
    required:
      - assocType
      - isPrimary
    properties:
      assocType:
        type: string
      isPrimary:
        type: boolean
  ChildAssociationBody:
    type: object
    required:
    - childId
    - assocType
    properties:
      childId:
        type: string
      assocType:
        type: string
  PathElement:
    type: object
    properties:
      id:
        type: string
      name:
        type: string
  PathInfo:
    type: object
    properties:
      elements:
        type: array
        items:
          $ref: '#/definitions/PathElement'
      name:
        type: string
      isComplete:
        type: boolean
  PermissionElement:
    type: object
    properties:
      authorityId:
        type: string
      name:
        type: string
      accessStatus:
        type: string
        default: ALLOWED
        enum:
         - ALLOWED
         - DENIED
  PermissionsInfo:
    type: object
    properties:
      isInheritanceEnabled:
        type: boolean 
      inherited:
        type: array
        items:
          $ref: '#/definitions/PermissionElement'
      locallySet:
        type: array
        items:
          $ref: '#/definitions/PermissionElement'
      settable:
        type: array
        items:
          type: string     
  PermissionsBodyUpdate:
    type: object
    properties:
      isInheritanceEnabled:
        type: boolean 
      locallySet:
        type: array
        items:
          $ref: '#/definitions/PermissionElement'          
  NodeBodyCreate:
    type: object
    required:
      - name
      - nodeType
    properties:
      name:
        type: string
        pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
        description: |
          The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
          The character . must not be used at the end of the name.
      nodeType:
        type: string
      aspectNames:
        type: array
        items:
          type: string
      properties:
        type: object
        additionalProperties:
          type: string
      relativePath:
        type: string
      association:
        type: object
        properties:
          assocType:
            type: string
      secondaryChildren:
        type: array
        items:
          $ref: '#/definitions/ChildAssociationBody'
      targets:
        type: array
        items:
          $ref: '#/definitions/AssociationBody'
  NodeBodyUpdate:
    type: object
    properties:
      name:
        type: string
        pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
        description: |
          The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
          The character . must not be used at the end of the name.
      nodeType:
        type: string
      aspectNames:
        type: array
        items:
          type: string
      properties:
        type: object
        additionalProperties:
          type: string
      permissions:
        $ref: '#/definitions/PermissionsBodyUpdate'
  NodeBodyCopy:
    type: object
    required:
      - targetParentId
    properties:
      targetParentId:
        type: string
      name:
        type: string
        pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
        description: |
          The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
          The character . must not be used at the end of the name.
  NodeBodyMove:
    type: object
    required:
      - targetParentId
    properties:
      targetParentId:
        type: string
      name:
        type: string
        pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
        description: |
          The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
          The character . must not be used at the end of the name.
  NodeBodyLock:
    type: object
    properties:
      timeToExpire:
        type: integer
        minimum: 0
      type:
        type: string
        default: ALLOW_OWNER_CHANGES
        enum:
         - ALLOW_OWNER_CHANGES
         - FULL
      lifetime:
        type: string
        default: PERSISTENT
        enum:
         - PERSISTENT
         - EPHEMERAL
  NodePaging:
    type: object
    properties:
      list:
        type: object
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/NodeEntry'
          source:
            $ref: '#/definitions/Node'
  NodeAssociationPaging:
    type: object
    properties:
      list:
        type: object
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/NodeAssociationEntry'
          source:
            $ref: '#/definitions/Node'
  NodeChildAssociationPaging:
    type: object
    properties:
      list:
        type: object
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/NodeChildAssociationEntry'
          source:
            $ref: '#/definitions/Node'
  NodeAssociationEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/NodeAssociation'
  NodeAssociation:
    allOf:
      - $ref: '#/definitions/Node'
      - type: object
        properties:
          association:
            $ref: '#/definitions/AssociationInfo'
  NodeChildAssociationEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/NodeChildAssociation'
  NodeChildAssociation:
    allOf:
      - $ref: '#/definitions/Node'
      - type: object
        properties:
          association:
            $ref: '#/definitions/ChildAssociationInfo'
  AssociationEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/Association'
  Association:
    type: object
    required:
      - targetId
      - assocType
    properties:
      targetId:
        type: string
      assocType:
        type: string
  ChildAssociationEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/ChildAssociation'
  ChildAssociation:
    type: object
    required:
      - childId
      - assocType
    properties:
      childId:
        type: string
      assocType:
        type: string
  NodeEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/Node'
  Node:
    type: object
    required:
    - id
    - name
    - nodeType
    - isFolder
    - isFile
    - createdAt
    - createdByUser
    - modifiedAt
    - modifiedByUser
    properties:
      id:
        type: string
      name:
        type: string
        pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
        description: |
          The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
          The character . must not be used at the end of the name.
      nodeType:
        type: string
      isFolder:
        type: boolean
      isFile:
        type: boolean
      isLocked:
        type: boolean
        default: false
      modifiedAt:
        type: string
        format: date-time
      modifiedByUser:
        $ref: '#/definitions/UserInfo'
      createdAt:
        type: string
        format: date-time
      createdByUser:
        $ref: '#/definitions/UserInfo'
      parentId:
        type: string
      isLink:
        type: boolean
      content:
        $ref: '#/definitions/ContentInfo'
      aspectNames:
        type: array
        items:
          type: string
      properties:
        type: object
      allowableOperations:
        type: array
        items:
          type: string
      path:
        $ref: '#/definitions/PathInfo'
      permissions:
        $ref: '#/definitions/PermissionsInfo' 
  SharedLinkBodyCreate:
    type: object
    required:
      - nodeId
    properties:
      nodeId:
        type: string
      expiresAt:
        type: string
        format: date-time
  SharedLinkBodyEmail:
    type: object
    properties:
      client:
        type: string
      message:
        type: string
      locale:
        type: string
      recipientEmails:
        type: array
        items:
          type: string
  SharedLinkPaging:
    type: object
    required:
      - list
    properties:
      list:
        type: object
        required:
          - pagination
          - entries
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/SharedLinkEntry'
  SharedLinkEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/SharedLink'
  SharedLink:
    type: object
    properties:
      id:
        type: string
      expiresAt:
        type: string
        format: date-time
      nodeId:
        type: string
      name:
        type: string
        pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
        description: |
          The name must not contain spaces or the following special characters: * " < > \ / ? : and |. 
          The character . must not be used at the end of the name.
      modifiedAt:
        type: string
        format: date-time
      modifiedByUser:
        $ref: '#/definitions/UserInfo'
      sharedByUser:
        $ref: '#/definitions/UserInfo'
      content:
        $ref: '#/definitions/ContentInfo'
      allowableOperations:
        type: array
        items:
          type: string
  RenditionBodyCreate:
    type: object
    required:
      - id
    properties:
      id:
        type: string
  RenditionEntry:
    type: object
    required:
      - entry
    properties:
      entry:
        $ref: '#/definitions/Rendition'
  Rendition:
    type: object
    properties:
      id:
        type: string
      content:
        $ref: '#/definitions/ContentInfo'
      status:
        type: string
        enum:
          - CREATED
          - NOT_CREATED
  RenditionPaging:
    type: object
    properties:
      list:
        type: object
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/RenditionEntry'
  DeletedNodesPaging:
    type: object
    properties:
      list:
        type: object
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/DeletedNodeEntry'
  DeletedNodeEntry:
    type: object
    properties:
      entry:
        $ref: '#/definitions/DeletedNode'
  DeletedNode:
    allOf:
      - $ref: '#/definitions/Node'
      - type: object
        required:
          - archivedByUser
          - archivedAt
        properties:
          archivedByUser:
            $ref: '#/definitions/UserInfo'
          archivedAt:
            type: string
            format: date-time
  RevertBody:
    type: object
    properties:
      majorVersion:
        type: boolean
      comment:
        type: string
  VersionPaging:
    type: object
    properties:
      list:
        type: object
        properties:
          pagination:
            $ref: '#/definitions/Pagination'
          entries:
            type: array
            items:
              $ref: '#/definitions/VersionEntry'
  VersionEntry:
    type: object
    properties:
      entry:
        $ref: '#/definitions/Version'
  Version:
    type: object
    required:
      - id
      - name
      - nodeType
      - isFolder
      - isFile
      - modifiedAt
      - modifiedByUser
    properties:
      id:
        type: string
      versionComment:
        type: string
      name:
        type: string
        pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
        description: |
          The name must not contain spaces or the following special characters: * " < > \ / ? : and |. 
          The character . must not be used at the end of the name.
      nodeType:
        type: string
      isFolder:
        type: boolean
      isFile:
        type: boolean
      modifiedAt:
        type: string
        format: date-time
      modifiedByUser:
        $ref: '#/definitions/UserInfo'
      content:
        $ref: '#/definitions/ContentInfo'
      aspectNames:
        type: array
        items:
          type: string
      properties:
        type: object
        additionalProperties:
            type: string