def new(httpreq: Request, request: NewIndicatorRequest) -> IndicatorTypes:
    """Creates a new indicator in the database."""
    try:
        new = request.indicator.save()
    except errors.ObjectCreationError as error:
        raise HTTPException(
            status_code=400, detail={"meta": error.meta, "description": str(error)}
        )

    rbac.set_acls(new, user=httpreq.state.user)
    audit.log_timeline(httpreq.state.username, new)
    return new
Creates a new indicator in the database.
core/web/apiv2/indicators.py