TrackRecordPro API Documentation TrackRecordPro

assets endpoint

Summary

API Endpoint Address

https://api.trackrecordpro.co.uk/3.0/assets

Minimum Supported API Version3.0
Supported Methods

GET
POST
PUT
DELETE

Access LevelEveryone
DescriptionAll assets tracked by TrackRecordPro are stored here. Items can be directly added via the API, or if configured as such, can be set to follow an approval process for addition and matching to an external system.

GET assets

GET /3.0/assets HTTP/1.1

Details

Fetches one or more assets from the database which must be owned by the current company.

{
    "request": {
        "url": "\/3.0\/assets",
        "endpoint": "assets",
        "requested_version": "3.0",
        "api_version": 3,
        "request_method": "Get",
        "timestamp": 1507548644,
        "session": null
    },
    "pagination": {
        "total_pages": 24,
        "total_records": 692
    },
    "response": [
        {
            "id": 1,
            "asset_no": "TEST1",
            "serial_no": "TEST1SER",
            "status": "Active",
            "next_check": "2017-10-26",
            "period": 12,
            "company_id": 1,
            "location_id": 1,
            "department_id": 1,
            "description": "Test Asset 1",
            "data": null,
            "company": {
                "id": 1,
                "name": "TrackRecordPro",
                "created": "2017-10-09 08:42:37",
                "logo": "trp.png",
                "subdomain": "trackrecordpro",
                "styles": {
                    "test": {
                        "foo": "bar",
                        "baz": 1
                    },
                    "test2": 666.7
                },
                "data": null
            },
            "location": {
                "id": 1,
                "company_id": 1,
                "description": "Location 1",
                "creationdate": "2017-10-04 00:00:00",
                "data": null
            },
            "department": {
                "id": 1,
                "company_id": 1,
                "description": "Department 1",
                "creationdate": "2017-10-04 00:00:00",
                "data": null
            }
        }
    ]
}

POST assets

POST /3.0/assets HTTP/1.1

Details

Update an entry in the assets. You must include the fields and values to update as a JSON object in the POST data.

{
    "request": {
        "url": "\/3.0\/assets\/id=42",
        "endpoint": "assets",
        "requested_version": "3.0",
        "api_version": 3,
        "request_method": "Post",
        "timestamp": 1507622071,
        "session": null
    },
    "response": {
        "records_updated": 1,
        "records_found": 1
    }
}

 

 

PUT assets

PUT /3.0/assets HTTP/1.1

Details

Describe the PUT method

Example here

DELETE assets

DELETE /3.0/assets HTTP/1.1

Details

Describe the DELETE method

Example here

Field Definitions

Expand

Invalid license

Your evaluation license of PocketQuery expired. Please contact an administrator to purchase a new license.