---
openapi: 3.0.0
info:
  title: Relations
  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
    Usergroup:
      title: Usergroup
      type: object
      properties:
        name:
          type: string
          description: Name of the user group
          example: DuBuque-Considine
        description:
          type: string
          description: Description of the user group
          example: Proactive fresh-thinking support
        level:
          type: string
          description: Level that the user has in the usergroup
          example: founder
        founder:
          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}$"
        admin:
          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: List of the administrators of the group
          example: []
        superuser:
          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: List of the superusers of the user group
          example: []
        member:
          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: List of the normal members of the user group
          example: []
        blocked:
          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: List of the users blocked by the group
          example: []
        open:
          type: boolean
          description: If true, then the user is open to everybody to access
          example: true
        searchable:
          type: boolean
          description: If it is possible to find the usergroup with a normal search
            or not
        retrievable:
          type: string
          enum:
          - full
          - partial
          - 'no'
          description: If "full", then it can be retrieved by everyone, if "partial"
            only some information can be retrieve, if "no", no information can be
            retrieved by no member.
          example: partial
        shared:
          items:
            type: object
            additionalProperties: false
            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}$"
              type:
                type: string
          type: array
          description: list of object shared with the group
          example:
          - {}
        meta:
          type: object
          description: Meta data of the object
          example:
            id: 71ea0667-d1a0-4103-9718-a0d6fb91bb80
            type: usergroup
            version: '2.0'
      additionalProperties: false
      required:
      - name
      description: This service is used to manage a group of users
    Relationship:
      title: Relationship
      type: object
      properties:
        type:
          type: string
          enum:
          - friendship
          - request_join_group
          - accept_request_join_group
          - invite_join_group
          - accept_invitation_join_group
          - request_to_be_superuser
          - accept_request_to_be_superuser
          description: Type of relationship created
          example: friendship
        accepted:
          type: boolean
          description: If an invitation has been accepted or not
        level:
          type: string
          enum:
          - admin
          - superuser
          - member
          description: Level we want to attribute to the invited user in the usergroup
        group_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}$"
        user_id:
          anyOf:
          - type: string
            format: email
          - 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}$"
          description: Id of the user we want to invite in the usergroup
          example: 3e1aed7b-447b-4d32-9192-df01f45a7bbb
        friend:
          type: boolean
          description: If true, the owner of the installation wants a friendship with
            the other user
          example: true
        blocked:
          type: boolean
          description: If true, the owner of the installation is blocking the second
            user
          example: false
        reciprocate_friendship:
          type: boolean
          description: If true, the friendship is wanted by both the owner the installation
            and the other user
          example: false
        username:
          type: string
          description: Username assigned to the user in the relationship
          example: Willy
        message:
          type: string
          description: Message sent in case of friendship request
          example: Hi! I am William Shakespeare!
        expiration_date:
          type: string
          description: Date when the relationship expire
        language:
          type: string
          description: String that identify the language that we want to use with
            the other user
          example: en
        user_attribute:
          items:
            type: string
            enum:
            - nickname
            - first_name
            - last_name
            - email
            - phone
          type: array
          description: Data of the user sent in case of friendship request
          example:
          - nickname
          - first_name
        status:
          type: string
          enum:
          - pending
          - accepted
          - refused
          description: Status of the relationship
        meta:
          type: object
          description: Meta data of the object
          example:
            id: 75a4d328-7901-4a4b-b3ae-461cd2e63d2c
            type: relationship
            version: '2.0'
      additionalProperties: false
      required:
      - type
      description: Relationships are used to manage the relationship between the users
        or usergroups
  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: Relationship
  description: Relationships are used to manage the relationship between the users
    or usergroups
- name: Usergroup
  description: This service is used to manage a group of users
paths:
  "/usergroup":
    post:
      tags:
      - Usergroup
      summary: Fetch request of usergroup
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Usergroup"
            example:
              filter:
                id:
                - 71ea0667-d1a0-4103-9718-a0d6fb91bb80
                - c6e6948d-d0a0-4a09-a376-2c374404c806
              return: "{ usergroup {meta {id}}}"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Fetch"
              example:
                meta:
                  type: fetch
                  version: '2.0'
                data:
                  usergroup:
                  - meta:
                      id: 71ea0667-d1a0-4103-9718-a0d6fb91bb80
                  - meta:
                      id: c6e6948d-d0a0-4a09-a376-2c374404c806
    get:
      tags:
      - Usergroup
      summary: Retrieve list of usergroup
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Idlist"
              example:
                child:
                - type: usergroup
                  version: '2.0'
                id:
                - 71ea0667-d1a0-4103-9718-a0d6fb91bb80
                - c6e6948d-d0a0-4a09-a376-2c374404c806
                - 6cba7ba2-7dae-4cb6-9e8f-2d3bb2fce4c8
                - c471d3b3-3d5a-4e78-9173-e4c6d7e07e7e
                more: false
                limit: 1000
                count: 4
                meta:
                  type: idlist
                  version: '2.0'
    head:
      tags:
      - Usergroup
      summary: Check if list of usergroup is retrievable
      parameters: []
      responses:
        '200':
          description: OK
    patch:
      tags:
      - Usergroup
      summary: Update multiple usergroups
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Usergroup"
            example:
              name: Schuster-Johnston
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Usergroup"
              example:
              - name: Schuster-Johnston
                description: Proactive fresh-thinking support
                level: founder
                founder: c8a2e9f1-0a99-458d-b04e-80321dc58377
                admin: []
                superuser:
                - 8dc4b07b-29de-432b-aeaa-c3ab6af1cd6b
                member:
                - 51f9a46b-9667-4520-ad8b-153e45bc8d8c
                - 9898477a-6097-4b28-92dc-1fb41bc88cd3
                blocked: []
                open: true
                retrievable: partial
                shared:
                - {}
                meta:
                  id: 71ea0667-d1a0-4103-9718-a0d6fb91bb80
                  type: usergroup
                  version: '2.0'
              - name: Schuster-Johnston
                description: Team-oriented needs-based challenge
                level: founder
                founder: c8a2e9f1-0a99-458d-b04e-80321dc58377
                admin: []
                superuser: []
                member: []
                blocked: []
                open: true
                retrievable: partial
                shared:
                - {}
                meta:
                  id: c6e6948d-d0a0-4a09-a376-2c374404c806
                  type: usergroup
                  version: '2.0'
    delete:
      tags:
      - Usergroup
      summary: Delete all usergroup
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Deletelist"
              example:
                deleted:
                - c6e6948d-d0a0-4a09-a376-2c374404c806
                - 6cba7ba2-7dae-4cb6-9e8f-2d3bb2fce4c8
                - c471d3b3-3d5a-4e78-9173-e4c6d7e07e7e
                code: 105000004
                message: Cleared
                internal_code: documentstore_cleared
                meta:
                  type: deletelist
                  version: '2.0'
  "/usergroup/:id":
    get:
      tags:
      - Usergroup
      summary: Retrieve usergroup by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Usergroup"
              example:
                name: DuBuque-Considine
                description: Proactive fresh-thinking support
                level: founder
                founder: c8a2e9f1-0a99-458d-b04e-80321dc58377
                admin: []
                superuser:
                - 8dc4b07b-29de-432b-aeaa-c3ab6af1cd6b
                member:
                - 51f9a46b-9667-4520-ad8b-153e45bc8d8c
                - 9898477a-6097-4b28-92dc-1fb41bc88cd3
                blocked: []
                open: true
                retrievable: partial
                shared:
                - {}
                meta:
                  id: 71ea0667-d1a0-4103-9718-a0d6fb91bb80
                  type: usergroup
                  version: '2.0'
    head:
      tags:
      - Usergroup
      summary: Check if usergroup by ID is retrievable
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
    post:
      tags:
      - Usergroup
      summary: Fetch request of usergroup
      parameters:
      - "$ref": "#/components/parameters/url_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Usergroup"
            example:
              return: "{ object: usergroup {meta {id} name}}"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Fetch"
              example:
                meta:
                  type: fetch
                  version: '2.0'
                data:
                  object:
                  - meta:
                      id: 71ea0667-d1a0-4103-9718-a0d6fb91bb80
                    name: DuBuque-Considine
    patch:
      tags:
      - Usergroup
      summary: Update an usergroup by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Usergroup"
            example:
              name: Towne-Stoltenberg
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Usergroup"
              example:
                name: Towne-Stoltenberg
                description: Proactive fresh-thinking support
                level: founder
                founder: c8a2e9f1-0a99-458d-b04e-80321dc58377
                admin: []
                superuser:
                - 8dc4b07b-29de-432b-aeaa-c3ab6af1cd6b
                member:
                - 51f9a46b-9667-4520-ad8b-153e45bc8d8c
                - 9898477a-6097-4b28-92dc-1fb41bc88cd3
                blocked: []
                open: true
                retrievable: partial
                shared:
                - {}
                meta:
                  id: 71ea0667-d1a0-4103-9718-a0d6fb91bb80
                  type: usergroup
                  version: '2.0'
    put:
      tags:
      - Usergroup
      summary: Replace an usergroup by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Usergroup"
            example:
              name: Schultz Inc
              description: Proactive fresh-thinking support
              level: founder
              founder: c8a2e9f1-0a99-458d-b04e-80321dc58377
              admin: []
              superuser:
              - 8dc4b07b-29de-432b-aeaa-c3ab6af1cd6b
              member:
              - 51f9a46b-9667-4520-ad8b-153e45bc8d8c
              - 9898477a-6097-4b28-92dc-1fb41bc88cd3
              blocked: []
              open: true
              retrievable: partial
              shared:
              - {}
              meta:
                id: 71ea0667-d1a0-4103-9718-a0d6fb91bb80
                type: usergroup
                version: '2.0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Usergroup"
              example:
                name: Schultz Inc
                description: Proactive fresh-thinking support
                level: founder
                founder: c8a2e9f1-0a99-458d-b04e-80321dc58377
                admin: []
                superuser:
                - 8dc4b07b-29de-432b-aeaa-c3ab6af1cd6b
                member:
                - 51f9a46b-9667-4520-ad8b-153e45bc8d8c
                - 9898477a-6097-4b28-92dc-1fb41bc88cd3
                blocked: []
                open: true
                retrievable: partial
                shared:
                - {}
                meta:
                  id: 71ea0667-d1a0-4103-9718-a0d6fb91bb80
                  type: usergroup
                  version: '2.0'
    delete:
      tags:
      - Usergroup
      summary: Delete an usergroup by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Deletelist"
              example:
                deleted:
                - 71ea0667-d1a0-4103-9718-a0d6fb91bb80
                code: 105000003
                message: Deleted
                internal_code: documentstore_deleted
                meta:
                  type: deletelist
                  version: '2.0'
  "/relationship":
    post:
      tags:
      - Relationship
      summary: Fetch request of relationship
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Relationship"
            example:
              filter:
                id:
                - 75a4d328-7901-4a4b-b3ae-461cd2e63d2c
                - 0b4b39fe-3554-40b8-af7f-38d0ebb870d4
              return: "{ relationship {meta {id}}}"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Fetch"
              example:
                meta:
                  type: fetch
                  version: '2.0'
                data:
                  relationship:
                  - meta:
                      id: 75a4d328-7901-4a4b-b3ae-461cd2e63d2c
                  - meta:
                      id: 0b4b39fe-3554-40b8-af7f-38d0ebb870d4
    get:
      tags:
      - Relationship
      summary: Retrieve list of relationship
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Idlist"
              example:
                child:
                - type: relationship
                  version: '2.0'
                id:
                - 75a4d328-7901-4a4b-b3ae-461cd2e63d2c
                - 0b4b39fe-3554-40b8-af7f-38d0ebb870d4
                - 0757e9c1-7b41-4d28-b808-7a3a6729de7b
                more: false
                limit: 1000
                count: 3
                meta:
                  type: idlist
                  version: '2.0'
    head:
      tags:
      - Relationship
      summary: Check if list of relationship is retrievable
      parameters: []
      responses:
        '200':
          description: OK
    patch:
      tags:
      - Relationship
      summary: Update multiple relationships
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Relationship"
            example:
              blocked: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Relationship"
              example:
              - type: friendship
                user_id: 3e1aed7b-447b-4d32-9192-df01f45a7bbb
                friend: false
                blocked: true
                reciprocate_friendship: false
                username: Willy
                message: Hi! I am William Shakespeare!
                language: en
                user_attribute:
                - nickname
                - first_name
                meta:
                  id: 75a4d328-7901-4a4b-b3ae-461cd2e63d2c
                  type: relationship
                  version: '2.0'
              - type: friendship
                user_id: 66f6e2dd-4b9f-4aa2-aa64-2477675a6715
                friend: true
                blocked: true
                reciprocate_friendship: false
                username: Claire
                message: Hi! I am a test command!
                language: en
                user_attribute:
                - nickname
                - first_name
                meta:
                  id: 0b4b39fe-3554-40b8-af7f-38d0ebb870d4
                  type: relationship
                  version: '2.0'
    delete:
      tags:
      - Relationship
      summary: Delete all relationship
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Deletelist"
              example:
                deleted:
                - 0b4b39fe-3554-40b8-af7f-38d0ebb870d4
                - 0757e9c1-7b41-4d28-b808-7a3a6729de7b
                code: 105000004
                message: Cleared
                internal_code: documentstore_cleared
                meta:
                  type: deletelist
                  version: '2.0'
  "/relationship/:id":
    get:
      tags:
      - Relationship
      summary: Retrieve relationship by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Relationship"
              example:
                type: friendship
                user_id: 3e1aed7b-447b-4d32-9192-df01f45a7bbb
                friend: true
                blocked: false
                reciprocate_friendship: false
                username: Willy
                message: Hi! I am William Shakespeare!
                language: en
                user_attribute:
                - nickname
                - first_name
                meta:
                  id: 75a4d328-7901-4a4b-b3ae-461cd2e63d2c
                  type: relationship
                  version: '2.0'
    head:
      tags:
      - Relationship
      summary: Check if relationship by ID is retrievable
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
    post:
      tags:
      - Relationship
      summary: Fetch request of relationship
      parameters:
      - "$ref": "#/components/parameters/url_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Relationship"
            example:
              return: "{ object: relationship {meta {id} username}}"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Fetch"
              example:
                meta:
                  type: fetch
                  version: '2.0'
                data:
                  object:
                  - meta:
                      id: 75a4d328-7901-4a4b-b3ae-461cd2e63d2c
                    username: Willy
    patch:
      tags:
      - Relationship
      summary: Update an relationship by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Relationship"
            example:
              friend: false
              blocked: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Relationship"
              example:
                type: friendship
                user_id: 3e1aed7b-447b-4d32-9192-df01f45a7bbb
                friend: false
                blocked: false
                reciprocate_friendship: false
                username: Willy
                message: Hi! I am William Shakespeare!
                language: en
                user_attribute:
                - nickname
                - first_name
                meta:
                  id: 75a4d328-7901-4a4b-b3ae-461cd2e63d2c
                  type: relationship
                  version: '2.0'
    put:
      tags:
      - Relationship
      summary: Replace an relationship by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Relationship"
            example:
              type: friendship
              user_id: 3e1aed7b-447b-4d32-9192-df01f45a7bbb
              friend: false
              blocked: false
              reciprocate_friendship: false
              username: Willy
              message: Hi! I am William Shakespeare!
              language: en
              user_attribute:
              - nickname
              - first_name
              meta:
                id: 75a4d328-7901-4a4b-b3ae-461cd2e63d2c
                type: relationship
                version: '2.0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Relationship"
              example:
                type: friendship
                user_id: 3e1aed7b-447b-4d32-9192-df01f45a7bbb
                friend: false
                blocked: false
                reciprocate_friendship: false
                username: Willy
                message: Hi! I am William Shakespeare!
                language: en
                user_attribute:
                - nickname
                - first_name
                meta:
                  id: 75a4d328-7901-4a4b-b3ae-461cd2e63d2c
                  type: relationship
                  version: '2.0'
    delete:
      tags:
      - Relationship
      summary: Delete an relationship by ID
      parameters:
      - "$ref": "#/components/parameters/url_id"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Deletelist"
              example:
                deleted:
                - 75a4d328-7901-4a4b-b3ae-461cd2e63d2c
                code: 105000003
                message: Deleted
                internal_code: documentstore_deleted
                meta:
                  type: deletelist
                  version: '2.0'
