Skip to content

Type Metadata

Resolve a PLC type’s metadata — currently, an enumeration’s members. Requires feature flag TypeMetadata enabled — disabled by default, and answers 501 rather than 404 when off (see Error Codes).

TypeMetadata is a separate flag from Symbols deliberately: resolving a type for the first time makes the connection upload the running program’s whole type system, a much heavier operation than reading or browsing one symbol. An operator may want symbol browsing available without paying for that upload, hence the separate switch.

Resolve an Enum’s Members

GET /api/plcs/{plcId}/types/{typeName}/enum-members

Policy: ReadAccess

curl http://localhost:5000/api/plcs/Line1/types/deaReturnType/enum-members
{
  "data": {
    "typeName": "deaReturnType",
    "members": [
      { "name": "SUCCESS", "value": 100 },
      { "name": "NOT_FOUND", "value": 101 }
    ]
  },
  "error": null
}

members are returned in declaration order, exactly as the running PLC program declares them — not sorted by value, not renumbered. Values are neither dense nor necessarily zero-based: code that infers a member’s value from its position, rather than reading value, will misreport as soon as the PLC enum has a gap or an explicit non-sequential assignment.

Caching

Results are cached for the life of the ADS connection, since a running program’s type metadata is fixed for as long as that program is running. The consequence: a PLC download that changes an enum’s members is not reflected in this endpoint’s response until the connection is re-established (e.g. adsify restarts, or the PLC connection drops and reconnects). If you’ve just downloaded a changed enum and still see the old members, this is why.

Rate Limiting

Shares RateLimiting:SymbolBrowsing with the Symbols endpoints — default 10 requests/second. There is no separate rate-limit policy for type metadata.