ElementType

  • 15.5
This article is may not be up to date with the latest stable release of M4.

Description

The ElementType endpoint provides the API consumer with access to methods pertaining to the element types available in M4. The endpoint allows consumers to retrieve specific types or pull all configured types.

Methods

URL base/Assignment/ElementType/Specification
Action GET
Description Returns a data dictionary that details the available web service methods related to the ElementType.
Parameters None
 Returns  A JSON object with method descriptions
Sample Return Object
[
        {
            "HttpAction": "Get",
            "MethodName": "GetElementType",
            "Description": "Gets the record for a single Element Type given the passed in ID value (see Path).",
            "Path": "/ElementType/GetElementType/2532"
        }
]
    
URL base/Assignment/ElementType/GetElementType/ID
Action GET
Description Returns an Element Type object when given the ID of a valid Element Type in the M4 database.
Parameters
Name Required? Code Description
ID Yes Integer An integer value representing the ID of an Element Type in the M4 database.
Returns A list of JSON Element Type data objects
Sample Return Object
{
    "ID": 345,
    "Description": "Element Type Description",
    "Code": "AT-88",
    "LinkTable": "",
    "DescField": "DESC",
    "SortBy": "",
    "InputMask": "",
    "Image": "Image.png",
    "Icon": "Icon.ico",
    "TermStructAssignment": false,
    "CreateLineCard": false,
    "IsShared": false
}
    
URL base/Assignment/ElementType/GetElementTypes
Action GET
Description Returns a complete list of Element Type objects from the M4 database.
Returns A list of JSON Element Type data objects
Sample Return Object
[
    {
        "ID": 123,
        "Description": "Element Type Description",
        "Code": "BB-8",
        "LinkTable": "",
        "DescField": "DESC",
        "SortBy": "",
        "InputMask": "",
        "Image": "Image.png",
        "Icon": "Icon.ico",
        "TermStructAssignment": null,
        "CreateLineCard": false,
        "IsShared": false
    },
    {
        "ID": 456,
        "Description": "Element Type Description",
        "Code": "C-3PO",
        "LinkTable": "",
        "DescField": "DESC",
        "SortBy": "",
        "InputMask": "",
        "Image": "Image.png",
        "Icon": "Icon.ico",
        "TermStructAssignment": false,
        "CreateLineCard": null,
        "IsShared": false
    },
    {
        "ID": 888,
        "Description": "Element Type Description",
        "Code": "R2-D2",
        "LinkTable": "",
        "DescField": "DESC",
        "SortBy": "",
        "InputMask": "",
        "Image": "Image.png",
        "Icon": "Icon.ico",
        "TermStructAssignment": false,
        "CreateLineCard": false,
        "IsShared": null
    }
]
    

Was this article helpful?

Related Articles