def add_text(httpreq: Request, request: AddTextRequest) -> ObservableTypes:
    """Adds and returns an observable for a given string, attempting to guess
    its type."""
    try:
        new = observable.save(value=request.text, tags=request.tags)
    except ValueError as error:
        raise HTTPException(status_code=400, detail=str(error))
    audit.log_timeline(httpreq.state.username, new)
    rbac.set_acls(new, user=httpreq.state.user)
    return new
Adds and returns an observable for a given string, attempting to guess
    its type.
core/web/apiv2/observables.py