asn1click docs
Generate a message with exactly the values you need

To get a message with the values you need, generate it and set the fields in the same call. Everything the fields require (optional containers, list items, the CHOICE alternative) is created for you, and the result is always a valid message: a value outside its range is an error, not a broken payload.

1. Pick the content

ContentWhat you getTypical use
MINIMALOnly the mandatory fields, with minimal values.The base for setting your own values (default).
RANDOMA typical message: random optional fields, short lists and strings. Test data with variety.
FULLEvery optional field present once, one item per list.Coverage: every field of the schema appears.

2. Set the fields

Each field is one path=value line (in the API, an {"path", "value"} object).

Paths

Values

TypeWriteExample
INTEGERa number, or one of its named numbersstationType=passengerCar (= 5)
Scaled numberthe encoded integer, or the physical value with the unit of the schema latitude=41.3875 degree, speedValue=13.89 m/s
ENUMERATEDits identifiertermination=isCancellation
BOOLEANtrue / false
BIT STRING0/1 characters, or the named bits directionalUse={ingressPath}
OCTET STRINGhex0a1b
Stringsthe textname=Gran Via
Units are converted only where the schema declares one (@unit in the ETSI dictionaries: latitude and longitude in degrees, speeds in m/s, lengths in metres…). km/h are not accepted: 50 km/h = 13.89 m/s. Where there is no unit, give the encoded integer as described in the type (e.g. HeadingValue in CDD 4.3, in 0.1 degree).

Examples

A car at 50 km/h with station id 1234 (CAM 2.3.1)

curl -X POST "https://api.asn1click.com/generate" \
  -H "X-Ref: _Cam_v2_3" -H "Content-Type: application/json" \
  --data '{"format":"UPER","content":"MINIMAL","overrides":[
    {"path":"header.stationId","value":"1234"},
    {"path":"cam.camParameters.basicContainer.stationType","value":"passengerCar"},
    {"path":"cam.camParameters.basicContainer.referencePosition.latitude","value":"41.3870 degree"},
    {"path":"cam.camParameters.basicContainer.referencePosition.longitude","value":"2.1701 degree"},
    {"path":"cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.speed.speedValue","value":"13.89 m/s"}]}'

An intersection with a bike lane (MAPEM)

curl -X POST "https://api.asn1click.com/generate" \
  -H "X-Ref: _Mapem_v2" -H "Content-Type: application/json" \
  --data '{"format":"JER","content":"MINIMAL","overrides":[
    {"path":"map.intersections[0].name","value":"Gran Via x Passeig de Gracia"},
    {"path":"map.intersections[0].id.id","value":"1001"},
    {"path":"map.intersections[0].refPoint.lat","value":"41.3918 degree"},
    {"path":"map.intersections[0].refPoint.long","value":"2.1650 degree"},
    {"path":"map.intersections[0].laneSet[1].laneID","value":"2"},
    {"path":"map.intersections[0].laneSet[1].laneAttributes.directionalUse","value":"{ingressPath}"},
    {"path":"map.intersections[0].laneSet[1].laneAttributes.laneType.bikeLane","value":"1000000000000000"}]}'

With an AI assistant the same is one request in plain language; the assistant calls generate with set lines like the ones above (see AI assistants).

The JSON and XML you get