Insight Horizon
politics /

Material Types API

Media type: application/json

Type: json

Content:

{ "$schema": "", "description": "A collection of material types", "type": "object", "properties": { "mtypes": { "description": "List of material types", "id": "mtype", "type": "array", "items": { "type": "object", "$schema": "", "description": "A material type", "properties": { "id": { "type": "string" }, "name": { "description": "label for the material type", "type": "string" }, "source": { "description": "origin of the material type record", "type": "string" }, "metadata": { "type": "object", "readonly": true, "$schema": "", "id": "metadata.schema", "title": "Metadata Schema", "description": "Metadata about creation and changes to records, provided by the server (client should not provide)", "properties": { "createdDate": { "description": "Date and time when the record was created", "type": "string", "format": "date-time" }, "createdByUserId": { "description": "ID of the user who created the record (when available)", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" }, "createdByUsername": { "description": "Username of the user who created the record (when available)", "type": "string" }, "updatedDate": { "description": "Date and time when the record was last updated", "type": "string", "format": "date-time" }, "updatedByUserId": { "description": "ID of the user who last updated the record (when available)", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" }, "updatedByUsername": { "description": "Username of the user who last updated the record (when available)", "type": "string" } }, "additionalProperties": false, "required": [ "createdDate" ] } }, "additionalProperties": false, "required": [ "name" ] } }, "totalRecords": { "description": "Estimated or exact total number of records", "type": "integer" } }, "required": [ "mtypes", "totalRecords" ]
}

Example:

{ "mtypes": [ { "name": "book" }, { "name": "dvd" } ], "totalRecords": 2
}

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Media type: text/plain

Type: any

Example:

unable to list material-types -- malformed parameter 'query', syntax error at column 6

Media type: text/plain

Type: any

Example:

unable to list material-types -- unauthorized

Internal server error, e.g. due to misconfiguration

Media type: text/plain

Type: any

Example:

internal server error, contact administrator