Project API Documentation - Version 1

Resources - Project (Projects)

A project represents a unique grouping of work. This may consist of what is commonly called a project, team, department, work package, etc. It’s a logical grouping of a work unit.

This data is sourced from the BAS Projects Database.

Resource model

Name Property Name Data Type Optional Description
ID id Integer No Unique identifier
Parent ID parent_id Integer Yes Identifier of parent project
Date Start date_start Date Yes Date represents the approximate date that the project either began or is valid from.
Date Finish date_finish Date Yes Date represents the approximate date that the project either finished or is valid unto.
Name name String No Full project name - usually a very long name.
Short Name short_name String Yes Short project name - often an acronym form of the longer project name.
Project Type project_type ProjectType Yes Defines categorisation information about a project. This is normally attached when retrieving projects as part of a collection.
People people PersonRef Yes List of people references attached to the project. The people references are IDs that relate to entries in the People API
Inserted by insert_by String No User ID of the user who inserted the project
Inserted on insert_on DateTime No DateTime of insert of record
Updated by update_by String No User ID of the user who updated the project
Updated on update_on DateTime No DateTime of update of record

Note: This model is liable to change in future API versions.

Example (JSON)

{
    "name": "Dynamics of the earth system and ice-core record",     
    "short_name": "QDESIRE",     
    "insert_by": "dacon",     
    "insert_on": "2015-02-23 14:14:04",     
    "update_by": "dacon",     
    "update_on": "2015-02-23 14:14:04",     
    "id": 380,     
    "date_start": "2007-03-01",     
    "date_finish": "2010-10-26",     
    "parent_id": 251,
    "people": [
        {
            "id": 175,
            "email_address": "epab@bas.ac.uk",
            "email_id": "epab",
            "name_reference": "epab"
        }
    ],     
    "project_type": {         
        "description": "BAS Public Website team - 2015-",         
        "name": "Team",         
        "id": "TEAM2015",         
        "nerc_vocab_identifier": {             
            "list": "ZZ5",             
            "code": "TEAM2015"         
        }
    } 
}

Resource methods

[GET]/projects

Returns a listing of all projects.

Includes a meta array containing the number of resources returned.

Traits
Trait Enabled
Authenticated Yes
Parameters

None.

Options

None.

Example request

URL: https://api.bas.ac.uk/projects/v1/projects

Note: Interactive examples for this method may be covered in the examples document.

Headers
Key Value
Content-Type application/json
Accept application/json
Body (Raw)

N/A

Example response (200 OK)
Headers
Key Value
Content-Type application/json
Body (JSON)

Note: For brevity, only the first and last records are shown.

{
    "data": [{
            "name": "Air unit",
            "short_name": null,
            "insert_by": null,
            "insert_on": null,
            "update_by": null,
            "update_on": null,
            "id": 41,
            "date_start": null,
            "date_finish": null,
            "project_type": {
                "description": "BAS Public Website team - 2015-",
                "name": "Team",
                "id": "TEAM2015",
                "nerc_vocab_identifier": {
                    "list": "ZZ5",
                    "code": "TEAM2015"
                }
            },
            "people": [
                {
                    "id": 175,
                    "email_address": "epab@bas.ac.uk",
                    "email_id": "epab",
                    "name_reference": "epab"
                }
            ]                
            "parent_id": 37
        },
        {
            "name": "British Antarctic Survey Teams - Web Site",
            "short_name": null,
            "insert_by": null,
            "insert_on": null,
            "update_by": null,
            "update_on": null,
            "id": 32,
            "date_start": null,
            "date_finish": null,
            "people": [
                {
                    "id": 2118,
                    "email_address": "dea@bas.ac.uk",
                    "email_id": "dea",
                    "name_reference": "dea"
                },
                {
                    "id": 1818,
                    "email_address": "craoma@bas.ac.uk",
                    "email_id": "craoma",
                    "name_reference": "craoma"
                }
            ]                
            "project_type": {
                "description": "BAS Public Website team - 2015-",
                "name": "Team",
                "id": "TEAM2015",
                "nerc_vocab_identifier": {
                    "list": "ZZ5",
                    "code": "TEAM2015"
                }
            },
            "parent_id": null
        }
    ],
    "meta": {
        "count": 127
    }
}

[GET]/projects/{id}

Returns a specified project by its ID.

Traits
Trait Enabled
Authenticated Yes
Parameters
Name Field Name Data Type Required Valid Value(s) Description
ID {id} Integer Yes A project -> id Used to specify which project to return
Options

None.

Example request

URL: https://api.bas.ac.uk/projects/v1/projects/3

Note: Interactive examples of this method may be covered in the examples document.

Headers
Key Value
Content-Type application/json
Accept application/json
Body (Raw)

N/A

Example request (200 OK)
Headers (Redundant headers removed)
Key Value
Content-Type application/json
Body (JSON)
{
    "data": {
        "name": "Project Database Population",
        "short_name": null,
        "insert_by": "dacon",
        "insert_on": "2015-01-21 00:00:00",
        "update_by": "dacon",
        "update_on": "2015-01-21 00:00:00",
        "id": 3,
        "date_start": "2015-01-21",
        "date_finish": "2015-04-01"
    }
}
Example request (404 Not Found)

Using URL: https://api.bas.ac.uk/projects/v1/projects/0.

Headers (Redundant headers removed)
Key Value
Content-Type application/json
Body (JSON)
{
    "errors": [
        {
            "details": {
                "model_reference_error": {
                    "project": [
                        "No project could be found with an id of: [0]."
                    ]
                }
            },
            "resolution": "Ensure you are providing a valid project id.",
            "type": "model_not_found"
        }
    ]
}

Note: The format of this error will change in future API versions (to standardise against the json:api spec.


This information may be out of date whilst this website is being redeveloped. Until then, if you have any problems using an API documented here, please contact the relevant project maintainer.