Closed Dan-Vizor closed 2 years ago
This library expects the objects to add to the collection to be in a TAXII envelope structure. This is because the "add objects" endpoint is defined as having a TAXII envelope as the payload of the request. So you need to create an envelope structure to pass your objects in. A simple structure like:
{
"objects": [ ]
}
ought to work, where the objects
property contains the contents of your bundle. Note that this library doesn't support passing stix2 library objects; supported types include plain dicts and JSON. So you would have to convert your stix2 library objects, e.g. by serializing them to JSON.
I've been trying to upload the following STIX data to a local TAXII 2.1 server:
when uploading using
collection.add_objects()
it gives the errorThis bundle was generated using the stix2 python module. I don't believe this is a formatting error as I have put it through the
stix2-validator
which said it's valid.Does anyone know what would be causing this error?