KeyFieldList

Key Field List enable users to define their own set of layouts to display data. It contains:

  • List name and description\

  • Layout definition for each supported Entity Type (for more details, refer to KeyFieldDefinition object)\

  • Security: each user can define who will have Read and Full access to the list\

For details about the API, including syntax and additional information, please follow this link:
https://developer.maximizer.com/reference/octopus-api-getting-started

HowTo's

Read - Only entries current user has access to

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "KeyFieldList": {
        "Scope": {
            "Fields": {
                "Key": 1
            }
        },
        "Criteria": {
            // This is a special filter that ensures only entries which the current user has access to are returned. Note that this is OUTSIDE the SearchCriteria
            "SecAccess": {
                "$ALLOWS": "$CURRENTUSER()"
            },
            "SearchCriteria": {},
            "Top": 3
        }
    }
}

Read - Specific target

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "KeyFieldList": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "Target": 1
            }
        },
        "Criteria": {
            "SearchQuery": {
                "Target": {
                    "$EQ": "my_target"
                }
            },
            "Top": 3
        }
    },
    "Compatibility": {
        "KeyFieldListObject": "1.0"
    }
}

MetaData

Read KeyFieldList metadata (simple)

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Schema": {
        "Scope": {
            "Fields": 1
        },
        "Criteria": {
            "SearchQuery": {
                "Key": {
                    "$TREE": "/KeyFieldList"
                }
            }
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

Read KeyFieldList metadata (more)

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "Schema": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "Alias": 1,
                "Type": 1,
                "Name": 1,
                "AppliesTo": 1,
                "Sortable": 1,
                "Nullable": 1,
                "Assignable": 1,
                "Queryable": 1,
                "Mandatory": 1,
                "Attributes": 1,
                "HasOption": 1,
                "DisplayValue": 1
            }
        },
        "Criteria": {
            "SearchQuery": {
                "Key": {
                    "$TREE": "/KeyFieldList"
                }
            }
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0"
    }
}

FieldOptions

Read KeyFieldList FieldOptions

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "KeyFieldList": {
        "FieldOptions": {
            "SecAccess": {
                "Read": [
                    {
                        "Key": {
                            "Uid": 1,
                            "Value": 1
                        },
                        "DisplayValue": 1
                    }
                ],
                "Write": [
                    {
                        "Key": {
                            "Uid": 1,
                            "Value": 1
                        },
                        "DisplayValue": 1
                    }
                ]
            }
        }
    }
}

KeyFieldList CRUD

Read - KeyFieldList

// POST https://api.maximizer.com/octopus/Read
// Authorization: Bearer <token>
{
    "KeyFieldList": {
        "Scope": {
            "Fields": {
                "Key": 1,
                "Name": 1,
                "Target": 1, // available only in KeyFieldListObject version 1.x
                "Description": 1,
                "RequestedBy": 1,
                "SecAccess": 1,
                "DisplayValue": 1
            }
        },
        "Criteria": {
            "SearchQuery": {},
            "Top": 3
        }
    },
    "Compatibility": {
        "KeyFieldListObject": "1.0"
    }
}

Create - KeyFieldList

// POST https://api.maximizer.com/octopus/Create
// Authorization: Bearer <token>
{
    "KeyFieldList": {
        "Data": {
            "Key": null,
            "Name": "Test KeyFieldList from Postman", // mandatory
            "Target": "my_target", // mandatory
            "Description": "This is a description for KeyFieldList",
            "RequestedBy": {
                "Uid": "USER"
            }
        }
    }
}

Update - KeyFieldList

// POST https://api.maximizer.com/octopus/Update
// Authorization: Bearer <token>
{
    // Target field CANNOT be updated
    "KeyFieldList": {
        "Data": {
            "Key": "S2V5RmllbGRMaXN0CTM3MDQ3NTE0MA==", // mandatory
            "Name": "Test KeyFieldList from Postman Updated",
            "Description": "This is a description for KeyFieldList Updated",
            "RequestedBy": {
                "Uid": "USER2"
            }
        }
    }
}

Delete - KeyFieldList

// POST https://api.maximizer.com/octopus/Delete
// Authorization: Bearer <token>
{
    // Deleting a Key Field List will delete all related Key Field Definitions
    "KeyFieldList": {
        "Data": {
            "Key": "S2V5RmllbGRMaXN0CTI3NTExNDA1NA==" // mandatory
        }
    }
}