NAV -image
bash

Introduction

API Reference for Diesel Laptops "Testing Procedures" API Service.

This documentation aims to provide all the information you need to work with our API.

Base URL

https://api-testingprocedures.com

Authenticating requests

Authenticate requests to this API's endpoints by sending a DL-API-Key header with the value "{YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by visiting your dashboard and clicking Generate API token.

Documents

List

requires authentication

Retrieve all documents

Example request:

curl -X GET \
    -G "https://api-testingprocedures.com/api/v1/document?dependency_type=module&dependency_id=20&sort_by=name&sort_dir=asc&page=20&per_page=20" \
    -H "DL-API-Key: {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"module_id":12}'

Example response (200):

{
    "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": "« Previous",
                "active": false
            },
            {
                "url": "https:\/\/api-testingprocedure.com\/api\/v1\/document?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "https:\/\/api-testingprocedure.com\/api\/v1\/document",
        "per_page": 10,
        "to": 9,
        "total": 9
    }
}

Example response (401):

{
    "message": "Unauthenticated."
}

Request   

GET api/v1/document

Query Parameters

dependency_type  string optional  
Filter by the type of the dependency. Possible values: year_range, module.

dependency_id  integer optional  
Filter by the ID of the dependency.

sort_by  string optional  
Field to sort by. Defaults to name. Possible values: name.

sort_dir  string optional  
Sort direction. Defaults to asc. Possible values: asc or desc.

page  integer optional  
Page of result to return. Defaults to 1.

per_page  integer optional  
How many rows to return per page. Defaults to 10, maximum 100.

Body Parameters

module_id  integer optional  

Retrieve

requires authentication

Retrieve the document

Example request:

curl -X GET \
    -G "https://api-testingprocedures.com/api/v1/document/18" \
    -H "DL-API-Key: {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"module_id":14}'

Example response (200):

{
    "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"
                    }
                ]
            }
        ]
    }
}

Example response (401):

{
    "message": "Unauthenticated."
}

Request   

GET api/v1/document/{id}

URL Parameters

id  integer optional  
The ID of the document.

Body Parameters

module_id  integer optional  

Testing Procedures

List

requires authentication

Retrieve all testing procedures.

Example request:

curl -X GET \
    -G "https://api-testingprocedures.com/api/v1/test-procedure?document_id=10&sort_by=name&sort_dir=asc&page=7&per_page=20" \
    -H "DL-API-Key: {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"document_id":10}'

Example response (200):

{
    "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": "« Previous",
                "active": false
            },
            {
                "url": "https:\/\/api-testingprocedure.com\/api\/v1\/test-procedure?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "https:\/\/api-testingprocedure.com\/api\/v1\/test-procedure",
        "per_page": 10,
        "to": 9,
        "total": 9
    }
}

Example response (401):

{
    "message": "Unauthenticated."
}

Request   

GET api/v1/test-procedure

Query Parameters

document_id  integer optional  
Filter by ID of the document.

sort_by  string optional  
Field to sort by. Defaults to name. Possible values: name.

sort_dir  string optional  
Sort direction. Defaults to asc. Possible values: asc or desc.

page  integer optional  
Page of result to return. Defaults to 1.

per_page  integer optional  
How many rows to return per page. Defaults to 10, maximum 100.

Body Parameters

document_id  integer optional