NAV
bash javascript

Info

Welcome to the generated API reference. Get Postman Collection

Authentication

You should have been handed out an API key to use this service. (If not, please request yours)

The API expects you to include this API key in all your requests, in a header that looks like the following:

X-Authorization: api-key

Diagram Types

Administration of Diagram Types

List all diagram types

List all diagram types available. NOTE: all other categorizations will be listed in the meta field.

Query Parameters

Binding Type Status Description
model_id number optional Show diagram types for this particular model ID
page number optional which page of results to return; defaults to page 1
per_page number optional how many rows to return, per page; defaults to 10, maximum 200
sort_dir string optional sort direction; defaults to "asc"
Possible values: asc or desc

Example request:

curl -X GET -G "https://api-dieselwiring.com/api/v1/diagram_type" \
    -H "X-Authorization: {api-key}" \
    -H "Accept: application/json"
const url = new URL("https://api-dieselwiring.com/api/v1/diagram_type");

let headers = {
    "X-Authorization": "{api-key}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": [
        {
            "id": 3,
            "name": "Name",
            "number_of_diagrams": 10
        }
    ],
    "meta": {
        "total": 4,
        "found": 4,
        "other_query_info": null
    }
}

Example response (403):

{
    "error": {
        "header": "",
        "message": "Unauthorized."
    }
}

HTTP Request

GET api/v1/diagram_type

Diagrams

Administration of Diagrams

Diagrams usage stats

View a subscriber's diagram usage stats.

Route Bindings

Binding Type Status Description
subscriber_uid string optional the id of the subscriber.

Query Parameters

Binding Type Status Description
verbose boolean optional if set to true, the "usage.used" array will contain full diagram data instead of just IDs.

Post Parameters

(no post parameters)

Example request:

curl -X GET -G "https://api-dieselwiring.com/api/v1/1/usage-stats" \
    -H "X-Authorization: {api-key}" \
    -H "Accept: application/json"
const url = new URL("https://api-dieselwiring.com/api/v1/1/usage-stats");

let headers = {
    "X-Authorization": "{api-key}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": {
        "used": [
            {
                "id": 1,
                "diagram_type_id": 1,
                "make_id": 1,
                "model_id": 1,
                "model_year_id": 1,
                "url": "https:\/\/...",
                "preview_url": "https:\/\/..."
            },
            {
                "id": 2,
                "diagram_type_id": 1,
                "make_id": 1,
                "model_id": 1,
                "model_year_id": 2,
                "url": "https:\/\/...",
                "preview_url": "https:\/\/..."
            }
        ],
        "max": 2
    }
}

HTTP Request

GET api/v1/{uid}/usage-stats

List all diagrams

List all diagrams available.

Route Bindings

(no route parameters)

Query Parameters

Binding Type Status Description
uncategorized boolean optional Show only not categorized diagrams
diagram_type_id integer optional Show diagrams for this particular diagram type ID
model_id integer optional Show diagrams for this particular model ID
page number optional which page of results to return; defaults to page 1
per_page number optional how many rows to return, per page; defaults to 10, maximum 200
sort_dir string optional sort direction; defaults to "asc"
Possible values: asc or desc

Post Parameters

(no post parameters)

Example request:

curl -X GET -G "https://api-dieselwiring.com/api/v1/diagram" \
    -H "X-Authorization: {api-key}" \
    -H "Accept: application/json"
const url = new URL("https://api-dieselwiring.com/api/v1/diagram");

let headers = {
    "X-Authorization": "{api-key}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": [
        {
            "id": 785,
            "diagram_type_id": 56,
            "model_ids": [
                326
            ],
            "name": "diagram_name.PDF",
            "preview_url": "http:\/\/...",
            "token": "SdT...",
            "preview_pages": "1",
            "url": ""
        }
    ],
    "meta": {
        "total": 2,
        "found": 2,
        "other_query_info": null
    }
}

Example response (403):

{
    "error": {
        "header": "",
        "message": "Unauthorized."
    }
}

Example response (422):

{
    "error": {
        "header": "Not quite right",
        "message": "The password field is required.",
        "topic_id": "Password"
    }
}

HTTP Request

GET api/v1/diagram

Retrieve a diagram

Get an instance of a diagram record.

Route Bindings

Binding Type Status Description
id number required the id of the record to fetch.

Query Parameters

(no query parameters)

Post Parameters

Binding Type Status Description
subscriber_uid string optional the id of the subscriber fetching the record (for usage stats).

Example request:

curl -X GET -G "https://api-dieselwiring.com/api/v1/diagram/1" \
    -H "X-Authorization: {api-key}" \
    -H "Accept: application/json"
const url = new URL("https://api-dieselwiring.com/api/v1/diagram/1");

let headers = {
    "X-Authorization": "{api-key}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": {
        "id": 785,
        "diagram_type_id": 56,
        "model_ids": [
            326
        ],
        "name": "diagram_name.PDF",
        "preview_url": "http:\/\/...",
        "token": "SdT...",
        "preview_pages": "1",
        "url": ""
    },
    "meta": {
        "usage": {
            "used": [],
            "max": 10
        }
    }
}

Example response (403):

{
    "error": {
        "header": "",
        "message": "Unauthorized."
    }
}

Example response (422):

{
    "error": {
        "header": "Not quite right",
        "message": "The password field is required.",
        "topic_id": "Password"
    }
}

HTTP Request

GET api/v1/diagram/{id}

View diagram

View a diagram's PDF. NOTE: this counts towards the user's viewing quota.

Route Bindings

Binding Type Status Description
JWT string required JWT encoding "token" and "subscriber_uid"

Query Parameters

(no query parameters)

Post Parameters

(no post parameters)

Example request:

curl -X GET -G "https://api-dieselwiring.com/api/v1/diagram/1/diagram" \
    -H "X-Authorization: {api-key}" \
    -H "Accept: application/json"
const url = new URL("https://api-dieselwiring.com/api/v1/diagram/1/diagram");

let headers = {
    "X-Authorization": "{api-key}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

[]

Example response (402):

[]

Example response (404):

[]

HTTP Request

GET api/v1/diagram/{jwt_token}/diagram

Diagram preview PDF

View a diagram's preview PDF.

Route Bindings

Binding Type Status Description
token string required Token of the diagram record

Query Parameters

(no query parameters)

Post Parameters

(no post parameters)

Example request:

curl -X GET -G "https://api-dieselwiring.com/api/v1/diagram/1/preview" \
    -H "X-Authorization: {api-key}" \
    -H "Accept: application/json"
const url = new URL("https://api-dieselwiring.com/api/v1/diagram/1/preview");

let headers = {
    "X-Authorization": "{api-key}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

[]

Example response (402):

[]

Example response (404):

[]

HTTP Request

GET api/v1/diagram/{token}/preview

Industries

Administration of industries

List all industries

List all industries available.

Query Parameters

Binding Type Status Description
page number optional which page of results to return; defaults to page 1
per_page number optional how many rows to return, per page; defaults to 10, maximum 200
sort_dir string optional sort direction; defaults to "asc"
Possible values: asc or desc

Example request:

curl -X GET -G "https://api-dieselwiring.com/api/v1/industry" \
    -H "X-Authorization: {api-key}" \
    -H "Accept: application/json"
const url = new URL("https://api-dieselwiring.com/api/v1/industry");

let headers = {
    "X-Authorization": "{api-key}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": [
        {
            "id": 3,
            "name": "Name",
            "number_of_diagrams": 10
        }
    ],
    "meta": {
        "total": 4,
        "found": 4,
        "other_query_info": null
    }
}

Example response (403):

{
    "error": {
        "header": "",
        "message": "Unauthorized."
    }
}

HTTP Request

GET api/v1/industry

Makes

Administration of Makes

List all makes

List all makes available.

Query Parameters

Binding Type Status Description
industry_id number optional Show makes for this particular industry ID
page number optional which page of results to return; defaults to page 1
per_page number optional how many rows to return, per page; defaults to 10, maximum 200
sort_dir string optional sort direction; defaults to "asc"
Possible values: asc or desc

Example request:

curl -X GET -G "https://api-dieselwiring.com/api/v1/make" \
    -H "X-Authorization: {api-key}" \
    -H "Accept: application/json"
const url = new URL("https://api-dieselwiring.com/api/v1/make");

let headers = {
    "X-Authorization": "{api-key}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": [
        {
            "id": 3,
            "name": "Name",
            "number_of_diagrams": 10
        }
    ],
    "meta": {
        "total": 4,
        "found": 4,
        "other_query_info": null
    }
}

Example response (403):

{
    "error": {
        "header": "",
        "message": "Unauthorized."
    }
}

HTTP Request

GET api/v1/make

Models

Administration of Models

List all models

List all models available.

Route Bindings

(no route bindings)

Query Parameters

Binding Type Status Description
year_id integer optional Show models for this particular year ID
page number optional which page of results to return; defaults to page 1
per_page number optional how many rows to return, per page; defaults to 10, maximum 200
sort_dir string optional sort direction; defaults to "asc"
Possible values: asc or desc

Post Parameters

(no post parameters)

Example request:

curl -X GET -G "https://api-dieselwiring.com/api/v1/model" \
    -H "X-Authorization: {api-key}" \
    -H "Accept: application/json"
const url = new URL("https://api-dieselwiring.com/api/v1/model");

let headers = {
    "X-Authorization": "{api-key}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": [
        {
            "id": 326,
            "name": "DD13",
            "number_of_diagrams": 1,
            "year_id": 328
        }
    ],
    "meta": {
        "total": 2,
        "found": 2,
        "other_query_info": null
    }
}

Example response (403):

{
    "error": {
        "header": "",
        "message": "Unauthorized."
    }
}

HTTP Request

GET api/v1/model

Types

Administration of types

List all types

List all types available.

Query Parameters

Binding Type Status Description
make_id integer optional Show types for this particular make ID
page integer optional which page of results to return; defaults to page 1
per_page integer optional how many rows to return, per page; defaults to 10, maximum 200
sort_dir string optional sort direction; defaults to "asc"
Possible values: asc or desc

Example request:

curl -X GET -G "https://api-dieselwiring.com/api/v1/type" \
    -H "X-Authorization: {api-key}" \
    -H "Accept: application/json"
const url = new URL("https://api-dieselwiring.com/api/v1/type");

let headers = {
    "X-Authorization": "{api-key}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": [
        {
            "id": 3,
            "name": "Name",
            "number_of_diagrams": 10
        }
    ],
    "meta": {
        "total": 4,
        "found": 4,
        "other_query_info": null
    }
}

Example response (403):

{
    "error": {
        "header": "",
        "message": "Unauthorized."
    }
}

HTTP Request

GET api/v1/type

Years

Administration of years

List all years

List all years available.

Query Parameters

Binding Type Status Description
type_id number optional Show years for this particular type ID
page number optional which page of results to return; defaults to page 1
per_page number optional how many rows to return, per page; defaults to 10, maximum 200
sort_dir string optional sort direction; defaults to "asc"
Possible values: asc or desc

Example request:

curl -X GET -G "https://api-dieselwiring.com/api/v1/year" \
    -H "X-Authorization: {api-key}" \
    -H "Accept: application/json"
const url = new URL("https://api-dieselwiring.com/api/v1/year");

let headers = {
    "X-Authorization": "{api-key}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": [
        {
            "id": 330,
            "name": "2012 - 2015",
            "number_of_diagrams": 10,
            "make_id": 65,
            "type_id": 1
        }
    ],
    "meta": {
        "total": 3,
        "found": 1,
        "other_query_info": null
    }
}

Example response (403):

{
    "error": {
        "header": "",
        "message": "Unauthorized."
    }
}

HTTP Request

GET api/v1/year