---
openapi: 3.0.0
info:
  title: Acl
  version: '2.0'
servers:
- url: https://wappsto.com/services/2.0
  description: Server to connect to the API
components:
  schemas:
    Deletelist:
      title: Deletelist
      type: object
      properties:
        deleted:
          type: array
          items:
            type: string
          description: List of deleted objects
        child_deleted:
          type: array
          items:
            type: string
          description: List of deleted children object related to the chosen objects
            to delete
        shared_deleted:
          type: array
          items:
            type: string
          description: List of removed objects previosly shared and accepted by the
            user
        shared_child_deleted:
          type: array
          items:
            type: string
          description: List of removed children objects previosly shared and accepted
            by the user related to the chosen objects to delete
        not_deleted:
          type: array
          items:
            type: string
          description: List of not deleted objects
        child_not_deleted:
          type: array
          items:
            type: string
          description: List of not deleted children object related to the chosen objects
            to delete
        shared_not_deleted:
          type: array
          items:
            type: string
          description: List of not removed objects previosly shared and accepted by
            the user
        shared_child_not_deleted:
          type: array
          items:
            type: string
          description: List of not removed children objects previosly shared and accepted
            by the user related to the chosen objects to delete
        pending:
          type: array
          items:
            type: string
          description: List of objects that will be deleted eventually
        child_pending:
          type: array
          items:
            type: string
          description: List of children objects that will be deleted eventually
        owned_not_deleted_because_it_has_parent:
          type: array
          items:
            type: string
          description: List of owned object not deleted since they have a parent
        shared_not_deleted_because_it_has_parent:
          type: array
          items:
            type: string
          description: List of shared object not deleted since they have a parent
        code:
          type: integer
          description: Code of the deletion
        message:
          type: string
          description: Final status of the deletion
        error:
          type: string
          description: Possible incurred errors
        meta:
          type: object
          description: Meta data of the object
        unsuccessful:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              message:
                type: string
              data:
                type: object
          description: An array that includes a more deep description about the reason
            of unsuccessful deletions
      additionalProperties: false
      description: Output obtained when one or multiple objects are deleted with a
        DELETE request
    Httpresponse:
      title: Httpresponse
      type: object
      properties:
        message:
          type: string
          description: Message of the error
        data:
          type: object
          description: More information about the error
        code:
          type: integer
          description: Identifier code of the error
        service:
          type: string
          description: Service that sent the error
        meta:
          type: object
          description: Meta data of the object
      additionalProperties: false
      description: Output obtain when a fast communication is returned (usually an
        error)
    Idlist:
      title: Idlist
      type: object
      properties:
        id:
          items:
            type: string
            pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
          type: array
          description: Ids found
        more:
          type: boolean
          description: If true, it means that using offset it is possible to retrieve
            other values
        limit:
          type: integer
          multipleOf: 1
          minimum: 1
          description: Limit used to retrieve the ids
        count:
          type: integer
          multipleOf: 1
          minimum: 0
          description: Number of ids returned
        data:
          type: object
          description: Further information in relation of the service
        child:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              version:
                type: string
                pattern: "(\\d+)\\.(\\d+)"
          description: It is an array that gives a brief description of the type and
            the version of the retrieved objects
        meta:
          type: object
      additionalProperties: false
      description: Output obtain when a list is returned
    Fetch:
      title: Fetch
      type: object
      properties:
        filter:
          type: object
        return:
          type: string
          description: A graphQL string that describes the format it needs to be returned
        table:
          type: boolean
          description: If true, use iot table to fetch the data
        data:
          type: object
          description: The output obtained after filtering and parsing the results
            with the GraphQL request
        meta:
          type: object
          description: Meta data of the object
      additionalProperties: false
      description: Output obtained when the input is a fetch request
    Acl:
      title: Acl
      type: object
      properties:
        parent:
          type: object
          description: Meta data of the parent of the given object
          example:
            type: network
            version: '2.0'
        owner:
          type: string
          description: Owner of the selected object
          example: 9ae9318c-d0ed-4e62-b230-680c6f353092
        manufacturer:
          type: string
          pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
        owner_name:
          type: string
          description: Humanly understandable identifer of the owner
          example: user
        shareable:
          type: boolean
          description: If true the object is shareable
          example: true
        permission:
          type: array
          items:
            type: object
          description: Permissions or the restrictions provided to other users
          example:
          - meta:
              id: global
              type: permission
              version: '2.0'
            restriction:
            - method:
                retrieve: true
                update: false
                delete: false
                create: false
            name: global
          - 9c15bb97-8da1-4631-834a-a3cfc03bfa3e
          - a4002073-84af-489b-baff-c6bfac9eb326
        meta:
          type: object
          description: Meta data of the object
          example:
            id: bdc3fd9c-9dac-440c-b9cc-ae7924c5d74a
            type: acl
            version: '2.0'
      additionalProperties: false
      description: An ACL (Access Control List) is assigned to each object owned by
        an user. This service manages the sharing with another user or usergroup.
        It is possible to assign to share the object globally, so that everybody will
        be able to retrieve it. The sharing can have time and method limitations in
        relation of the permissions chosen.
    Permission:
      title: Permission
      type: object
      properties:
        name:
          type: string
          description: Name of the user to whom it is assigned this permission
          example: global
        message:
          type: string
          description: Message that will be sent to the user to whom you provide the
            permission
        temporary:
          type: boolean
          description: If true, this permission will be removed if will be not claimed
            by another user
          example: true
        expiration:
          type: string
          format: date-time
          description: If the permission is temporary, there will be an expiration
            date showed in this attribute
          example: '2021-04-22T11:39:56.000000Z'
        propagate:
          type: boolean
          description: If true, when a permission is accepted it will be propagated
            to the parent's children
          example: true
        installation:
          items:
            type: object
            additionalProperties: false
            properties:
              create:
                items:
                  type: string
                type: array
              method:
                type: object
                additionalProperties: false
                properties:
                  create:
                    type: boolean
                  update:
                    type: boolean
                  retrieve:
                    type: boolean
                  delete:
                    type: boolean
          type: array
          description: Restriction that you assign to the installation respect to
            itself (this is exclusive for the permission of an installation)
        restriction:
          items:
            type: object
          type: array
          description: It manages the permissions or the restrictions provided to
            the users
          example:
          - method:
              retrieve: true
              update: false
              create: false
              delete: false
        meta:
          properties:
            id:
              anyOf:
              - type: string
                format: email
              - enum:
                - global
                - parent_owner
                - parent_manufacturer
              - type: string
                pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
          type: object
          description: Meta data of the object
          example:
            id: global
            type: permission
            version: '2.0'
      additionalProperties: false
      description: Permissions are used to manage the sharing and the permission to
        a single user
    Permission_group:
      title: Permission_group
      type: object
      properties:
        name:
          type: string
          description: Name of the group
          example: My friends
        user:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
              email:
                type: string
                format: email
              nickname:
                type: string
              role:
                type: string
          description: List of users that have access to the group
          example:
          - id: fc59c49b-1d54-44f4-a9d0-3185aca5bc97
            nickname: Bill
            role: student
          - id: 9f747435-52ab-4999-89d6-e784835edd32
            nickname: Jill
            role: student
          - id: d0751ae1-5af7-49ce-b7df-98b1d3b10809
            nickname: Mark
            role: teacher
        meta:
          type: object
          description: Meta data of the object
          example:
            id: 159f03b6-e949-4744-9b35-804027c90d61
            type: permission_group
            version: '2.0'
      additionalProperties: false
      description: Create a group used to manage permissions
    Permission_rule:
      title: Permission_rule
      type: object
      properties:
        apply_to_old:
          type: boolean
          description: If it is true, the permission rule will be applied to objects
            already shared or owned
        from:
          items:
            type: object
            additionalProperties: false
            properties:
              type:
                type: string
              filter:
                type: array
                items:
                  type: object
                  additionalProperties: false
                  properties:
                    attribute:
                      type: string
                    value: {}
                  required:
                  - attribute
                  - value
              automatically_accept:
                type: boolean
            required:
            - type
          type: array
          description: Series of rules for objects received from someone
          example: []
        to:
          items:
            type: object
            additionalProperties: false
            properties:
              type:
                type: string
              filter:
                type: array
                items:
                  type: object
                  additionalProperties: false
                  properties:
                    attribute:
                      type: string
                    value: {}
                  required:
                  - attribute
                  - value
              restriction:
                type: object
            required:
            - type
          type: array
          description: Series of rules for objects we are sharing to someone
          example:
          - type: network
            filter:
            - attribute: name
              value: Seluxit Network
            restriction:
            - method:
                retrieve: true
                update: false
                create: false
                delete: false
        meta:
          type: object
          description: Meta data of the object
          example:
            id: fcb7cfc4-fc2e-4a28-8c5f-3e3de75c1625
            type: permission_rule
            version: '2.0'
      additionalProperties: false
      description: Permissions are used to handle automatic permission rules when
        objects are created or shared
  parameters:
    url_id:
      name: :id
      in: path
      required: true
      description: Id of the given object
      schema:
        type: string
        pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
    url_hex:
      name: :token
      in: path
      required: true
      description: Token used for some operation
      schema:
        type: string
        pattern: "^[0-9a-fA-F]{64}$"
tags:
- name: Acl
  description: An ACL (Access Control List) is assigned to each object owned by an
    user. This service manages the sharing with another user or usergroup. It is possible
    to assign to share the object globally, so that everybody will be able to retrieve
    it. The sharing can have time and method limitations in relation of the permissions
    chosen.
- name: Permission
  description: Permissions are used to manage the sharing and the permission to a
    single user
- name: Permission_rule
  description: Permissions are used to handle automatic permission rules when objects
    are created or shared
- name: Permission_group
  description: Create a group used to manage permissions
paths:
  "/acl":
    get:
      tags:
      - Acl
      summary: Retrieve multiple acl
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Idlist"
              example:
                meta:
                  type: idlist
                  version: '2.0'
                child:
                  type: acl
                  version:
                  - '2.0'
                data:
                  object_shared_with:
                    network-:
                    - id: bdc3fd9c-9dac-440c-b9cc-ae7924c5d74a
                      permission:
                      - global
                      - 9c15bb97-8da1-4631-834a-a3cfc03bfa3e
                      - a4002073-84af-489b-baff-c6bfac9eb326
  "/acl/:id":
    get:
      tags:
      - Acl
      summary: Retrieve acl of an object
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Acl"
              example:
                permission:
                - global
                - 9c15bb97-8da1-4631-834a-a3cfc03bfa3e
                - a4002073-84af-489b-baff-c6bfac9eb326
                parent:
                  type: network
                  version: '2.0'
                owner: 9ae9318c-d0ed-4e62-b230-680c6f353092
                manufacturer: 9ae9318c-d0ed-4e62-b230-680c6f353092
                owner_name: user
                shareable: true
                meta:
                  id: bdc3fd9c-9dac-440c-b9cc-ae7924c5d74a
                  type: acl
                  version: '2.0'
    head:
      tags:
      - Acl
      summary: Head acl of an object
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
    patch:
      tags:
      - Acl
      summary: Replace an acl by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Acl"
            example:
              permission:
              - meta:
                  id: global
                restriction:
                - method:
                    retrieve: true
                    update: false
                    delete: false
                    create: false
              meta:
                id: bdc3fd9c-9dac-440c-b9cc-ae7924c5d74a
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Acl"
              example:
                permission:
                - meta:
                    id: global
                    type: permission
                    version: '2.0'
                  restriction:
                  - method:
                      retrieve: true
                      update: false
                      delete: false
                      create: false
                  name: global
                parent:
                  type: network
                  version: '2.0'
                owner: 9c15bb97-8da1-4631-834a-a3cfc03bfa3e
                manufacturer: 9c15bb97-8da1-4631-834a-a3cfc03bfa3e
                owner_name: user
                shareable: true
                meta:
                  id: bdc3fd9c-9dac-440c-b9cc-ae7924c5d74a
                  type: acl
                  version: '2.0'
  "/acl/:id/permission":
    post:
      tags:
      - Permission
      summary: Create a new permission
      parameters:
      - "$ref": "#/components/parameters/url_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Permission"
            example:
              meta:
                id: a4cffc5a-5fd8-44ab-917f-93f60f97879b
              restriction:
              - method:
                  retrieve: true
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Permission"
              example:
                meta:
                  id: global
                  type: permission
                  version: '2.0'
                restriction:
                - method:
                    retrieve: true
                    update: false
                    create: false
                    delete: false
                name: global
    get:
      tags:
      - Permission
      summary: Retrieve all permission of an object
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Idlist"
              example:
                meta:
                  type: idlist
                  version: '2.0'
                child:
                - type: permission
                  version: '2.0'
                id:
                - global
                - 508495e0-9e6e-44ea-bd25-00b91a528400
                - a4cffc5a-5fd8-44ab-917f-93f60f97879b
                - 9137c4c5-eef6-49e2-aa78-5538ac7be89a
                more: false
                limit: 
                count: 4
    delete:
      tags:
      - Permission
      summary: Delete all permissions of an object
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Deletelist"
              example:
                deleted:
                - global
                - a4cffc5a-5fd8-44ab-917f-93f60f97879b
                - a4fe65a6-ae60-4aa3-92a9-beda4114ba11
                code: 105000004
                message: Cleared
                internal_code: documentstore_cleared
                meta:
                  type: deletelist
                  version: '2.0'
  "/acl/:id/permission/:id":
    get:
      tags:
      - Permission
      summary: Retrieve a permission by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Permission"
              example:
                meta:
                  id: 508495e0-9e6e-44ea-bd25-00b91a528400
                  type: permission
                  version: '2.0'
                restriction:
                - method:
                    create: false
                    update: false
                    retrieve: true
                    delete: false
                name: user
    head:
      tags:
      - Permission
      summary: Check a permission by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
    patch:
      tags:
      - Permission
      summary: Update a permission by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Permission"
            example:
              restriction:
              - method:
                  retrieve: true
                  update: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Permission"
              example:
                meta:
                  id: 508495e0-9e6e-44ea-bd25-00b91a528400
                  type: permission
                  version: '2.0'
                restriction:
                - method:
                    create: false
                    update: false
                    retrieve: true
                    delete: false
                name: user
    put:
      tags:
      - Permission
      summary: Replace a permission by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Permission"
            example:
              meta:
                id: 508495e0-9e6e-44ea-bd25-00b91a528400
              restriction:
              - method:
                  retrieve: true
                  update: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Permission"
              example:
                meta:
                  id: 508495e0-9e6e-44ea-bd25-00b91a528400
                  type: permission
                  version: '2.0'
                restriction:
                - method:
                    create: false
                    update: true
                    retrieve: true
                    delete: false
                name: user
    delete:
      tags:
      - Permission
      summary: Delete a permission by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Deletelist"
              example:
                deleted:
                - 508495e0-9e6e-44ea-bd25-00b91a528400
                code: 105000003
                message: Deleted
                internal_code: documentstore_deleted
                meta:
                  type: deletelist
                  version: '2.0'
  "/permission_group":
    post:
      tags:
      - Permission_group
      summary: Create permission_group
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Permission_group"
            example:
              name: My friends
              user:
              - id: fc59c49b-1d54-44f4-a9d0-3185aca5bc97
                nickname: Bill
                role: student
              - id: 9f747435-52ab-4999-89d6-e784835edd32
                nickname: Jill
                role: student
              - id: d0751ae1-5af7-49ce-b7df-98b1d3b10809
                nickname: Mark
                role: teacher
              meta:
                id: 159f03b6-e949-4744-9b35-804027c90d61
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Permission_group"
              example:
                name: My friends
                user:
                - id: fc59c49b-1d54-44f4-a9d0-3185aca5bc97
                  nickname: Bill
                  role: student
                - id: 9f747435-52ab-4999-89d6-e784835edd32
                  nickname: Jill
                  role: student
                - id: d0751ae1-5af7-49ce-b7df-98b1d3b10809
                  nickname: Mark
                  role: teacher
                meta:
                  id: 159f03b6-e949-4744-9b35-804027c90d61
                  type: permission_group
                  version: '2.0'
    get:
      tags:
      - Permission_group
      summary: Retrieve list of permission_group
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Idlist"
              example:
                child:
                - type: permission_group
                  version: '2.0'
                id:
                - 159f03b6-e949-4744-9b35-804027c90d61
                - 0d71bfbc-3c9b-4dfa-880f-5cf6852341a5
                - 56226997-6838-4973-8c1d-7131fe2c4141
                - 51bfe319-98f0-4efc-ae43-883a14e9fb3c
                more: false
                limit: 1000
                count: 4
                meta:
                  type: idlist
                  version: '2.0'
    head:
      tags:
      - Permission_group
      summary: Check if list of permission_group is retrievable
      parameters: []
      responses:
        '200':
          description: OK
    patch:
      tags:
      - Permission_group
      summary: Update multiple permission_groups
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Permission_group"
            example:
              name: Phanceforge Audible Dummy Groove
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Permission_group"
              example:
              - name: Phanceforge Audible Dummy Groove
                user:
                - id: fc59c49b-1d54-44f4-a9d0-3185aca5bc97
                  nickname: Bill
                  role: student
                - id: 9f747435-52ab-4999-89d6-e784835edd32
                  nickname: Jill
                  role: student
                - id: d0751ae1-5af7-49ce-b7df-98b1d3b10809
                  nickname: Mark
                  role: teacher
                meta:
                  id: 159f03b6-e949-4744-9b35-804027c90d61
                  type: permission_group
                  version: '2.0'
              - name: Phanceforge Audible Dummy Groove
                user:
                - id: fc59c49b-1d54-44f4-a9d0-3185aca5bc97
                meta:
                  id: 0d71bfbc-3c9b-4dfa-880f-5cf6852341a5
                  type: permission_group
                  version: '2.0'
    delete:
      tags:
      - Permission_group
      summary: Delete all permission_group
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Deletelist"
              example:
                deleted:
                - 0d71bfbc-3c9b-4dfa-880f-5cf6852341a5
                - 56226997-6838-4973-8c1d-7131fe2c4141
                - 51bfe319-98f0-4efc-ae43-883a14e9fb3c
                code: 105000004
                message: Cleared
                internal_code: documentstore_cleared
                meta:
                  type: deletelist
                  version: '2.0'
  "/permission_group/:id":
    get:
      tags:
      - Permission_group
      summary: Retrieve permission_group by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Permission_group"
              example:
                name: My friends
                user:
                - id: fc59c49b-1d54-44f4-a9d0-3185aca5bc97
                  nickname: Bill
                  role: student
                - id: 9f747435-52ab-4999-89d6-e784835edd32
                  nickname: Jill
                  role: student
                - id: d0751ae1-5af7-49ce-b7df-98b1d3b10809
                  nickname: Mark
                  role: teacher
                meta:
                  id: 159f03b6-e949-4744-9b35-804027c90d61
                  type: permission_group
                  version: '2.0'
    head:
      tags:
      - Permission_group
      summary: Check if permission_group by ID is retrievable
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
    patch:
      tags:
      - Permission_group
      summary: Update an permission_group by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Permission_group"
            example:
              name: Fincell Input Component
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Permission_group"
              example:
                name: Fincell Input Component
                user:
                - id: fc59c49b-1d54-44f4-a9d0-3185aca5bc97
                  nickname: Bill
                  role: student
                - id: 9f747435-52ab-4999-89d6-e784835edd32
                  nickname: Jill
                  role: student
                - id: d0751ae1-5af7-49ce-b7df-98b1d3b10809
                  nickname: Mark
                  role: teacher
                meta:
                  id: 159f03b6-e949-4744-9b35-804027c90d61
                  type: permission_group
                  version: '2.0'
    put:
      tags:
      - Permission_group
      summary: Replace an permission_group by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Permission_group"
            example:
              name: Trunce HD Case
              user:
              - id: fc59c49b-1d54-44f4-a9d0-3185aca5bc97
                nickname: Bill
                role: student
              - id: 9f747435-52ab-4999-89d6-e784835edd32
                nickname: Jill
                role: student
              - id: d0751ae1-5af7-49ce-b7df-98b1d3b10809
                nickname: Mark
                role: teacher
              meta:
                id: 159f03b6-e949-4744-9b35-804027c90d61
                type: permission_group
                version: '2.0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Permission_group"
              example:
                name: Trunce HD Case
                user:
                - id: fc59c49b-1d54-44f4-a9d0-3185aca5bc97
                  nickname: Bill
                  role: student
                - id: 9f747435-52ab-4999-89d6-e784835edd32
                  nickname: Jill
                  role: student
                - id: d0751ae1-5af7-49ce-b7df-98b1d3b10809
                  nickname: Mark
                  role: teacher
                meta:
                  id: 159f03b6-e949-4744-9b35-804027c90d61
                  type: permission_group
                  version: '2.0'
    delete:
      tags:
      - Permission_group
      summary: Delete an permission_group by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Deletelist"
              example:
                deleted:
                - 159f03b6-e949-4744-9b35-804027c90d61
                code: 105000003
                message: Deleted
                internal_code: documentstore_deleted
                meta:
                  type: deletelist
                  version: '2.0'
    post:
      tags:
      - Permission_group
      summary: Accept shared permission_group
      parameters:
      - "$ref": "#/components/parameters/url_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Permission_group"
            example: {}
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Permission_group"
              example:
                name: My nice friend
                meta:
                  id: 608a2252-3928-442c-88ad-d64ed020cf88
                  type: permission_group
                  version: '2.0'
  "/permission_rule":
    post:
      tags:
      - Permission_rule
      summary: Create a permission_rule
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Permission_rule"
            example:
              meta:
                id: 2d554ae9-0ac8-4bf1-97e2-d055e7ffb02a
              to:
              - type: network
                filter:
                - attribute: name
                  value: Seluxit Network
                restriction:
                  method:
                    retrieve: true
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Permission_rule"
              example:
                meta:
                  id: fcb7cfc4-fc2e-4a28-8c5f-3e3de75c1625
                  type: permission_rule
                  version: '2.0'
                from: []
                to:
                - type: network
                  filter:
                  - attribute: name
                    value: Seluxit Network
                  restriction:
                  - method:
                      retrieve: true
                      update: false
                      create: false
                      delete: false
    get:
      tags:
      - Permission_rule
      summary: Retrieve all permission rules assigned
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Idlist"
              example:
                meta:
                  type: idlist
                  version: '2.0'
                child:
                - type: permission_rule
                  version: '2.0'
                id:
                - fcb7cfc4-fc2e-4a28-8c5f-3e3de75c1625
                - 91c243c4-81bb-4d26-affe-656076d8c9a6
                - 2d554ae9-0ac8-4bf1-97e2-d055e7ffb02a
                more: false
                limit: 
                count: 3
    delete:
      tags:
      - Permission_rule
      summary: Delete all permission rules
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Deletelist"
              example:
                deleted:
                - 91c243c4-81bb-4d26-affe-656076d8c9a6
                - 2d554ae9-0ac8-4bf1-97e2-d055e7ffb02a
                code: 105000004
                message: Cleared
                internal_code: documentstore_cleared
                meta:
                  type: deletelist
                  version: '2.0'
  "/permission_rule/:id":
    get:
      tags:
      - Permission_rule
      summary: Retrieve a permission rule by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Permission_rule"
              example:
                meta:
                  id: fcb7cfc4-fc2e-4a28-8c5f-3e3de75c1625
                  type: permission_rule
                  version: '2.0'
                from: []
                to:
                - type: network
                  filter:
                  - attribute: name
                    value: Seluxit Network
                  restriction:
                  - method:
                      retrieve: true
                      update: false
                      create: false
                      delete: false
    head:
      tags:
      - Permission_rule
      summary: Check a permission rule by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
    patch:
      tags:
      - Permission_rule
      summary: Update a permission rule by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Permission_rule"
            example:
              meta:
                id: fcb7cfc4-fc2e-4a28-8c5f-3e3de75c1625
              from:
              - type: device
                automatically_accept: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Permission_rule"
              example:
                meta:
                  id: fcb7cfc4-fc2e-4a28-8c5f-3e3de75c1625
                  type: permission_rule
                  version: '2.0'
                from:
                - type: device
                  automatically_accept: true
                to:
                - type: network
                  filter:
                  - attribute: name
                    value: Seluxit Network
                  restriction:
                  - method:
                      retrieve: true
                      update: false
                      create: false
                      delete: false
    put:
      tags:
      - Permission_rule
      summary: Replace a permission rule by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Permission_rule"
            example:
              from:
              - type: device
                automatically_accept: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Permission_rule"
              example:
                meta:
                  id: fcb7cfc4-fc2e-4a28-8c5f-3e3de75c1625
                  type: permission_rule
                  version: '2.0'
                from:
                - type: device
                  automatically_accept: true
                to: []
    delete:
      tags:
      - Permission_rule
      summary: Delete a permission rule by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Deletelist"
              example:
                deleted:
                - fcb7cfc4-fc2e-4a28-8c5f-3e3de75c1625
                code: 105000003
                message: Deleted
                internal_code: documentstore_deleted
                meta:
                  type: deletelist
                  version: '2.0'
