openapi: 3.0.3
info:
    title: 'Testing Procedures API documentation'
    description: 'API Reference for Diesel Laptops "Testing Procedures" API Service.'
    version: 1.0.0
servers:
    -
        url: 'https://api-testingprocedures.com'
paths:
    /api/v1/document:
        get:
            summary: List
            description: 'Retrieve all documents'
            parameters:
                -
                    in: query
                    name: dependency_type
                    description: 'Filter by the type of the dependency. Possible values: <i>year_range</i>, <i>module</i>.'
                    example: module
                    required: false
                    schema:
                        type: string
                        description: 'Filter by the type of the dependency. Possible values: <i>year_range</i>, <i>module</i>.'
                        example: module
                -
                    in: query
                    name: dependency_id
                    description: 'Filter by the ID of the dependency.'
                    example: 20
                    required: false
                    schema:
                        type: integer
                        description: 'Filter by the ID of the dependency.'
                        example: 20
                -
                    in: query
                    name: sort_by
                    description: 'Field to sort by. Defaults to <i>name</i>. Possible values: <i>name</i>.'
                    example: name
                    required: false
                    schema:
                        type: string
                        description: 'Field to sort by. Defaults to <i>name</i>. Possible values: <i>name</i>.'
                        example: name
                -
                    in: query
                    name: sort_dir
                    description: 'Sort direction. Defaults to <i>asc</i>. Possible values: <i>asc</i> or <i>desc</i>.'
                    example: asc
                    required: false
                    schema:
                        type: string
                        description: 'Sort direction. Defaults to <i>asc</i>. Possible values: <i>asc</i> or <i>desc</i>.'
                        example: asc
                -
                    in: query
                    name: page
                    description: 'Page of result to return. Defaults to 1.'
                    example: 20
                    required: false
                    schema:
                        type: integer
                        description: 'Page of result to return. Defaults to 1.'
                        example: 20
                -
                    in: query
                    name: per_page
                    description: 'How many rows to return per page. Defaults to 10, maximum 100.'
                    example: 20
                    required: false
                    schema:
                        type: integer
                        description: 'How many rows to return per page. Defaults to 10, maximum 100.'
                        example: 20
                -
                    in: header
                    name: DL-API-Key
                    description: ''
                    example: '{YOUR_AUTH_KEY}'
                    schema:
                        type: string
                -
                    in: header
                    name: Content-Type
                    description: ''
                    example: application/json
                    schema:
                        type: string
                -
                    in: header
                    name: Accept
                    description: ''
                    example: application/json
                    schema:
                        type: string
            responses:
                200:
                    description: '200'
                    content:
                        application/json:
                            schema:
                                type: object
                                example:
                                    data: [{ id: 7, title: 'Aenean bibendum', summary: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', prerequisite: 'Aenean bibendum pretium orci at efficitur.', service_tools: null, dependencies: [{ id: 14, type: module, dependency_id: 9, document_id: 7 }] }]
                                    links: { first: 'https://api-testingprocedure.com/api/v1/document?page=1', last: 'https://api-testingprocedure.com/api/v1/document?page=1', prev: null, next: null }
                                    meta: { current_page: 1, from: 1, last_page: 1, links: [{ url: null, label: '&laquo; Previous', active: false }, { url: 'https://api-testingprocedure.com/api/v1/document?page=1', label: '1', active: true }, { url: null, label: 'Next &raquo;', active: false }], path: 'https://api-testingprocedure.com/api/v1/document', per_page: 10, to: 9, total: 9 }
                                properties:
                                    data: { type: array, example: [{ id: 7, title: 'Aenean bibendum', summary: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', prerequisite: 'Aenean bibendum pretium orci at efficitur.', service_tools: null, dependencies: [{ id: 14, type: module, dependency_id: 9, document_id: 7 }] }], items: { type: object } }
                                    links: { type: object, example: { first: 'https://api-testingprocedure.com/api/v1/document?page=1', last: 'https://api-testingprocedure.com/api/v1/document?page=1', prev: null, next: null } }
                                    meta: { type: object, example: { current_page: 1, from: 1, last_page: 1, links: [{ url: null, label: '&laquo; Previous', active: false }, { url: 'https://api-testingprocedure.com/api/v1/document?page=1', label: '1', active: true }, { url: null, label: 'Next &raquo;', active: false }], path: 'https://api-testingprocedure.com/api/v1/document', per_page: 10, to: 9, total: 9 } }
                401:
                    description: '401'
                    content:
                        application/json:
                            schema:
                                type: object
                                example:
                                    message: Unauthenticated.
                                properties:
                                    message: { type: string, example: Unauthenticated. }
            tags:
                - Documents
            requestBody:
                required: false
                content:
                    application/json:
                        schema:
                            type: object
                            properties:
                                module_id:
                                    type: integer
                                    description: ''
                                    example: 12
    '/api/v1/document/{id}':
        get:
            summary: Retrieve
            description: 'Retrieve the document'
            parameters:
                -
                    in: header
                    name: DL-API-Key
                    description: ''
                    example: '{YOUR_AUTH_KEY}'
                    schema:
                        type: string
                -
                    in: header
                    name: Content-Type
                    description: ''
                    example: application/json
                    schema:
                        type: string
                -
                    in: header
                    name: Accept
                    description: ''
                    example: application/json
                    schema:
                        type: string
            responses:
                200:
                    description: '200'
                    content:
                        application/json:
                            schema:
                                type: object
                                example:
                                    data: { id: 7, title: 'Aenean bibendum', summary: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', prerequisite: 'Aenean bibendum pretium orci at efficitur. Vivamus at ullamcorper diam.', service_tools: null, dependencies: [{ id: 14, type: module, dependency_id: 9, document_id: 7 }], test_procedures: [{ id: 7, document_id: 7, title: 'Vestibulum non neque', text: 'Vestibulum non neque ac nibh vulputate suscipit vel pulvinar nibh.', video: fffffffffff, video_url: 'https://www.youtube.com/watch?v=fffffffffff', attachments: [{ id: 3, test_procedure_id: 7, path: attachments/hLaBUh0rygmc2VmIbP6DhWhWFkxfQ6ya7XfEkL0c.pdf, url: 'https://api-testingprocedure.com/storage/attachments/hLaBUh0rygmc2VmIbP6DhWhWFkxfQ6ya7XfEkL0c.pdf' }], images: [{ id: 5, test_procedure_id: 7, path: images/qIMMUzWfalNFIyyRDobzqzZtKJRakSD3rXfw3DL6.png, url: 'https://api-testingprocedure.com/storage/images/qIMMUzWfalNFIyyRDobzqzZtKJRakSD3rXfw3DL6.png' }, { id: 6, test_procedure_id: 7, path: images/2HF8dW3fHsdfqGCfTTMM07tUEwsUCSY6BFg9OQrQ.png, url: 'https://api-testingprocedure.com/storage/images/2HF8dW3fHsdfqGCfTTMM07tUEwsUCSY6BFg9OQrQ.png' }] }] }
                                properties:
                                    data: { type: object, example: { id: 7, title: 'Aenean bibendum', summary: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', prerequisite: 'Aenean bibendum pretium orci at efficitur. Vivamus at ullamcorper diam.', service_tools: null, dependencies: [{ id: 14, type: module, dependency_id: 9, document_id: 7 }], test_procedures: [{ id: 7, document_id: 7, title: 'Vestibulum non neque', text: 'Vestibulum non neque ac nibh vulputate suscipit vel pulvinar nibh.', video: fffffffffff, video_url: 'https://www.youtube.com/watch?v=fffffffffff', attachments: [{ id: 3, test_procedure_id: 7, path: attachments/hLaBUh0rygmc2VmIbP6DhWhWFkxfQ6ya7XfEkL0c.pdf, url: 'https://api-testingprocedure.com/storage/attachments/hLaBUh0rygmc2VmIbP6DhWhWFkxfQ6ya7XfEkL0c.pdf' }], images: [{ id: 5, test_procedure_id: 7, path: images/qIMMUzWfalNFIyyRDobzqzZtKJRakSD3rXfw3DL6.png, url: 'https://api-testingprocedure.com/storage/images/qIMMUzWfalNFIyyRDobzqzZtKJRakSD3rXfw3DL6.png' }, { id: 6, test_procedure_id: 7, path: images/2HF8dW3fHsdfqGCfTTMM07tUEwsUCSY6BFg9OQrQ.png, url: 'https://api-testingprocedure.com/storage/images/2HF8dW3fHsdfqGCfTTMM07tUEwsUCSY6BFg9OQrQ.png' }] }] } }
                401:
                    description: '401'
                    content:
                        application/json:
                            schema:
                                type: object
                                example:
                                    message: Unauthenticated.
                                properties:
                                    message: { type: string, example: Unauthenticated. }
            tags:
                - Documents
            requestBody:
                required: false
                content:
                    application/json:
                        schema:
                            type: object
                            properties:
                                module_id:
                                    type: integer
                                    description: ''
                                    example: 14
        parameters:
            -
                in: path
                name: id
                description: 'Optional parameter. The ID of the document.'
                required: true
                schema:
                    type: integer
                examples:
                    omitted:
                        summary: 'When the value is omitted'
                        value: ''
                    present:
                        summary: 'When the value is present'
                        value: 18
    /api/v1/test-procedure:
        get:
            summary: List
            description: 'Retrieve all testing procedures.'
            parameters:
                -
                    in: query
                    name: document_id
                    description: 'Filter by <i>ID</i> of the document.'
                    example: 10
                    required: false
                    schema:
                        type: integer
                        description: 'Filter by <i>ID</i> of the document.'
                        example: 10
                -
                    in: query
                    name: sort_by
                    description: 'Field to sort by. Defaults to <i>name</i>. Possible values: <i>name</i>.'
                    example: name
                    required: false
                    schema:
                        type: string
                        description: 'Field to sort by. Defaults to <i>name</i>. Possible values: <i>name</i>.'
                        example: name
                -
                    in: query
                    name: sort_dir
                    description: 'Sort direction. Defaults to <i>asc</i>. Possible values: <i>asc</i> or <i>desc</i>.'
                    example: asc
                    required: false
                    schema:
                        type: string
                        description: 'Sort direction. Defaults to <i>asc</i>. Possible values: <i>asc</i> or <i>desc</i>.'
                        example: asc
                -
                    in: query
                    name: page
                    description: 'Page of result to return. Defaults to 1.'
                    example: 7
                    required: false
                    schema:
                        type: integer
                        description: 'Page of result to return. Defaults to 1.'
                        example: 7
                -
                    in: query
                    name: per_page
                    description: 'How many rows to return per page. Defaults to 10, maximum 100.'
                    example: 20
                    required: false
                    schema:
                        type: integer
                        description: 'How many rows to return per page. Defaults to 10, maximum 100.'
                        example: 20
                -
                    in: header
                    name: DL-API-Key
                    description: ''
                    example: '{YOUR_AUTH_KEY}'
                    schema:
                        type: string
                -
                    in: header
                    name: Content-Type
                    description: ''
                    example: application/json
                    schema:
                        type: string
                -
                    in: header
                    name: Accept
                    description: ''
                    example: application/json
                    schema:
                        type: string
            responses:
                200:
                    description: '200'
                    content:
                        application/json:
                            schema:
                                type: object
                                example:
                                    data: [{ id: 4, document_id: 4, title: 'Mauris id aliquet arcu', text: 'Aliquam erat volutpat. Etiam mattis viverra suscipit.', video: qwertyuiopa, video_url: 'https://www.youtube.com/watch?v=qwertyuiopa', attachments: [{ id: 1, test_procedure_id: 4, path: attachments/NiudiobXvHnkPfSXGwz6UKsBNA7mS5cVvs0aTnOo.pdf, url: 'https://api-testingprocedure.com/storage/attachments/NiudiobXvHnkPfSXGwz6UKsBNA7mS5cVvs0aTnOo.pdf' }, { id: 4, test_procedure_id: 4, path: attachments/I3wdqOc8CJQaUsXNSqgb5dytsbNft1E4o0gNiulw.pdf, url: 'https://api-testingprocedure.com/storage/attachments/I3wdqOc8CJQaUsXNSqgb5dytsbNft1E4o0gNiulw.pdf' }], images: [{ id: 7, test_procedure_id: 4, path: images/m2bRXS0N27gQCg6ZhO1DDuf02G9ocNVpO3G7rHAT.png, url: 'https://api-testingprocedure.com/storage/images/m2bRXS0N27gQCg6ZhO1DDuf02G9ocNVpO3G7rHAT.png' }] }]
                                    links: { first: 'https://api-testingprocedure.com/api/v1/test-procedure?page=1', last: 'https://api-testingprocedure.com/api/v1/test-procedure?page=1', prev: null, next: null }
                                    meta: { current_page: 1, from: 1, last_page: 1, links: [{ url: null, label: '&laquo; Previous', active: false }, { url: 'https://api-testingprocedure.com/api/v1/test-procedure?page=1', label: '1', active: true }, { url: null, label: 'Next &raquo;', active: false }], path: 'https://api-testingprocedure.com/api/v1/test-procedure', per_page: 10, to: 9, total: 9 }
                                properties:
                                    data: { type: array, example: [{ id: 4, document_id: 4, title: 'Mauris id aliquet arcu', text: 'Aliquam erat volutpat. Etiam mattis viverra suscipit.', video: qwertyuiopa, video_url: 'https://www.youtube.com/watch?v=qwertyuiopa', attachments: [{ id: 1, test_procedure_id: 4, path: attachments/NiudiobXvHnkPfSXGwz6UKsBNA7mS5cVvs0aTnOo.pdf, url: 'https://api-testingprocedure.com/storage/attachments/NiudiobXvHnkPfSXGwz6UKsBNA7mS5cVvs0aTnOo.pdf' }, { id: 4, test_procedure_id: 4, path: attachments/I3wdqOc8CJQaUsXNSqgb5dytsbNft1E4o0gNiulw.pdf, url: 'https://api-testingprocedure.com/storage/attachments/I3wdqOc8CJQaUsXNSqgb5dytsbNft1E4o0gNiulw.pdf' }], images: [{ id: 7, test_procedure_id: 4, path: images/m2bRXS0N27gQCg6ZhO1DDuf02G9ocNVpO3G7rHAT.png, url: 'https://api-testingprocedure.com/storage/images/m2bRXS0N27gQCg6ZhO1DDuf02G9ocNVpO3G7rHAT.png' }] }], items: { type: object } }
                                    links: { type: object, example: { first: 'https://api-testingprocedure.com/api/v1/test-procedure?page=1', last: 'https://api-testingprocedure.com/api/v1/test-procedure?page=1', prev: null, next: null } }
                                    meta: { type: object, example: { current_page: 1, from: 1, last_page: 1, links: [{ url: null, label: '&laquo; Previous', active: false }, { url: 'https://api-testingprocedure.com/api/v1/test-procedure?page=1', label: '1', active: true }, { url: null, label: 'Next &raquo;', active: false }], path: 'https://api-testingprocedure.com/api/v1/test-procedure', per_page: 10, to: 9, total: 9 } }
                401:
                    description: '401'
                    content:
                        application/json:
                            schema:
                                type: object
                                example:
                                    message: Unauthenticated.
                                properties:
                                    message: { type: string, example: Unauthenticated. }
            tags:
                - 'Testing Procedures'
            requestBody:
                required: false
                content:
                    application/json:
                        schema:
                            type: object
                            properties:
                                document_id:
                                    type: integer
                                    description: ''
                                    example: 10
components:
    securitySchemes:
        default:
            type: apiKey
            name: DL-API-Key
            in: header
            description: ''
security:
    -
        default: []
