Schema information (endpoint name Schema)ΒΆ

The schema service provides information regarding the range of records, record types, metadata elements and relationships configured for a CollectiveAccess system.

The tables query returns a list of valid primary table name, on which search, browse, edit and other record-oriented service operate:

query {
        tables {
          tables {
                name,
                code,
                types {
                  name,
                  code
                }
          }
        }
  }

The query returns a list of tables, with display names, codes and a list of available types for each.

The types query returns the same structure as the tables query, but for a single table:

query {
      types(table: "ca_objects") {
              name,
              code,
              types {
                name,
                code
              }
      }
}

The response will be in the form:

{
        "ok": true,
        "data": {
                "types": {
                        "name": "objects",
                        "code": "ca_objects",
                        "types": [
                                {
                                        "name": "Archival/Documentation",
                                        "code": "archival_item"
                                },
                                {
                                        "name": "Artifacts",
                                        "code": "artifact_item"
                                },
                                {
                                        "name": "Ebot",
                                        "code": "ebot_item"
                                },
                                {
                                        "name": "Ethnographic",
                                        "code": "ethno_item"
                                },
                                {
                                        "name": "Faunal",
                                        "code": "faunal_item"
                                },
                                {
                                        "name": "Images",
                                        "code": "image_item"
                                },
                                {
                                        "name": "Osteology",
                                        "code": "osteology_item"
                                }
                        ]
                }
        }
}

The bundles query will return a list of all available data bundles, including codes, settings, help text and type restrictions for a given table, and optionally, a type:

query {
      bundles(table: "ca_objects", type: "ebot_item") {
        bundles {
              name,
              code,
              description,
              type,
              dataType,
              list,
              typeRestrictions {
                      name,
                      type,
                      minAttributesPerRow,
                      maxAttributesPerRow
              },
              settings {
                      name,
                      value
              },
              subelements {
                      name,
                      code,
                      type,
                      dataType,
                      list,
                      settings {
                              name,
                              value
                      }
              }
        }
      }
}

This query can be used to discover queryable and editable data elements from any record type in the CollectiveAccess system.