TrackRecordPro API Documentation TrackRecordPro

departments endpoint

Summary

API Endpoint Address

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

Minimum Supported API Version3.0
Supported Methods

GET
POST
PUT
DELETE

Access LevelEveryone
DescriptionThis endpoint allows management of departments, to which assets can optionally be assigned

GET departments

GET /3.0/departments HTTP/1.1

Details

Retrieve the list of departments associated with the current company

{
    "request": {
        "url": "\/3.0\/departments",
        "endpoint": "departments",
        "requested_version": "3.0",
        "api_version": 3,
        "request_method": "Get",
        "timestamp": 1507549167,
        "session": null
    },
    "pagination": {
        "total_pages": 24,
        "total_records": 692
    },
    "response": [
        {
            "id": 1,
            "company_id": 1,
            "description": "Department 1",
            "creationdate": "2017-10-04 00:00:00",
            "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
            }
        }
    ]
}

POST departments

POST /3.0/departments HTTP/1.1

Details

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

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

 

 

PUT departments

PUT /3.0/departments HTTP/1.1

Details

Describe the PUT method

Example here

DELETE departments

DELETE /3.0/departments 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.