Skip to main content

Common refusals

A client written for a more lenient broker tends to trip over the same few rules. Each entry below gives what you get back, why, and what to send instead.

  • 400 on a timestamp ending in +00:00

    Andromeda takes UTC only in the form ending in Z, with at most six fractional digits. Convert the time to UTC and end it with Z. Date-times has the full rule.

  • 400 naming unitCode

    The value isn't a UN/CEFACT Recommendation 20 common code. The match is exact, so kgm is refused as well as km/h and Celsius. Send the code itself, such as CEL, KMH or KGM.

  • 400 naming an attribute with a hyphen or a dot

    A name holds letters, digits and _ only, and that applies after a prefix too, so ex:speed-limit is refused just like speed-limit. Rename the attribute to something like speedLimit, or map the term to an IRI in your @context.

  • 400 naming an attribute called value, unitCode or another core term

    The core @context reserves those names for the members of an attribute. Pick another name. Identifiers, units and scopes lists every reserved term.

  • 400 InvalidRequest naming a query parameter

    The parameter is misspelt, or the endpoint doesn't define it. Andromeda refuses it rather than answer a different question from the one you asked. Fix the name.

  • 400 for a query that is too wide

    The query names no type, attrs, q, geoquery or id, and it isn't local=true. Add one of them.

  • 400 naming a language tag

    en_US and spellings like it aren't BCP 47 tags. Use en-US.

  • 400 naming a Relationship object

    The target is a bare name, and a Relationship points at an absolute URI. Use the target entity's full identifier, such as urn:ngsi-ld:Building:1.

  • 411 with no body

    The request has no Content-Length, which is what happens when a client streams the body in chunks. Send the body with its length.

  • 415 with no body

    Content-Type is missing or isn't one Andromeda takes. Send application/json or application/ld+json.

  • 400 on application/ld+json with a context Link header

    A request carries its @context in one place only. Put it in the body, or send application/json with the Link header.